Search code examples
rubyclojureriemann

Couldn't start riemann health


I'm new to Riemann and also new to ruby and Clojure as well.

When I implementation of the riemann command:

riemann-health

The error message is

Riemann::Client::TcpSocket::Error Could not connect to 127.0.0.1:5555:Errno::ECONNREFUSED: Connection refused - connect(2)
/var/lib/gems/1.9.1/gems/riemann-client-0.2.5/lib/riemann/client/tcp_socket.rb:233:in `connect_nonblock'

My develop environment is:

Ubuntu 14.04.2 LTS

riemann version is 0.2.10.

java version "1.8.0_45"

ruby 1.9.3p484


Solution

  • I'm assuming that you are running Riemann and riemann-dash on the same computer and not using docker for either of these:

    Riemann listens to

    • port 5555 udp for events
    • port 5555 tcp for events
    • port 5556 tcp for queries

    so there are several combinations of possible problems:

    • riemann is not running at all
    • riemann started up, and then fell over and died.
      this happens when it has no config file for instance.
    • riemann is not listening on 5555 tcp
    • riemann is not listening on 5555 udp
    • riemann is listening to the incorrect interface (aka "bind address") If riemann where configured to listen to 1.2.3.4:5555 then it would not respond to connections from localhost (127.0.0.1)
    • the connection is being blocked by some firewall (no, don't turn your firewall off)
    • riemann is listening on udp and you are sending tcp (or the other way around)

    once you have convinced yourself that the riemann process is still running run

    sudo netstat -nlp | grep 5555 
    

    and be sure you can see that riemann is infact listening to port 5555 both tcp and udp. Then install netcat and make sure you can connect to those ports with

    nc -v localhost:5555
    

    and

    nc -uvv localhost:5555
    asdfasfd
    

    (yes you need to type some gobbeldy to get the second example to actually send a packet.

    If you still havent got a connection install etherial or tcpdump and start sniffing.

    If you are running docker, and using riemann in UDP then there are a whole other set of things to check.