Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Everytime I run nginx listening on port 8000, It can't bind since address is already in use, so I ran: lsof -i:8000 and it shows:

nginx   27156 marconi    6u  IPv4  58814      0t0  TCP *:irdmi (LISTEN)

I can kill it but starting nginx gain spawns that process again. What's really happening and how do I stop it?

This used to work before and irdmi doesn't show up but I don't know what I did.

share|improve this question
add comment

1 Answer

netstat and lsof will try to be friendly and give you the servicename of the port. What the line of output is saying, is not that something named irdmi is running on port 8000 - it's saying that nginx is listening on port 8000. This is fetched from /etc/services.

Run

# lsof -i:8000 -n

to avoid this translation from happening. (It will also avoid doing name resolving from IP-addresses)

I suspect that you have a line in /etc/services that looks like this (my suspicion is based on google searches that confirm that this isn't uncommon):

irdmi               8000/tcp

The error message you're seeing is not about that port, as it seems to get up as it should.

share|improve this answer
    
So should I comment it out then or is it something that really should be there and shouldn't be touched? –  Marconi Oct 15 '11 at 23:14
1  
The content of /etc/services doesn't have any practical meaning at all. It's only to help you contextualize the output of certain applications (such as lsof and netstat). It is safe to comment it out, to avoid confusion. –  Kvisle Oct 15 '11 at 23:17
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.