# Failed to fetch prometheus metrics error despite port changed in all config files

**URL:** <https://discourse.crowdsec.net/t/failed-to-fetch-prometheus-metrics-error-despite-port-changed-in-all-config-files/821>\
**Category:** crowdsec\
**Created:** [May 29, 2022, 5:22pm UTC](https://discourse.crowdsec.net/t/failed-to-fetch-prometheus-metrics-error-despite-port-changed-in-all-config-files/821 "2022-05-29T17:22:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewF](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/andrewf/32/697_2.png) [@AndrewF](https://discourse.crowdsec.net/u/AndrewF)\
**Post date:** [May 29, 2022, 5:22pm UTC](https://discourse.crowdsec.net/t/failed-to-fetch-prometheus-metrics-error-despite-port-changed-in-all-config-files/821/1 "2022-05-29T17:22:03Z")

</div>

Since the default port `8080` is used by other service I have changed it to `7373` editing these files

```auto
config.yaml
local_api_credentials.yaml
crowdsec-firewall-bouncer.yaml

```

and replaced all `8080` port entries with `7373`.

Doing this the crowdsec service starts without crash and apparently seems running correctly but unfortunately when I launch  
`cscli metrics -u http://localhost:7373`  
I get the error

> failed to fetch prometheus metrics : GET request for URL “[http://localhost:7373/metrics](http://localhost:7373/metrics)” returned HTTP status 404 Not Found

and if I try to open `localhost:7373` in browser I get a 404 error too, without any page to confirm crowdsed is up and running, but service status results active with a crowdsec service listening on port `7373` and another listening on port `6060` as specified in config

I use Debian Bullseye on ARM 64bit.

Note: before installing it I had already a Prometheus service running on port `9090`, but If i had understood correctly the prometheus port `6060` in CrowdSec config refers to the CrowdSec service where it supposed to fetch data.

---

<div class="post-metadata">

**Author:** ![thibault](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/thibault/32/2_2.png) [@thibault](https://discourse.crowdsec.net/u/thibault)\
**Post date:** [May 30, 2022, 8:05am UTC](https://discourse.crowdsec.net/t/failed-to-fetch-prometheus-metrics-error-despite-port-changed-in-all-config-files/821/2 "2022-05-30T08:05:16Z")

</div>

Hello,

Prometheus listen by defaults on port 6060. You can change it in your config.yaml :

```nohighlight
prometheus:
  enabled: true
  level: full
  listen_addr: 127.0.0.1
  listen_port: 6060

```
