大网数据广告活动
服务器运维问答

Sensu API not responding. Uchiwa: Connection error. Is the Sensu API running? Redis Issue

· 52CE 我爱测

I have been setting up sensu on CentOS7.2 for the first time following the official docs over and over however I have not been able to get it to work: I cannot seem to connect to the API. Uchiwa gives the error: ALERT Datacenter …

问题原文

原帖链接 · ZZ9 · CC BY-SA 3.0

I have been setting up sensu on CentOS7.2 for the first time following the official docs over and over however I have not been able to get it to work:

I cannot seem to connect to the API. Uchiwa gives the error:

ALERT
Datacenter site1 returned:
Connection error. Is the Sensu API running?`

I have tried: curl -I http://localhost:4567/clients ...I do not get a response.

Here is /var/log/sensu/sensu-api.log http://pastebin.com/wHEHE0bH

I have been creating a script to make the setup repeatable. Please see my script below which shows my config: http://pastebin.com/QEt5Msku If you run the script on CentOS7 it should repeat this issue.

Fix:

Issue in answer below. After following a non official guide that successfully installed sensu on a fresh VM, I compared the two setup steps and after a couple of builds on fresh VMs swapping out the steps bit by bit I figured out replacing the repo with one from a non official guide that pointed to a slightly different URL fixed my problem (repo for CentOS6 but it works on 7, it just installs a non current verson 0.20.3).

echo '[sensu]
name=sensu-main
baseurl=http://repos.sensuapp.org/yum/el/6/x86_64/
gpgcheck=0
enabled=1' > /etc/yum.repos.d/sensu.repo

已采纳解答

原帖链接 · Kobbe · CC BY-SA 3.0

The problem is that sensu 0.23 resolves localhost to an ipv6 address but redis is not listening to the ipv6 address. The solution is to change "host": "localhost" to "host": "127.0.0.1". There is an issue on Sensus git page

For your information, you should have looked in the sesu-server logs too and posted them here.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-04-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。