After upgrading to Sensu 0.23.2-2 on RHEL 6.8 the Sensu server would not start. The logs looked like this:
{"timestamp":"","level":"debug","message":"connecting to redis","settings":{"host":"localhost","port":6379}}
{"timestamp":"","level":"debug","message":"connecting to transport","name":"rabbitmq","settings":{"ssl":{"private_key_file":"/etc/sensu/ssl/client_key.pem","cert_chain_file":"/etc/sensu/ssl/client_cert.pem"},"host":"localhost","port":5671,"user":"REDACTED","password":"REDACTED","vhost":"/sensu"}}
{"timestamp":"","level":"warn","message":"reconnecting to redis"}
{"timestamp":"","level":"warn","message":"unsubscribing from keepalive and result queues"}
{"timestamp":"","level":"debug","message":"not currently the leader"}
{"timestamp":"","level":"debug","message":"subscribing to keepalives"}
{"timestamp":"","level":"debug","message":"subscribing to results"}
{"timestamp":"","level":"debug","message":"{\"name\":\"client.example.com\",\"address\":\"10.1.2.3\",\"safe_mode\":false,\"subscriptions\":[\"os\"],\"version\":\"0.23.2\",\"timestamp\":1463588088}"}
{"timestamp":"","level":"debug","message":"updating client registry","client":{"name":"client.example.com","address":"10.1.2.3","safe_mode":false,"subscriptions":["os"],"version":"0.23.2","timestamp":1463588088}}
The cause of this is that localhost is resolving to ::1 and Redis is not listening with IPv6.
There are two solutions. One is to go through your /etc/sensu configuration files and change localhost to 127.0.0.1 so that you connect via IPv4.
The other solution is to change Redis configuration to bind to 127.0.0.1 and ::1.
Reference: https://github.com/sensu/sensu/issues/1209