node_exporter listen only ipv6 unless specifying the actual ipv4 address

Created on 22 Aug 2017  路  3Comments  路  Source: prometheus/node_exporter

Host operating system: output of uname -a

RHEL 6.5: 2.6.32-431.el6.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
RHEL 7.3: 3.10.0-514.el7.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter, version 0.14.0 (branch: master, revision: 840ba5dcc71a084a3bc63cb6063003c1f94435a6)
build user: root@bb6d0678e7f3
build date: 20170321-12:12:54
go version: go1.7.5

node_exporter command line flags

-web.listen-address=0.0.0.0:9100

Are you running node_exporter in Docker?

no

What did you do that produced an error?

start node_exporter

What did you expect to see?

I was expecting node_exporter to listen on tcp4 & port 9100

What did you see instead?

node exporter is listening only on tcp6

Unlike the behavior described in https://github.com/prometheus/node_exporter/issues/264, I have to provide an actual ipv4 address to make node_exporter listen to ipv4 (like 127.0.0.1 which is useless for remote monitoring, or 192.168.0.21 which is not fun).

Most helpful comment

Please try -web.listen-address=:9100 instead. This seems to be an issue with golang and not node_exporter. I found https://github.com/golang/go/issues/9334 after a short look, there are more relevant issues.

All 3 comments

Please try -web.listen-address=:9100 instead. This seems to be an issue with golang and not node_exporter. I found https://github.com/golang/go/issues/9334 after a short look, there are more relevant issues.

@grobie thank you very much, it works just fine.

I have tried this way before, but netstat was reporting only tcp6 so I never actually tried to connect to the service.
tcp6 0 0 :::9100 :::* LISTEN 20486/node_exporter

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sirtux picture sirtux  路  4Comments

jicanghaixb picture jicanghaixb  路  5Comments

lesovsky picture lesovsky  路  3Comments

mInrOz picture mInrOz  路  5Comments

belm0 picture belm0  路  4Comments