'Address already in use' errors

This error

1) Determine address being requested

If you are running a program and getting this error, then re-run it with strace to determine what address is being requested:

TODO, eg

$ strace nc -l 8080 2>&1 | grep bind
bind(3, {sa_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr(“0.0.0.0”)}, 16) = -1 EADDRINUSE (Address already in use)

2) Determine application holding the address

Solution 1

EADDRINUSE

You could leave a comment if you were logged in.