Issue in start promentheus service

4,781 views
Skip to first unread message

Danilo fonseca martins

unread,
Sep 19, 2018, 9:05:52 AM9/19/18
to Prometheus Users
Hi

I am facing an issue with prometheus. Can anyone help me?
I am not able to start it. Look bellow the erro informed:

● prometheus.service - Prometheus
   Loaded: loaded (/etc/systemd/system/prometheus.service; enabled)
   Active: failed (Result: exit-code) since Qua 2018-09-19 09:57:55 BRT; 10s ago
  Process: 572 ExecStart=/usr/local/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus/ --web.console.templates=/etc/prometheus/consoles --web.console.libraries=/etc/prometheus/console_libraries (code=exited, status=203/EXEC)
 Main PID: 572 (code=exited, status=203/EXEC)

Set 19 09:57:55 raspberrypi systemd[1]: Started Prometheus.
Set 19 09:57:55 raspberrypi systemd[1]: prometheus.service: main process exited, code=exited, status=203/EXEC
Set 19 09:57:55 raspberrypi systemd[1]: Unit prometheus.service entered failed state.


Nicholas Capo

unread,
Sep 19, 2018, 9:09:49 AM9/19/18
to Danilo fonseca martins, Prometheus Users
I think this means something is wrong with your binary, what do the following commands output?

```
ls -l /usr/local/bin/prometheus
file /usr/local/bin/prometheus
/usr/local/bin/prometheus --help

```

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/ce8558e6-fcdb-42f5-8374-79512d013307%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Danilo fonseca martins

unread,
Sep 19, 2018, 9:49:11 AM9/19/18
to Prometheus Users
I also suspect that is something wrong with the binary. I 've already deleted it and downloaded a new one, but the problema remains. Follow the output of the commands you asked me.

ls -l /usr/local/bin/prometheus
-rwxr-xr-x 1 prometheus prometheus 64627321 Set 18 17:37 /usr/local/bin/prometheus

file /usr/local/bin/prometheus
/usr/local/bin/prometheus: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped

/usr/local/bin/prometheus --help
-bash: /usr/local/bin/prometheus: cannot execute binary file: Erro no formato exec 

Thanks

Nicholas Capo

unread,
Sep 19, 2018, 9:57:00 AM9/19/18
to Danilo fonseca martins, Prometheus Users
Hmmmmmm, what about the command `uname -a`?

Nicholas



Danilo fonseca martins

unread,
Sep 19, 2018, 10:07:31 AM9/19/18
to Prometheus Users
That is..

uname -a
Linux raspberrypi 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l GNU/Linux

\BR

Nicholas Capo

unread,
Sep 19, 2018, 10:13:26 AM9/19/18
to Danilo fonseca martins, Prometheus Users
Ah, right.
So what you downloaded is a binary for amd64, but the RaspberryPi has an ARM processor, so that binary won't work.

Try the linux/armv7 download at https://prometheus.io/download/#prometheus

Nicholas



Danilo fonseca martins

unread,
Sep 19, 2018, 10:31:40 AM9/19/18
to Prometheus Users
Hi Nicholas,

It worked!!

Thanks a lot man!

\BR
Danilo

Ben Kochie

unread,
Sep 19, 2018, 12:05:51 PM9/19/18
to danf...@gmail.com, Prometheus Users
Just so you're aware, the Pi is not a great platform for Prometheus because the kernel is still 32-bit. Prometheus uses mmap to access the TSDB files. In 32-bit, this means that you can only have about 1.5GB of TSDB data before the process will OOM.

There's unfortunately nothing we can do about this besides recommend using an arm64 64-bit kernel on the Pi 3.

Danilo fonseca martins

unread,
Sep 19, 2018, 12:50:44 PM9/19/18
to sup...@gmail.com, promethe...@googlegroups.com
Thanks for this tip Ben!

Kunal Khandelwal

unread,
Nov 25, 2020, 3:19:53 AM11/25/20
to Prometheus Users
Hi Team,

