Re: Issues with the Go client

2016-08-16 Thread Kasper Tidemann
Hi Alex,

Thank you for the swift reply. I was unaware of the fact that the client
uses protocol buffers and not HTTP. Changing the port number made it work -
hooray!

On Tue, Aug 16, 2016 at 11:11 PM, Alex Moore  wrote:

> Hi Kasper,
>
> Looks like you might be trying to connect to Riak's HTTP port with the
> client, which only uses protocol buffers. Can you try switching to the PB
> port?
>
> Thanks,
> Alex
>
> On Tue, Aug 16, 2016 at 4:11 PM, Kasper Tidemann 
> wrote:
>
>> Hi everybody,
>>
>> I'm using the Go client for Riak, trying to make things work. I have a
>> Riak node running locally on 127.0.0.1:26420 (HTTP).
>>
>> The node responds fine to *$ riak ping*. GET'ing keys, searching for
>> records via */search/query/data?wt=json=some:thing* works as well. It
>> all seems to be working, except for the fact that I can't get the Go client
>> to talk to the node - it encounters a timeout.
>>
>> I'm using the code found here, having replaced the IP and port:
>>
>> https://github.com/basho/riak-go-client/blob/master/examples
>> /dev/using/search/main.go
>>
>> I have set *riak.EnableDebugLogging = true* to figure out what happens.
>> Here is the output from running the code:
>>
>> --
>>
>> 2016/08/16 22:06:06 [DEBUG] [Cluster] starting
>> 2016/08/16 22:06:06 [DEBUG] [Node] (127.0.0.1:26420|0|0) starting
>> 2016/08/16 22:06:06 [DEBUG] [Connection] connected to: 127.0.0.1:26420
>> 2016/08/16 22:06:06 [DEBUG] [Node] (127.0.0.1:26420|1|1) started
>> 2016/08/16 22:06:06 [DEBUG] [Cluster] cluster started
>> 2016/08/16 22:06:06 [DEBUG] [Node] (127.0.0.1:26420|1|0) - executing
>> command 'Ping-1'
>> 2016/08/16 22:06:06 [DEBUG] [connectionManager] connection expiration
>> routine is starting
>> 2016/08/16 22:06:11 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:11.858769974 +0200 CEST
>> 2016/08/16 22:06:11 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:06:16 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:16.857905418 +0200 CEST
>> 2016/08/16 22:06:16 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:06:21 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:21.858036918 +0200 CEST
>> 2016/08/16 22:06:21 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:06:26 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:26.853930918 +0200 CEST
>> 2016/08/16 22:06:26 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:06:31 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:31.858905057 +0200 CEST
>> 2016/08/16 22:06:31 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:06:36 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:36.85518287 +0200 CEST
>> 2016/08/16 22:06:36 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:06:36 [DEBUG] [DefaultNodeManager] executed 'Ping-1' on
>> node '127.0.0.1:26420|0|0', err 'read tcp 127.0.0.1:49998->127.0.0.1:264
>> 20: i/o timeout'
>> 2016/08/16 22:06:36 [DEBUG] [Cluster] executed cmd 'Ping-1': re-try due
>> to error 'read tcp 127.0.0.1:49998->127.0.0.1:26420: i/o timeout'
>> 2016/08/16 22:06:36 [DEBUG] [Cluster] cmd Ping-1 tries: 2
>> 2016/08/16 22:06:36 [DEBUG] [Async] onRetry cmd: Ping-1 sleep: 100ms
>> 2016/08/16 22:06:36 [DEBUG] [Connection] connected to: 127.0.0.1:26420
>> 2016/08/16 22:06:36 [DEBUG] [Node] (127.0.0.1:26420|1|0) - executing
>> command 'Ping-1'
>> 2016/08/16 22:06:41 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:41.858466787 +0200 CEST
>> 2016/08/16 22:06:41 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:06:46 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:46.857634755 +0200 CEST
>> 2016/08/16 22:06:46 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:06:51 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:51.857639326 +0200 CEST
>> 2016/08/16 22:06:51 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:06:56 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:06:56.854398145 +0200 CEST
>> 2016/08/16 22:06:56 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:07:01 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expiring connections at 2016-08-16 22:07:01.85134 +0200 CEST
>> 2016/08/16 22:07:01 [DEBUG] [connectionManager] (127.0.0.1:26420)
>> expired 0 connections.
>> 2016/08/16 22:07:06 [DEBUG] [connectionManager] 

Re: Issues with the Go client

2016-08-16 Thread Alex Moore
Hi Kasper,

Looks like you might be trying to connect to Riak's HTTP port with the
client, which only uses protocol buffers. Can you try switching to the PB
port?

Thanks,
Alex

On Tue, Aug 16, 2016 at 4:11 PM, Kasper Tidemann  wrote:

> Hi everybody,
>
> I'm using the Go client for Riak, trying to make things work. I have a
> Riak node running locally on 127.0.0.1:26420 (HTTP).
>
> The node responds fine to *$ riak ping*. GET'ing keys, searching for
> records via */search/query/data?wt=json=some:thing* works as well. It
> all seems to be working, except for the fact that I can't get the Go client
> to talk to the node - it encounters a timeout.
>
> I'm using the code found here, having replaced the IP and port:
>
> https://github.com/basho/riak-go-client/blob/master/
> examples/dev/using/search/main.go
>
> I have set *riak.EnableDebugLogging = true* to figure out what happens.
> Here is the output from running the code:
>
> --
>
> 2016/08/16 22:06:06 [DEBUG] [Cluster] starting
> 2016/08/16 22:06:06 [DEBUG] [Node] (127.0.0.1:26420|0|0) starting
> 2016/08/16 22:06:06 [DEBUG] [Connection] connected to: 127.0.0.1:26420
> 2016/08/16 22:06:06 [DEBUG] [Node] (127.0.0.1:26420|1|1) started
> 2016/08/16 22:06:06 [DEBUG] [Cluster] cluster started
> 2016/08/16 22:06:06 [DEBUG] [Node] (127.0.0.1:26420|1|0) - executing
> command 'Ping-1'
> 2016/08/16 22:06:06 [DEBUG] [connectionManager] connection expiration
> routine is starting
> 2016/08/16 22:06:11 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:11.858769974 +0200 CEST
> 2016/08/16 22:06:11 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:06:16 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:16.857905418 +0200 CEST
> 2016/08/16 22:06:16 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:06:21 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:21.858036918 +0200 CEST
> 2016/08/16 22:06:21 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:06:26 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:26.853930918 +0200 CEST
> 2016/08/16 22:06:26 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:06:31 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:31.858905057 +0200 CEST
> 2016/08/16 22:06:31 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:06:36 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:36.85518287 +0200 CEST
> 2016/08/16 22:06:36 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:06:36 [DEBUG] [DefaultNodeManager] executed 'Ping-1' on node
> '127.0.0.1:26420|0|0', err 'read tcp 127.0.0.1:49998->127.0.0.1:26420:
> i/o timeout'
> 2016/08/16 22:06:36 [DEBUG] [Cluster] executed cmd 'Ping-1': re-try due to
> error 'read tcp 127.0.0.1:49998->127.0.0.1:26420: i/o timeout'
> 2016/08/16 22:06:36 [DEBUG] [Cluster] cmd Ping-1 tries: 2
> 2016/08/16 22:06:36 [DEBUG] [Async] onRetry cmd: Ping-1 sleep: 100ms
> 2016/08/16 22:06:36 [DEBUG] [Connection] connected to: 127.0.0.1:26420
> 2016/08/16 22:06:36 [DEBUG] [Node] (127.0.0.1:26420|1|0) - executing
> command 'Ping-1'
> 2016/08/16 22:06:41 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:41.858466787 +0200 CEST
> 2016/08/16 22:06:41 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:06:46 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:46.857634755 +0200 CEST
> 2016/08/16 22:06:46 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:06:51 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:51.857639326 +0200 CEST
> 2016/08/16 22:06:51 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:06:56 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:06:56.854398145 +0200 CEST
> 2016/08/16 22:06:56 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:07:01 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:07:01.85134 +0200 CEST
> 2016/08/16 22:07:01 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:07:06 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:07:06.858879614 +0200 CEST
> 2016/08/16 22:07:06 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:07:06 [DEBUG] [DefaultNodeManager] executed 'Ping-1' on node
> '127.0.0.1:26420|0|0', err 'read tcp 127.0.0.1:50009->127.0.0.1:26420:
> i/o timeout'
> 2016/08/16 

Issues with the Go client

2016-08-16 Thread Kasper Tidemann
Hi everybody,

I'm using the Go client for Riak, trying to make things work. I have a Riak
node running locally on 127.0.0.1:26420 (HTTP).

The node responds fine to *$ riak ping*. GET'ing keys, searching for
records via */search/query/data?wt=json=some:thing* works as well. It all
seems to be working, except for the fact that I can't get the Go client to
talk to the node - it encounters a timeout.

I'm using the code found here, having replaced the IP and port:

https://github.com/basho/riak-go-client/blob/master/examples/dev/using/search/main.go

I have set *riak.EnableDebugLogging = true* to figure out what happens.
Here is the output from running the code:

--

2016/08/16 22:06:06 [DEBUG] [Cluster] starting
2016/08/16 22:06:06 [DEBUG] [Node] (127.0.0.1:26420|0|0) starting
2016/08/16 22:06:06 [DEBUG] [Connection] connected to: 127.0.0.1:26420
2016/08/16 22:06:06 [DEBUG] [Node] (127.0.0.1:26420|1|1) started
2016/08/16 22:06:06 [DEBUG] [Cluster] cluster started
2016/08/16 22:06:06 [DEBUG] [Node] (127.0.0.1:26420|1|0) - executing
command 'Ping-1'
2016/08/16 22:06:06 [DEBUG] [connectionManager] connection expiration
routine is starting
2016/08/16 22:06:11 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:11.858769974 +0200 CEST
2016/08/16 22:06:11 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:06:16 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:16.857905418 +0200 CEST
2016/08/16 22:06:16 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:06:21 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:21.858036918 +0200 CEST
2016/08/16 22:06:21 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:06:26 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:26.853930918 +0200 CEST
2016/08/16 22:06:26 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:06:31 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:31.858905057 +0200 CEST
2016/08/16 22:06:31 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:06:36 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:36.85518287 +0200 CEST
2016/08/16 22:06:36 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:06:36 [DEBUG] [DefaultNodeManager] executed 'Ping-1' on node
'127.0.0.1:26420|0|0', err 'read tcp 127.0.0.1:49998->127.0.0.1:26420: i/o
timeout'
2016/08/16 22:06:36 [DEBUG] [Cluster] executed cmd 'Ping-1': re-try due to
error 'read tcp 127.0.0.1:49998->127.0.0.1:26420: i/o timeout'
2016/08/16 22:06:36 [DEBUG] [Cluster] cmd Ping-1 tries: 2
2016/08/16 22:06:36 [DEBUG] [Async] onRetry cmd: Ping-1 sleep: 100ms
2016/08/16 22:06:36 [DEBUG] [Connection] connected to: 127.0.0.1:26420
2016/08/16 22:06:36 [DEBUG] [Node] (127.0.0.1:26420|1|0) - executing
command 'Ping-1'
2016/08/16 22:06:41 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:41.858466787 +0200 CEST
2016/08/16 22:06:41 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:06:46 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:46.857634755 +0200 CEST
2016/08/16 22:06:46 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:06:51 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:51.857639326 +0200 CEST
2016/08/16 22:06:51 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:06:56 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:06:56.854398145 +0200 CEST
2016/08/16 22:06:56 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:07:01 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:07:01.85134 +0200 CEST
2016/08/16 22:07:01 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:07:06 [DEBUG] [connectionManager] (127.0.0.1:26420) expiring
connections at 2016-08-16 22:07:06.858879614 +0200 CEST
2016/08/16 22:07:06 [DEBUG] [connectionManager] (127.0.0.1:26420) expired 0
connections.
2016/08/16 22:07:06 [DEBUG] [DefaultNodeManager] executed 'Ping-1' on node
'127.0.0.1:26420|0|0', err 'read tcp 127.0.0.1:50009->127.0.0.1:26420: i/o
timeout'
2016/08/16 22:07:06 [DEBUG] [Cluster] executed cmd 'Ping-1': re-try due to
error 'read tcp 127.0.0.1:50009->127.0.0.1:26420: i/o timeout'
2016/08/16 22:07:06 [DEBUG] [Cluster] cmd Ping-1 tries: 1
2016/08/16 22:07:06 [DEBUG] [Async] onRetry cmd: Ping-1 sleep: 194.050908ms
2016/08/16 22:07:07 [DEBUG] [Connection] connected to: 127.0.0.1:26420
2016/08/16 22:07:07 [DEBUG] [Node] (127.0.0.1:26420|1|0) - executing
command 'Ping-1'
2016/08/16