Able to specify bind port, but not address

30 views
Skip to first unread message

jumble

unread,
Aug 4, 2020, 9:23:33 AM8/4/20
to Prometheus Users

Latest prometheus, on RHEL8.


Tried command: ./prometheus
Expected behavior: bind to 0.0.0.0:9090
Observed behavior: bound to 127.0.0.1:9090


Tried command: ./prometheus --web.listen-address=0.0.0.0:9090
Expected behavior: bind to 0.0.0.0:9090
Observed behavior: bound to 127.0.0.1:9090


Tried command: ./prometheus --web.listen-address=0.0.0.0:9000
Expected behavior: bind to 0.0.0.0:9000
Observed behavior: bound to 127.0.0.1:9000

jumble

unread,
Aug 4, 2020, 9:46:52 AM8/4/20
to Prometheus Users
"latest prometheus" -> prometheus-2.20.0.linux-amd64

Christian Hoffmann

unread,
Aug 5, 2020, 6:23:03 AM8/5/20
to jumble, Prometheus Users
Hi,

On 8/4/20 3:23 PM, jumble wrote:
> Latest prometheus, on RHEL8.
>
> Observed behavior: bound to |127.0.0.1:9090|

This sounds unexpected. Are you using the official binaries from
prometheus.io / github?

Can you share the exact logs from your experiments?

Is it possible that you've got multiple Prometheus installations, i.e.
one that is already running (bound to localhost) and the one where you
tried to run experiments?

I suggest checking the process list (ps aux | grep prometheus), watching
the logs for "address already in use" messages and/or trying a different
port.

It would be really surprising if this was a bug in Prometheus, Go or
RHEL8. But who knows :)

Kind regards,
Christian

jumble

unread,
Aug 10, 2020, 6:22:30 PM8/10/20
to Prometheus Users
Christian,

Thanks for your response! After a second look, the perceived bug was actually a combination of two non-Prometheus issues:

- Other firewall rules were preventing connections to port 9090.
- I misread netstat's output- Prometheus was binding to port 9090 for all IPv6 addresses and _implicitly_ binding in IPV4 (this binding isn't printed in netstat!)

Hope you and yours are well,
John
Reply all
Reply to author
Forward
0 new messages