Prometheus.service status failed

52 views
Skip to first unread message

Suryaprakash Kancharlapalli

unread,
Sep 14, 2020, 7:32:25 AM9/14/20
to Prometheus Users
Hi All,

As i have setup the Prometheus configuration using from the binary. But in the end when i start the service it shows like Prometheus startup service failed. Please find the attached snap for reference. Can some suggest what could be the reason and how can i resolve it.

Thank You,
Surya

Capture.JPG

Wesley Peng

unread,
Sep 14, 2020, 7:35:16 AM9/14/20
to promethe...@googlegroups.com
are you running 64bit program on the 32bit OS, or reverse?

regards.

Suryaprakash Kancharlapalli

unread,
Sep 14, 2020, 7:44:49 AM9/14/20
to Wesley Peng, promethe...@googlegroups.com
Hi Wesley,

I am using 64bit program on 64 bit OS
 

Thanks & Regards,
Surya Prakash K
Cloud & Devops Engineer
M:+91-91544 63598.


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/57ce9c9b-e7c3-5089-d3f2-2004c047c839%40pobox.com.

Brian Candler

unread,
Sep 14, 2020, 7:59:23 AM9/14/20
to Prometheus Users
Can you show the full line which starts "Stopping scrape discovery" ?

journalctl --no-pager -eu prometheus

(Aside: please copy-paste text, don't submit screenshots)

Also, what command-line flags are you passing to prometheus?  Can you paste your prometheus configuration file, and your systemd unit file.

Suryaprakash Kancharlapalli

unread,
Sep 14, 2020, 8:38:38 AM9/14/20
to Brian Candler, Prometheus Users
Hi Brian,

Capture.JPG
Please find the above snap

Thanks & Regards,
Surya Prakash K
Cloud & Devops Engineer
M:+91-91544 63598.

--
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.

Brian Candler

unread,
Sep 14, 2020, 8:46:02 AM9/14/20
to Prometheus Users
Unfortuantely, that doesn't help.

Please provide contents of:
- your systemd unit file (could be /etc/systemd/system/prometheus.service)
- your prometheus configuration file (/etc/prometheus/prometheus.yml)

Please DON'T make any more screenshots.  Use text copy-paste: that is, select the text, and paste it into the message.

Suryaprakash Kancharlapalli

unread,
Sep 14, 2020, 8:55:35 AM9/14/20
to Brian Candler, Prometheus Users
Brian,

Here is the text below
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
Group=prometheus
Type=simple
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

[Install]
WantedBy=multi-user.target
Thanks & Regards,
Surya Prakash K
Cloud & Devops Engineer
M:+91-91544 63598.

--
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.

Brian Candler

unread,
Sep 14, 2020, 9:26:39 AM9/14/20
to Prometheus Users
That's much easier to read, thank you.

I can't see any problem with the unit file - as long as /var/lib/prometheus is owned by the "prometheus" user.

What about the contents of the configuration file, /etc/prometheus/prometheus.yml ?

Suryaprakash Kancharlapalli

unread,
Sep 14, 2020, 9:42:41 AM9/14/20
to Brian Candler, Prometheus Users
Yes,  /var/lib/prometheus is owned by the "prometheus" user. 

And /etc/prometheus/prometheus.yml content is below
global:
  scrape_interval: 10s

scrape_configs:
  - job_name: 'prometheus'
    scrape_interval: 5s
    static_configs:
      - targets: ['localhost:9090']
      - targets: ['localhost:9100']
 
Thanks & Regards,
Surya Prakash K
Cloud & Devops Engineer
M:+91-91544 63598.

--
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.

sayf.eddi...@gmail.com

unread,
Sep 14, 2020, 9:54:47 AM9/14/20
to Prometheus Users
Did you try having only one entry of `targets` where you put both addresses in one list ?

Brian Candler

unread,
Sep 14, 2020, 10:06:32 AM9/14/20
to Prometheus Users
That config ought to be fine.

I just noticed that you appear to be running a pretty ancient version of prometheus (2.3.2 - released July 2018).  Is there any reason for running something so old?  I still don't see why it should crash, but very few people are going to have something so old to compare against.

If you really want to debug this old version, the only other thing I can suggest is running it under strace, so that you can see what system calls it makes just before it decides to crash.

Suryaprakash Kancharlapalli

unread,
Sep 14, 2020, 10:33:04 AM9/14/20
to Brian Candler, Prometheus Users
No actually I am just following the below article



--
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.

Suryaprakash Kancharlapalli

unread,
Sep 14, 2020, 10:51:39 AM9/14/20
to Brian Candler, Prometheus Users
Brian, 

strace command you want me to run

Brian Candler

unread,
Sep 14, 2020, 11:17:07 AM9/14/20
to Prometheus Users
The article looks fine, it's just very old.  Replace 2.3.2 with latest version 2.21.0 from https://github.com/prometheus/prometheus/releases

One of the comments says that using multiple targets under a single static_configs section is problematic.  That seems weird, but to rule it out you could try: 

scrape_configs:
  - job_name: 'prometheus'
    scrape_interval: 5s
    static_configs:
      - targets: ['localhost:9090','localhost:9100']

Suryaprakash Kancharlapalli

unread,
Sep 15, 2020, 2:09:34 AM9/15/20
to Brian Candler, Prometheus Users
Thank you Brian, version 2.21 worked for me

--
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.
Reply all
Reply to author
Forward
0 new messages