# Prometheus.service: Failed with result 'exit-code'. - fresh install, advice wanted

**URL:** <https://discuss.prometheus.io/t/prometheus-service-failed-with-result-exit-code-fresh-install-advice-wanted/1404>\
**Category:** General Help/Support\
**Created:** [January 19, 2023, 4:28pm UTC](https://discuss.prometheus.io/t/prometheus-service-failed-with-result-exit-code-fresh-install-advice-wanted/1404 "2023-01-19T16:28:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skeptical.me](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/skeptical.me/32/608_2.png) [@Skeptical.me](https://discuss.prometheus.io/u/Skeptical.me)\
**Post date:** [January 19, 2023, 4:28pm UTC](https://discuss.prometheus.io/t/prometheus-service-failed-with-result-exit-code-fresh-install-advice-wanted/1404/1 "2023-01-19T16:28:23Z")

</div>

I just installed Promethus on my Raspberry Pi 4 (Raspbian Lite)

After doing so, I ran the command

```auto
sudo systemctl status prometheus

```

This is what it returned:

```auto
prometheus.service - Prometheus Server
     Loaded: loaded (/etc/systemd/system/prometheus.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-01-20 02:59:30 AEDT; 39s ago
       Docs: https://prometheus.io/docs/introduction/overview/
    Process: 810 ExecStart=/home/pi/prometheus/prometheus --config.file=/home/pi/prometheus/prometheus.yml --storage.tsdb.path=/home/pi/prometheus/data (code=exited, status=2)
   Main PID: 810 (code=exited, status=2)
        CPU: 480ms

Jan 20 02:59:30 pihole systemd[1]: prometheus.service: Scheduled restart job, restart counter is at 5.
Jan 20 02:59:30 pihole systemd[1]: Stopped Prometheus Server.
Jan 20 02:59:30 pihole systemd[1]: prometheus.service: Start request repeated too quickly.
Jan 20 02:59:30 pihole systemd[1]: prometheus.service: Failed with result 'exit-code'.
Jan 20 02:59:30 pihole systemd[1]: Failed to start Prometheus Server.

```

I’m just seeking some advice as to how I can resolve this issue.

---

<div class="post-metadata">

**Author:** ![stuart](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/stuart/32/18_2.png) [@stuart](https://discuss.prometheus.io/u/stuart)\
**Post date:** [January 19, 2023, 7:36pm UTC](https://discuss.prometheus.io/t/prometheus-service-failed-with-result-exit-code-fresh-install-advice-wanted/1404/2 "2023-01-19T19:36:02Z")

</div>

I would suggest using journalctl to get exact details of the error returned by Prometheus.

However the two common things to check are that the Prometheus user can write to the path specified (/home/pi/prometheus/data) and that the Prometheus YAML file is valid and readable by the Prometheus user (/home/pi/prometheus/prometheus.yml).

---

<div class="post-metadata">

**Author:** ![Skeptical.me](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/skeptical.me/32/608_2.png) [@Skeptical.me](https://discuss.prometheus.io/u/Skeptical.me)\
**Post date:** [January 22, 2023, 4:21am UTC](https://discuss.prometheus.io/t/prometheus-service-failed-with-result-exit-code-fresh-install-advice-wanted/1404/5 "2023-01-22T04:21:42Z")

</div>

I ran the test:

sudo -u pi test -r /home/pi/prometheus/data

and

sudo -u pi test -w /home/pi/prometheus/data

test -r /home/pi/prometheus/data; echo “$?”

returned: 0

test -w /home/pi/prometheus/data; echo “$?”

returned: 0

So it can read the data.

Could you help me diagnose this yaml checker?

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/prometheus/original/1X/2c31503770a04e9a69f93c49a94e6814c499d0f0.jpeg)

---

<div class="post-metadata">

**Author:** ![Skeptical.me](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/skeptical.me/32/608_2.png) [@Skeptical.me](https://discuss.prometheus.io/u/Skeptical.me)\
**Post date:** [January 22, 2023, 4:57am UTC](https://discuss.prometheus.io/t/prometheus-service-failed-with-result-exit-code-fresh-install-advice-wanted/1404/6 "2023-01-22T04:57:24Z")

</div>

![image](https://europe1.discourse-cdn.com/flex017/uploads/prometheus/original/1X/631be7e787dbaae739106bb75f61eadcaa29cc70.jpeg)

---

<div class="post-metadata">

**Author:** ![Skeptical.me](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/skeptical.me/32/608_2.png) [@Skeptical.me](https://discuss.prometheus.io/u/Skeptical.me)\
**Post date:** [January 22, 2023, 8:00am UTC](https://discuss.prometheus.io/t/prometheus-service-failed-with-result-exit-code-fresh-install-advice-wanted/1404/7 "2023-01-22T08:00:28Z")

</div>

Never mind, I followed this and all is working

> **[Installing Prometheus to the Raspberry Pi](https://pimylifeup.com/raspberry-pi-prometheus/comment-page-1/?unapproved=88860&moderation-hash=eb0621634ab7ba6dc7ebd2aaab070ca7#comment-88860)**
>
> A simple data monitoring solution
