I’ve installed basic sensu-backend with sensu-puppet as described in README.md of sensu-puppet module. There were no error on the puppet client at the installation. However the dashboard of the instance installed withe puppet can not be reached, it returns HTTP error 400:
# wget localhost:3000
--2022-01-04 18:18:01-- http://localhost:3000/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:3000... connected.
HTTP request sent, awaiting response... 400 Bad Request
2022-01-04 18:18:01 ERROR 400: Bad Request.
The backend listening the port and the port can be connected. Where can I see any information, any log what happens? The only log what I see is /var/log/sensu/backend-stats.log. It doesn’t change at calling the dashboard.
Hi there,
Just doing a wget
against :3000
isn’t going to really tell you anything. What other troubleshooting have you done? You might consider:
- Providing the output of
netstat -ntlp
to see if the dashboard is actually listening
- Reviewing the logs (you can find more here)
- Providing a redacted config for folks in the community to review.
One thing I’ll refer you to is this article: How To Ask A Good Question. In general, folks in the community will need some additional information to go off of in order to be able to better assist.
Thanks for the answer. Regarding your points:
- As I wrote, I’ve checked that sensu is listening on port 3000:
# netstat -lnp | grep 3000
tcp6 0 0 :::3000 :::* LISTEN 20293/sensu-backend
-
Exactly that was my question. I did not find only the log file /var/log/sensu/backend-stats.log, but it des not change at calling the dashboard. I need the help really to find and/or create suitable logs.
-
This is the whole /etc/sensu/backend.yml:
---
state-dir: "/var/lib/sensu/sensu-backend"
api-url: https://moni2.mydomain:8080
cert-file: "/etc/sensu/ssl/cert.pem"
key-file: "/etc/sensu/ssl/key.pem"
For everybody, who meet with the same problem. It was caused by the fact, that sensu-puppet installs Sensu Go with SSL as default. Calling the Sensu Dashboard with HTTP insted HTTPS causes HTML error 400 with enables SSL.
I do not need SSL on Sensu Go, because the Sensu Go backend is sitting in a VM, where the host of the VM is responsible for the SSL handshaking and reverse proxy of Apache on the host forwards the calls to the VM.
After disabling SSL in sensu-puppet I got the answer properly with wget also. Note that before disabling SSL I could get also the correct answer with that command, with https:
wget --no-check-certificate https://localhost:3000