I am facing an issue while starting Prometheus Service in Ubuntu., it's throwing the following:
systemctl status prometheus
● prometheus.service - Prometheus
   Loaded: loaded (/etc/systemd/system/prometheus.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-11-25 12:52:23 IST; 31min ago
 Main PID: 7451 (code=exited, status=2)

Nov 25 12:52:23 ARL-KUNAL systemd[1]: prometheus.service: Service hold-off time over, scheduling restart.
Nov 25 12:52:23 ARL-KUNAL systemd[1]: prometheus.service: Scheduled restart job, restart counter is at 5.
Nov 25 12:52:23 ARL-KUNAL systemd[1]: Stopped Prometheus.
Nov 25 12:52:23 ARL-KUNAL systemd[1]: prometheus.service: Start request repeated too quickly.
Nov 25 12:52:23 ARL-KUNAL systemd[1]: prometheus.service: Failed with result 'exit-code'.
Nov 25 12:52:23 ARL-KUNAL systemd[1]: Failed to start Prometheus.
Nov 25 12:52:36 ARL-KUNAL systemd[1]: /etc/systemd/system/prometheus.service:14: Unknown lvalue '--web.listen-addres
Nov 25 12:52:36 ARL-KUNAL systemd[1]: /etc/systemd/system/prometheus.service:14: Unknown lvalue '--web.listen-addres
Nov 25 12:52:36 ARL-KUNAL systemd[1]: /etc/systemd/system/prometheus.service:14: Unknown lvalue '--web.listen-addres

Can someone help me out ??

Christian Hoffmann

unread,
Nov 25, 2020, 3:31:58 AM11/25/20
to Kunal Khandelwal, Prometheus Users
Hi,

On 11/25/20 9:19 AM, 'Kunal Khandelwal' via Prometheus Users wrote:
> I am facing an issue while starting Prometheus Service in Ubuntu., it's
> throwing the following:
In the future, could you please start a new thread? The way you posted
makes it appear that your issue is somehow related to the one from Danilo.

> Nov 25 12:52:36 ARL-KUNAL systemd[1]:
> /etc/systemd/system/prometheus.service:14: Unknown lvalue
> '--web.listen-addres
>
> Can someone help me out ??
You're missing an "s". The proper name is --web.listen-address.

Also, the message sounds like systemd is complaining (not Prometheus).
This would mean that your .service file has a syntax error. Sounds like
an unintended line break or a missing line continuation character on the
previous line (\).

Kind regards,
Christian

Kunal Khandelwal

unread,
Nov 25, 2020, 3:40:51 AM11/25/20
to Prometheus Users
Hi Christian,

No, I didn't miss "s" that's cut, In my service file it has a proper name.

Well, here is my service file, can you tell me what I missed?

[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
Restart=on-failure
Group=prometheus
Type=simple
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/prometheus \
  --config.file=/etc/prometheus/prometheus.yml \
  --storage.tsdb.path=/var/lib/prometheus \
  --web.console.templates=/etc/prometheus/consoles \
  --web.console.libraries=/etc/prometheus/console_libraries \
  --web.listen-address=0.0.0.0:9090

SyslogIdentifier=prometheus
Restart=always

[Install]
WantedBy=multi-user.target



Christian Hoffmann

unread,
Nov 25, 2020, 3:53:21 AM11/25/20
to Kunal Khandelwal, Prometheus Users
Hi,

On 11/25/20 9:40 AM, 'Kunal Khandelwal' via Prometheus Users wrote:
> No, I didn't miss "s" that's cut, In my service file it has a proper name.
Ah, ok.

> Well, here is my service file, can you tell me what I missed?
I don't spot any obvious problems at the first glance. However, I do
notice that the file does not match the error message you posted. Line
14 in this file is the --config.file line, while the error message
refers to --web.listen-address.

I still suspect that this is a systemd problem.

Can you confirm that systemd loaded the most recent version ("systemctl
daemon-reload" if unsure)? Does the "systemctl cat prometheus.service"
output match what you posted?

Kind regards,
Christian
> --
> You received this message because you are subscribed to the Google
> Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to prometheus-use...@googlegroups.com
> <mailto:prometheus-use...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/6511c918-0aef-4cef-8677-16e4eed7bb8dn%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/6511c918-0aef-4cef-8677-16e4eed7bb8dn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Kunal Khandelwal

unread,
Nov 25, 2020, 3:58:59 AM11/25/20
to Christian Hoffmann, Prometheus Users
Hi,

Please find the following output:

root@ARL-KUNAL:/home/kunal/Documents/Prometheus/prometheus-2.22.2.linux-amd64# systemctl cat prometheus.service
# Warning: prometheus.service changed on disk, the version systemd has loaded is outdated.
# This output shows the current version of the unit's original fragment and drop-in files.
# If fragments or drop-ins were added or removed, they are not properly reflected in this output.
# Run 'systemctl daemon-reload' to reload units.
# /etc/systemd/system/prometheus.service

[Unit]
Description=Prometheus
#Documentation=https://prometheus.io/docs/introduction/overview/
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
Restart=on-failure
Group=prometheus
Type=simple
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/prometheus \
  --config.file=/etc/prometheus/prometheus.yml \
  --storage.tsdb.path=/var/lib/prometheus \
  --web.console.templates=/etc/prometheus/consoles \
  --web.console.libraries=/etc/prometheus/console_libraries \
  --web.listen-address=0.0.0.0:9090

SyslogIdentifier=prometheus
Restart=always


--
Thank You
Kunal Khandelwal | Site Reliability Engineer
Mobile.no.: 8982987243
"Nothing is permanent is this wicked world, not even our troubles."

Christian Hoffmann

unread,
Nov 25, 2020, 4:00:32 AM11/25/20
to Kunal Khandelwal, Prometheus Users
On 11/25/20 9:58 AM, 'Kunal Khandelwal' via Prometheus Users wrote:
> root@ARL-KUNAL:/home/kunal/Documents/Prometheus/prometheus-2.22.2.linux-amd64#
> systemctl cat prometheus.service
> # Warning: prometheus.service changed on disk, the version systemd has
> loaded is outdated.
> # This output shows the current version of the unit's original fragment
> and drop-in files.
> # If fragments or drop-ins were added or removed, they are not properly
> reflected in this output.
> # Run 'systemctl daemon-reload' to reload units.
^ I suggest first trying this.

Kind regards,
Christian
OpenPGP_0x2C1F41CF361CB280.asc
OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages