Skip to content

In the systemd deployment documentation, the step of creating a new user is missing. #799

Closed
@huangsijun17

Description

@huangsijun17

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:

  1. Install the NGINX Prometheus Exporter binary to /usr/local/bin/nginx-prometheus-exporter
  2. Copy nginx_exporter.service and nginx_exporter.socket to /etc/systemd/system/
  3. Run systemctl daemon-reload
  4. Run systemctl start nginx_exporter
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityIssues or PRs opened by an external contributor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions