Uchiwa: Connection failed to the datacenter

Hi,

I am testing out Sensu and have setup a virtualbox machine with Ubuntu 16.04 and installed Sensu 0.25 according to the 5 minute install guide, added a check and a metrics collector and now wanted to get the Uchiwa (0.15.0) dashboard up and running. It seems to work for a few seconds, but then seems to loose connection to the sensu-api, giving this error in the web GUI: Connection error. Is the Sensu API running?

A few choice copy-pastes from various files:

/var/log/uchiwa.log:

{“timestamp”:“2016-06-14T15:01:32.1903065+02:00”,“level”:“info”,“message”:“Updating the datacenter Local Sensu”}

{“timestamp”:“2016-06-14T15:01:32.193739009+02:00”,“level”:“warn”,“message”:“GET http://127.0.0.1:4567/checks returned: Get http://127.0.0.1:4567/checks: EOF”}

{“timestamp”:“2016-06-14T15:01:32.193775374+02:00”,“level”:“warn”,“message”:“Connection failed to the datacenter Local Sensu”}

/var/log/sensu/sensu-api.log:

{“timestamp”:“2016-06-14T15:01:32.193235+0200”,“level”:“info”,“message”:“api response”,“request”:{“remote_address”:“127.0.0.1”,“user_agent”:“Go-http-client/1.1”,“method”:“GET”,“uri”:"/stashes",“query_string”:null,“body”:""},“status”:200,“content_length”:2}

/etc/sensu/uchiwa.json:

{

“sensu”: [

{

“name”: “Local Sensu”,

“host”: “127.0.0.1”,

“port”: 4567

}

],

“uchiwa”: {

“host”: “0.0.0.0”,

“port”: 3000,

“refresh”: 10

}

}

/etc/sensu/config.json:

{

“redis”: {

“host”: “127.0.0.1”

},

“transport”: {

“name”: “redis”

},

“api”: {

“host”: “127.0.0.1”,

“port”: 4567

}

}

And doing what Uchiwa seems to be doing, with curl:

$ curl http://127.0.0.1:4567/checks

[{“command”:“check-process.rb -p cron”,“standalone”:true,“interval”:60,“name”:“cron”},{“type”:“metric”,“command”:“metrics-cpu.rb”,“subscribers”:[“dev”],“interval”:10,“handler”:“debug”,“name”:“cpu_metrics”}]

$ curl http://127.0.0.1:4567/stashes

Any hints about what might be the problem here?

Sensu 0.25 had a bug concerning the API. Please try upgrading to 0.25.1-1 (https://github.com/sensu/sensu/issues/1340)

···

On Tuesday, June 14, 2016 at 3:07:10 PM UTC+2, Anders Bruun Olsen wrote:

Hi,

I am testing out Sensu and have setup a virtualbox machine with Ubuntu 16.04 and installed Sensu 0.25 according to the 5 minute install guide, added a check and a metrics collector and now wanted to get the Uchiwa (0.15.0) dashboard up and running. It seems to work for a few seconds, but then seems to loose connection to the sensu-api, giving this error in the web GUI: Connection error. Is the Sensu API running?

A few choice copy-pastes from various files:

/var/log/uchiwa.log:

{“timestamp”:“2016-06-14T15:01:32.1903065+02:00”,“level”:“info”,“message”:“Updating the datacenter Local Sensu”}

{“timestamp”:“2016-06-14T15:01:32.193739009+02:00”,“level”:“warn”,“message”:“GET http://127.0.0.1:4567/checks returned: Get http://127.0.0.1:4567/checks: EOF”}

{“timestamp”:“2016-06-14T15:01:32.193775374+02:00”,“level”:“warn”,“message”:“Connection failed to the datacenter Local Sensu”}

/var/log/sensu/sensu-api.log:

{“timestamp”:“2016-06-14T15:01:32.193235+0200”,“level”:“info”,“message”:“api response”,“request”:{“remote_address”:“127.0.0.1”,“user_agent”:“Go-http-client/1.1”,“method”:“GET”,“uri”:"/stashes",“query_string”:null,“body”:""},“status”:200,“content_length”:2}

/etc/sensu/uchiwa.json:

{

“sensu”: [

{

“name”: “Local Sensu”,

“host”: “127.0.0.1”,

“port”: 4567

}

],

“uchiwa”: {

“host”: “0.0.0.0”,

“port”: 3000,

“refresh”: 10

}

}

/etc/sensu/config.json:

{

“redis”: {

“host”: “127.0.0.1”

},

“transport”: {

“name”: “redis”

},

“api”: {

“host”: “127.0.0.1”,

“port”: 4567

}

}

And doing what Uchiwa seems to be doing, with curl:

$ curl http://127.0.0.1:4567/checks

[{“command”:“check-process.rb -p cron”,“standalone”:true,“interval”:60,“name”:“cron”},{“type”:“metric”,“command”:“metrics-cpu.rb”,“subscribers”:[“dev”],“interval”:10,“handler”:“debug”,“name”:“cpu_metrics”}]

$ curl http://127.0.0.1:4567/stashes

Any hints about what might be the problem here?

Upgrading to the newly released 0.25.1 fixed the problem. Thank you for replying :slight_smile:

···

On Wednesday, June 15, 2016 at 12:21:14 PM UTC+2, Alexander Skiba wrote:

Sensu 0.25 had a bug concerning the API. Please try upgrading to 0.25.1-1 (https://github.com/sensu/sensu/issues/1340)

On Tuesday, June 14, 2016 at 3:07:10 PM UTC+2, Anders Bruun Olsen wrote:

Hi,

I am testing out Sensu and have setup a virtualbox machine with Ubuntu 16.04 and installed Sensu 0.25 according to the 5 minute install guide, added a check and a metrics collector and now wanted to get the Uchiwa (0.15.0) dashboard up and running. It seems to work for a few seconds, but then seems to loose connection to the sensu-api, giving this error in the web GUI: Connection error. Is the Sensu API running?

A few choice copy-pastes from various files:

/var/log/uchiwa.log:

{“timestamp”:“2016-06-14T15:01:32.1903065+02:00”,“level”:“info”,“message”:“Updating the datacenter Local Sensu”}

{“timestamp”:“2016-06-14T15:01:32.193739009+02:00”,“level”:“warn”,“message”:“GET http://127.0.0.1:4567/checks returned: Get http://127.0.0.1:4567/checks: EOF”}

{“timestamp”:“2016-06-14T15:01:32.193775374+02:00”,“level”:“warn”,“message”:“Connection failed to the datacenter Local Sensu”}

/var/log/sensu/sensu-api.log:

{“timestamp”:“2016-06-14T15:01:32.193235+0200”,“level”:“info”,“message”:“api response”,“request”:{“remote_address”:“127.0.0.1”,“user_agent”:“Go-http-client/1.1”,“method”:“GET”,“uri”:"/stashes",“query_string”:null,“body”:""},“status”:200,“content_length”:2}

/etc/sensu/uchiwa.json:

{

“sensu”: [

{

“name”: “Local Sensu”,

“host”: “127.0.0.1”,

“port”: 4567

}

],

“uchiwa”: {

“host”: “0.0.0.0”,

“port”: 3000,

“refresh”: 10

}

}

/etc/sensu/config.json:

{

“redis”: {

“host”: “127.0.0.1”

},

“transport”: {

“name”: “redis”

},

“api”: {

“host”: “127.0.0.1”,

“port”: 4567

}

}

And doing what Uchiwa seems to be doing, with curl:

$ curl http://127.0.0.1:4567/checks

[{“command”:“check-process.rb -p cron”,“standalone”:true,“interval”:60,“name”:“cron”},{“type”:“metric”,“command”:“metrics-cpu.rb”,“subscribers”:[“dev”],“interval”:10,“handler”:“debug”,“name”:“cpu_metrics”}]

$ curl http://127.0.0.1:4567/stashes

Any hints about what might be the problem here?