Error when installing Prometheus

Hello Everybody,

I installed prometheus on my master server and when trying to start the service i have this error message

systemctl status prometheus

● prometheus.service - Prometheus
Loaded: loaded (/etc/systemd/system/prometheus.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-02-25 17:35:00 GMT; 8s ago
Process: 9625 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=1/FAILURE)
** Main PID: 9625 (code=exited, status=1/FAILURE)**

Feb 25 17:35:00 master1.bull.local prometheus[9625]: level=info ts=2020-02-25T17:35:00.793576073Z caller=manager.go:736 componen…er…"
Feb 25 17:35:00 master1.bull.local prometheus[9625]: level=info ts=2020-02-25T17:35:00.793595565Z caller=manager.go:742 componen…opped"
Feb 25 17:35:00 master1.bull.local prometheus[9625]: level=info ts=2020-02-25T17:35:00.798715752Z caller=main.go:539 msg=“Scrape…opped”
Feb 25 17:35:00 master1.bull.local prometheus[9625]: level=info ts=2020-02-25T17:35:00.798773632Z caller=main.go:505 msg=“Scrape…opped”
Feb 25 17:35:00 master1.bull.local prometheus[9625]: level=info ts=2020-02-25T17:35:00.810227414Z caller=notifier.go:521 compone…er…"
Feb 25 17:35:00 master1.bull.local prometheus[9625]: level=info ts=2020-02-25T17:35:00.810282423Z caller=main.go:708 msg=“Notifi…opped”
Feb 25 17:35:00 master1.bull.local prometheus[9625]: level=error ts=2020-02-25T17:35:00.810304207Z caller=main.go:717 err=“error…n use”
Feb 25 17:35:00 master1.bull.local systemd[1]: prometheus.service: main process exited, code=exited, status=1/FAILURE
Feb 25 17:35:00 master1.bull.local systemd[1]: Unit prometheus.service entered failed state.
Feb 25 17:35:00 master1.bull.local systemd[1]: prometheus.service fail

and this error when i’m trying to get the prometheus web page

http://127.0.0.1:9090/graph

404 Not Found

The path ‘/graph’ was not found.

Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py”, line 656, in respond
response.body = self.handler()
File “/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py”, line 188, in call
self.body = self.oldhandler(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/cherrypy/_cperror.py”, line 386, in call
raise self
NotFound: (404, “The path ‘/graph’ was not found.”)

Powered by CherryPy 3.2.2

The actual helpful actual error message is in the abbreviated segments, here:

Feb 25 17:35:00 master1.bull.local prometheus[9625]: level=info ts=2020-02-25T17:35:00.810282423Z caller=main.go:708 msg=“Notifi…opped”
Feb 25 17:35:00 master1.bull.local prometheus[9625]: level=error ts=2020-02-25T17:35:00.810304207Z caller=main.go:717 err=“error…n use”

You’ll probably need to find a more complete log output to work out what the problem is. Possibly the port it’s trying to bind is already in use?

Hi Iki,
You’re right, i found the solution. The port was already used by another application. I just stopped the app and lunched prometheus.

Thx