riemann-tools icon indicating copy to clipboard operation
riemann-tools copied to clipboard

riemann-health exception

Open xingzheone opened this issue 7 years ago • 2 comments

Issue

What's your riemann-tools version?

riemann-tools-0.2.11

Riemann::Client::TcpSocket::Error Could not connect to 127.0.0.1:5555: Errno::EINVAL: Invalid argument
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:128:in `setsockopt'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:128:in `blank_socket'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:213:in `connect_nonblock'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:199:in `connect_or_error'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:177:in `block in connect'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:176:in `each'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:176:in `find'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:176:in `connect'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp_socket.rb:79:in `connect'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp.rb:17:in `block in socket_factory'
/var/lib/gems/1.9.1/gems/riemann-client-0.2.6/lib/riemann/client/tcp.rb:33:in `call'

Operating system, version. ubuntu14 (win10) ruby 1.9

xingzheone avatar Jun 14 '17 07:06 xingzheone

How are you executing riemann-tools? Is Riemann running on localhost on port 5555?

jamtur01 avatar Jun 14 '17 11:06 jamtur01

yes, I do . The clojure-client

(prn (send-event (tcp-client :host "127.0.0.1") {:service "xiaoniu2" :state "ok" :ttl 100}))

#object[io.riemann.riemann.client.MapPromise 0x73a5f5b7 {:status :ready, :val #riemann.codec.Msg{:ok true, :error nil, :events [], :query nil, :decode-time 82732106052120}}]

riemann server

INFO [2017-06-15 10:09:49,849] nREPL-worker-2 - riemann.bin - PID 28176
INFO [2017-06-15 10:09:49,852] nREPL-worker-2 - riemann.bin - Loading D:\clojure\luminusweb\riemann\config\riemann.config
INFO [2017-06-15 10:09:49,963] clojure-agent-send-off-pool-1 - riemann.transport.websockets - Websockets server 127.0.0.1 5556 online
INFO [2017-06-15 10:09:50,177] clojure-agent-send-off-pool-0 - riemann.transport.tcp - TCP server 127.0.0.1 2003 online
INFO [2017-06-15 10:09:50,192] clojure-agent-send-off-pool-8 - riemann.transport.tcp - TCP server 127.0.0.1 5555 online
INFO [2017-06-15 10:09:50,224] clojure-agent-send-off-pool-3 - riemann.transport.udp - UDP server 127.0.0.1 5555 16384 -1 online
INFO [2017-06-15 10:09:50,226] nREPL-worker-2 - riemann.core - Hyperspace core online

the riemann-dash run the right .

xingzheone avatar Jun 15 '17 02:06 xingzheone

This error was related to riemann-ruby-client.

The error on the backtrace indicate this line: https://github.com/riemann/riemann-ruby-client/blob/0.2.6/lib/riemann/client/tcp_socket.rb#L128

Socket::TCP_KEEPCNT was added in Ruby in this commit: https://github.com/ruby/ruby/commit/aa0ae0d3b6ab8d6c3143960bd0b3d154bd96d10e

This commit was part of Ruby 1.9.2 and later, but you where running 1.9.1 according to the backtrace.

So I will close this issue :-)

FYI we now require Ruby 2.6.0+ and have CI that run the tests suite with all supported versions of Ruby so we should be able to detect this kind of issues now!

smortex avatar Oct 21 '22 18:10 smortex