5

Node Exporter is always running on my local machine on localhost:9100 even if I don't execute it with terminal following this error message:

FATA[0000] listen tcp :9100: bind: address already in use  source="node_exporter.go:172"

By which I can understand that this port number is already being used by another application but the thing is I don't have anything hosted there. This is what netstat | grep 9100 gives:

tcp        0      0 localhost:60232         localhost:9100          ESTABLISHED
tcp6       0      0 localhost:9100          localhost:60232         ESTABLISHED
ageladas
  • 144
  • 1
  • 10
  • 1
    Did you try `netstat -nlp` ? It should show you the process. – Michael Doubez May 25 '19 at 22:43
  • Yep, as @MichaelDoubez suggested, you need to get the name of the process that's using that port. Note that you probably need to be root to find the actual process name. On my systems, I use: ``` sudo ss -tlnp | grep 9100 LISTEN 0 128 *:9100 *:* users:(("node_exporter",pid=15947,fd=3)) ``` Since `node_exporter` is typically what's running on `9100`, you might also just `killall node_exporter` (assuming this isn't a live production system) – erwin May 27 '19 at 08:27
  • @MichaelDoubez thank you for you help, I saw that was being a conflict in this port caused by the many attempts of me trying to set up and configure Node Exporter. – ageladas May 27 '19 at 08:31

2 Answers2

2

All I had to do was to "kill" the 9100 port in which Node Exporter was running by using fuser -k 9100/tcp as this was shown on How to kill a process running on particular port in Linux?.

ageladas
  • 144
  • 1
  • 10
0

For me, this problem occured when i was trying to start node exporter using a binary file ./node-exporter while the node exporter service was running on the background.

If fuser -k 9100/tcp did not work in your case, try checking the status of the node exporter service:

sudo service prometheus-node-exporter status

If it is active, then disable it:

sudo service prometheus-node-exporter stop

Then you can run your binary file with ./node-exporterand that should do it.

albdev
  • 43
  • 5