"sensu must be a hash" error while starting sensu-server

I’m trying to get sensu working on a Fedora 24 Xfce machine, according to this tutorial: http://techblog.geir.io/standalone-sensu-server-on-centos7

But starting sensu-server fails via systemct:

[neo@localhost ~]$ systemctl status sensu-server

● sensu-server.service - LSB: Sensu monitoring framework server

Loaded: loaded (/etc/rc.d/init.d/sensu-server; bad; vendor preset: disabled)

Active: failed (Result: exit-code) since Mon 2017-01-23 12:08:26 CET; 5min ago

Docs: man:systemd-sysv-generator(8)

Process: 1159 ExecStart=/etc/rc.d/init.d/sensu-server start (code=exited, status=1/FAILURE)

Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {“timestamp”:“2017-01-23T12:08:25.868351+0100”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/uchiwa.json"}

Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {“timestamp”:“2017-01-23T12:08:25.868408+0100”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/uchiwa.json",“changes”:{“uchiwa”:[null,{“host”:“0.0.0.0”,“port”:3000,“refresh”:5,“user”:“admin”,“pass”:“REDACTED”}]}}

Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {“timestamp”:“2017-01-23T12:08:25.868473+0100”,“level”:“fatal”,“message”:“sensu must be a hash”,“object”:[{“name”:“Datacenter 1”,“host”:“localhost”,“port”:4567},{“name”:“DataCenter 1”,“host”:“127.0.0.1”,“port”:4567}]}

Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {“timestamp”:“2017-01-23T12:08:25.868509+0100”,“level”:“fatal”,“message”:“SENSU NOT RUNNING!”}

Jan 23 12:08:25 localhost.localdomain runuser[1170]: pam_unix(runuser:session): session closed for user sensu

Jan 23 12:08:26 localhost.localdomain sensu-server[1159]: [17B blob data]

Jan 23 12:08:26 localhost.localdomain systemd[1]: sensu-server.service: Control process exited, code=exited status=1

Jan 23 12:08:26 localhost.localdomain systemd[1]: Failed to start LSB: Sensu monitoring framework server.

Jan 23 12:08:26 localhost.localdomain systemd[1]: sensu-server.service: Unit entered failed state.

Jan 23 12:08:26 localhost.localdomain systemd[1]: sensu-server.service: Failed with result ‘exit-code’.

Any ideas?

api.json (84 Bytes)

client.json (247 Bytes)

dashboard.json (171 Bytes)

redis.json (63 Bytes)

transport.json (77 Bytes)

uchiwa.json (229 Bytes)

Comments inline.

···

On 23-Jan-2017, at 4:49 PM, Marius Pfeffer <pfeffer.marius@gmail.com> wrote:

I'm trying to get sensu working on a Fedora 24 Xfce machine, according to this tutorial: http://techblog.geir.io/standalone-sensu-server-on-centos7

But starting sensu-server fails via systemct:

[neo@localhost ~]$ systemctl status sensu-server
● sensu-server.service - LSB: Sensu monitoring framework server
   Loaded: loaded (/etc/rc.d/init.d/sensu-server; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2017-01-23 12:08:26 CET; 5min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1159 ExecStart=/etc/rc.d/init.d/sensu-server start (code=exited, status=1/FAILURE)

Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {"timestamp":"2017-01-23T12:08:25.868351+0100","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/uchiwa.json"}
Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {"timestamp":"2017-01-23T12:08:25.868408+0100","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/uchiwa.json","changes":{"uchiwa":[null,{"host":"0.0.0.0","port":3000,"refresh":5,"user":"admin","pass":"REDACTED"}]}}
Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {"timestamp":"2017-01-23T12:08:25.868473+0100","level":"fatal","message":"sensu must be a hash","object":[{"name":"Datacenter 1","host":"localhost","port":4567},{"name":"DataCenter 1","host":"127.0.0.1","port":4567}]}
Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {"timestamp":"2017-01-23T12:08:25.868509+0100","level":"fatal","message":"SENSU NOT RUNNING!"}
Jan 23 12:08:25 localhost.localdomain runuser[1170]: pam_unix(runuser:session): session closed for user sensu
Jan 23 12:08:26 localhost.localdomain sensu-server[1159]: [17B blob data]
Jan 23 12:08:26 localhost.localdomain systemd[1]: sensu-server.service: Control process exited, code=exited status=1
Jan 23 12:08:26 localhost.localdomain systemd[1]: Failed to start LSB: Sensu monitoring framework server.
Jan 23 12:08:26 localhost.localdomain systemd[1]: sensu-server.service: Unit entered failed state.
Jan 23 12:08:26 localhost.localdomain systemd[1]: sensu-server.service: Failed with result 'exit-code'.

Any ideas?

Did you have by any chance uchiwa.json and dashboard.json under /etc/sensu/conf.d? I dont
have a dashboard.json but uchiwa.json is at /etc/sensu and not under /etc/sensu/conf.d/.

Do try moving the said config out of /etc/sensu/conf.d.

Regards.
@shankerbalan

Thanks, that was it (partially).

I’ve got another error saying “level”:“fatal”,“message”:“could not write to pid file”,“pid_file”:"/var/run/sensu/sensu-server.pid", so I’ve changed the user and group of /var/run/sensu from root to sensu.

And enabled and started uchiwa.

But it seems to run so far.

···

Am Montag, 23. Januar 2017 15:18:44 UTC+1 schrieb Shanker Balan:

Comments inline.

On 23-Jan-2017, at 4:49 PM, Marius Pfeffer pfeffer...@gmail.com wrote:

I’m trying to get sensu working on a Fedora 24 Xfce machine, according to this tutorial: http://techblog.geir.io/standalone-sensu-server-on-centos7

But starting sensu-server fails via systemct:

[neo@localhost ~]$ systemctl status sensu-server
● sensu-server.service - LSB: Sensu monitoring framework server
Loaded: loaded (/etc/rc.d/init.d/sensu-server; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-01-23 12:08:26 CET; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 1159 ExecStart=/etc/rc.d/init.d/sensu-server start (code=exited, status=1/FAILURE)

Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {“timestamp”:“2017-01-23T12:08:25.868351+0100”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/uchiwa.json"}
Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {“timestamp”:“2017-01-23T12:08:25.868408+0100”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/uchiwa.json",“changes”:{“uchiwa”:[null,{“host”:“0.0.0.0”,“port”:3000,“refresh”:5,“user”:“admin”,“pass”:“REDACTED”}]}}
Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {“timestamp”:“2017-01-23T12:08:25.868473+0100”,“level”:“fatal”,“message”:“sensu must be a hash”,“object”:[{“name”:“Datacenter 1”,“host”:“localhost”,“port”:4567},{“name”:“DataCenter 1”,“host”:“127.0.0.1”,“port”:4567}]}
Jan 23 12:08:25 localhost.localdomain sensu-server[1159]: {“timestamp”:“2017-01-23T12:08:25.868509+0100”,“level”:“fatal”,“message”:“SENSU NOT RUNNING!”}
Jan 23 12:08:25 localhost.localdomain runuser[1170]: pam_unix(runuser:session): session closed for user sensu
Jan 23 12:08:26 localhost.localdomain sensu-server[1159]: [17B blob data]
Jan 23 12:08:26 localhost.localdomain systemd[1]: sensu-server.service: Control process exited, code=exited status=1
Jan 23 12:08:26 localhost.localdomain systemd[1]: Failed to start LSB: Sensu monitoring framework server.
Jan 23 12:08:26 localhost.localdomain systemd[1]: sensu-server.service: Unit entered failed state.
Jan 23 12:08:26 localhost.localdomain systemd[1]: sensu-server.service: Failed with result ‘exit-code’.

Any ideas?

Did you have by any chance uchiwa.json and dashboard.json under /etc/sensu/conf.d? I dont
have a dashboard.json but uchiwa.json is at /etc/sensu and not under /etc/sensu/conf.d/.

Do try moving the said config out of /etc/sensu/conf.d.

Regards.
@shankerbalan