Networking – netcat udp address already in use

networkingudp

I am trying get a response from the server by using the command echo 'my message' | nc -l -u 127.0.0.1 2947

But I get nc:Address already in use. for a response. How do find the reason for this message?

Best Answer

A process is probably already listening on UDP port 2947. You can get the PID of the process by running:

fuser -n udp 2947

Or browse the list of listening UDP ports to find your process:

netstat -plun
Related Question