Closed
Description
Describe the bug
The step of adding users is missing in NGINX Prometheus Exporter with systemd-activated socket, which causes nginx_exporter.service to fail to start.
To reproduce
Follow the document NGINX Prometheus Exporter with systemd-activated socket:
- Install the NGINX Prometheus Exporter binary to /usr/local/bin/nginx-prometheus-exporter
- Copy nginx_exporter.service and nginx_exporter.socket to /etc/systemd/system/
- Run systemctl daemon-reload
- Run systemctl start nginx_exporter
- Run systemctl status nginx_exporter to check the status of the service
Expected behavior
A clear and concise description of what you expected to happen.
Your environment
- CentOS Linux release 7.9.2009
Additional context
● nginx_exporter.service - NGINX Prometheus Exporter
Loaded: loaded (/etc/systemd/system/nginx_exporter.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 五 2024-08-09 10:16:37 CST; 24s ago
Process: 1597 ExecStart=/usr/local/bin/nginx-prometheus-exporter --nginx.scrape-uri=http://127.0.0.1:8080/stub_status --web.systemd-socket (code=exited, status=217/USER)
Main PID: 1597 (code=exited, status=217/USER)
8月 09 10:16:37 localhost systemd[1]: Started NGINX Prometheus Exporter.
8月 09 10:16:37 localhost systemd[1597]: Failed at step USER spawning /usr/local/bin/nginx-prometheus-exporter: No such process
8月 09 10:16:37 localhost systemd[1]: nginx_exporter.service: main process exited, code=exited, status=217/USER
8月 09 10:16:37 localhost systemd[1]: Unit nginx_exporter.service entered failed state.
8月 09 10:16:37 localhost systemd[1]: nginx_exporter.service failed.
Others
The node_exporter - Systemd Unit mentioned that a new user node_exporter should be created.