Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 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
share|improve this answer
    
Thank you.Now I changed the port number and used nc command with new port number.Now it just hangs.It works with TCP and gives 'connection established' message. –  CodeBot Jun 6 '13 at 4:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.