Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node_exporter listen only ipv6 unless specifying the actual ipv4 address #654

Closed
alexandrul opened this issue Aug 22, 2017 · 4 comments
Closed

Comments

@alexandrul
Copy link

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: 840ba5d)
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 #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).

@grobie
Copy link
Member

grobie commented Aug 22, 2017

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

@alexandrul
Copy link
Author

@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

@grobie
Copy link
Member

grobie commented Aug 22, 2017

Here is an explanation for that: https://unix.stackexchange.com/questions/237731/why-are-ipv4-tcp-connections-showing-as-tcp6/237747#237747

@sahapasci
Copy link

sahapasci commented Nov 5, 2022

TLtR: curl 127.0.0.1:9100/metrics works even netstat -nlp shows tcp6 0 0 :::9100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants