The Linux Community Forum

Non-Tech Zone => General Discussion => Topic started by: foufou-barnet on May 03, 2021, 02:13:44 pm

Title: Ubuntu Prometheus issue
Post by: foufou-barnet on May 03, 2021, 02:13:44 pm
Hey guys, i am new to ubuntu and wonder if someone can help me, i have installed prometheus and node_exporter and keep getting the following message when starting node_exporter

node_exporter.service - Prometheus
     Loaded: loaded (/etc/systemd/system/node_exporter.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2021-05-03 21:02:40 CST; 10min ago
    Process: 1825 ExecStart=/usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus/ --web.c>
   Main PID: 1825 (code=exited, status=203/EXEC)

May 03 21:02:40 Foudel-168353976252 systemd[1]: Started Prometheus.
May 03 21:02:40 Foudel-168353976252 systemd[1825]: node_exporter.service: Failed to execute command: Permission denied
May 03 21:02:40 Foudel-168353976252 systemd[1825]: node_exporter.service: Failed at step EXEC spawning /usr/local/bin/prometheus: Permission denied
May 03 21:02:40 Foudel-168353976252 systemd[1]: node_exporter.service: Main process exited, code=exited, status=203/EXEC
May 03 21:02:40 Foudel-168353976252 systemd[1]: node_exporter.service: Failed with result 'exit-code'.

can someone please help
Title: Re: Ubuntu Prometheus issue
Post by: Mad Penguin on May 07, 2021, 10:42:04 am
Hi, as this is an application specific issue you might find more relevant help on the Prometheus support forums.

https://discuss.prometheus.io/ (https://discuss.prometheus.io/)

Generally, it looks like your installation of Prometheus hasn't worked, the system service is trying to start "/usr/local/bin/prometheus" and getting a "permission denied" error. This would indicate that the file you are trying to execute (/usr/local/bin/prometheus) isn't marked as an executable file. If the issue is as simple as the installer not setting the correct permissions, you could rectify this specific issue with;

Code: [Select]
sudo chmod +x /usr/local/bin/prometheus
However I would recommend you investigate "why" the file has apparently been set with the wrong permissions in the first place.
Sometimes directly fixing an apparent error doesn't always solve the "problem".
SimplePortal 2.3.3 © 2008-2010, SimplePortal