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 <kasp...@gmail.com> 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&q=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.858888134 +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 22:07:11 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:07:11.855145928 +0200 CEST
> 2016/08/16 22:07:11 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:07:16 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:07:16.854505285 +0200 CEST
> 2016/08/16 22:07:16 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:07:21 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:07:21.857646662 +0200 CEST
> 2016/08/16 22:07:21 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:07:26 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:07:26.855316517 +0200 CEST
> 2016/08/16 22:07:26 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:07:31 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:07:31.857938216 +0200 CEST
> 2016/08/16 22:07:31 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:07:36 [DEBUG] [connectionManager] (127.0.0.1:26420)
> expiring connections at 2016-08-16 22:07:36.857502102 +0200 CEST
> 2016/08/16 22:07:36 [DEBUG] [connectionManager] (127.0.0.1:26420) expired
> 0 connections.
> 2016/08/16 22:07:37 [DEBUG] [DefaultNodeManager] executed 'Ping-1' on node
> '127.0.0.1:26420|0|0', err 'read tcp 127.0.0.1:50014->127.0.0.1:26420:
> i/o timeout'
> 2016/08/16 22:07:37 [DEBUG] [Cluster] executed cmd 'Ping-1': re-try due to
> error 'read tcp 127.0.0.1:50014->127.0.0.1:26420: i/o timeout'
> 2016/08/16 22:07:37 [DEBUG] [Cluster] cmd Ping-1 tries: 0
> hello?
> ClientError|[Cluster] all retries exhausted and/or no nodes available to
> execute command|InnerError|read tcp 127.0.0.1:50014->127.0.0.1:26420: i/o
> timeout
> 2016/08/16 22:07:37 [DEBUG] [Connection] connected to: 127.0.0.1:26420
> 2016/08/16 22:07:37 [DEBUG] [Node] (127.0.0.1:26420|1|0) - executing
> command 'Search-2'
> 2016/08/16 22:07:37 [DEBUG] [Connection] allocating larger dataBuf of size
> 1213486160
> 2016/08/16 22:07:37 [DEBUG] [DefaultNodeManager] executed 'Search-2' on
> node '127.0.0.1:26420|0|0', err 'unexpected EOF'
> 2016/08/16 22:07:37 [DEBUG] [Cluster] executed cmd 'Search-2': re-try due
> to error 'unexpected EOF'
> 2016/08/16 22:07:37 [DEBUG] [Cluster] cmd Search-2 tries: 0
> ClientError|[Cluster] all retries exhausted and/or no nodes available to
> execute command|InnerError|unexpected EOF
>
> --------------------------
>
> I can tell there's a timeout due to the "*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
> <http://127.0.0.1:26420>: i/o timeout'"* error, but I have no idea why.
>
> Can anyone shed some light on what I'm doing wrong here? I greatly
> appreciate any help you can give me.
>
> All the best,
> Kasper
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to