1

I've installed Prometheus by extracting archive from the official site, creating the user prometheus and systemd unit file. It has been started successfully. But now when I'm trying to do the same for the node exporter, I encountered an error: Failed to start Prometheus Node Exporter. I took the systemd init file from the guide

systemctl status node_exporter

Failed to start Prometheus Node Exporter.

tail /var/log/syslog

shows:

Feb 23 10:11:32 box systemd[2562]: node_exporter.service: Failed at step USER spawning /usr/local/bin/node_exporter: No such process
Feb 23 10:11:32 box systemd[1]: node_exporter.service: Main process exited, code=exited, status=217/USER
Feb 23 10:11:32 box systemd[1]: node_exporter.service: Failed with result 'exit-code'.
Feb 23 10:11:32 box systemd[1]: node_exporter.service: Scheduled restart job, restart counter is at 5.
Feb 23 10:11:32 box systemd[1]: Stopped Prometheus Node Exporter.
Feb 23 10:11:32 box systemd[1]: node_exporter.service: Start request repeated too quickly.
Feb 23 10:11:32 box systemd[1]: node_exporter.service: Failed with result 'exit-code'.
Feb 23 10:11:32 box systemd[1]: Failed to start Prometheus Node Exporter.
Feb 23 10:12:28 box systemd[1]: Reloading.
Feb 23 10:17:01 box CRON[2606]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

the unit file

[Unit]
Description=Prometheus Node Exporter
After=network.target

[Service] Type=simple User=node_exporter Group=node_exporter ExecStart=/usr/local/bin/node_exporter

SyslogIdentifier=node_exporter Restart=always

PrivateTmp=yes ProtectHome=yes NoNewPrivileges=yes

ProtectSystem=strict ProtectControlGroups=true ProtectKernelModules=true ProtectKernelTunables=yes

[Install] WantedBy=multi-user.target

enter image description here

1 Answers1

1

The Failed at step USER spawning error message means that the service failed to start because it couldn't run as the specified user. This can be caused by several factors such as incorrect user permissions, incorrect file ownership, or an issue with the user's environment. To resolve the issue, try the following steps:

  1. Check the user specified in the service file: Make sure the User & Group (both noed_exporter) specified in the service file exists and has the correct permissions to run the process.
  2. Check the file ownership: Ensure that the binary file specified in the service file is owned by
Seyed M
  • 71