Mac OS X resolved socket.error: [Errno 48] Address already in use Port occupation problem


Using the GAE engine in OS x to science onlinegoagentorwallproxy,May occur during the boot process the following error then the service does not start successfully。


Actually it is because you have to start the same or similar services for the port,usually,Start with Python on the Mac directly,Causes an exit is not complete,You can't GUI by clicking on the "exit" button to stop,There is a background of the Python process,And it is always occupied port does not release the culprit。


One is to get rid of the default80878086port,The other one,Is to kill occupation of port procedures。

The former immediate,But the disadvantage is that you cannot change in a day,If because of other occupied ports has to say,If exit is not complete? So,The latter is a stopgap solution。But wanted to see the program occupied the port,Should be introduced the following content:

Lsof command


lsof(List open files) command is a list of the currently opened file tool。Under in the UNIX environment,Everything exists as a file,Through the file not only can access a common data,Can also access the network connectivity and hardware。So we use it to find the occupation of port procedures,See whether the conflicts are not errors。

lsof -i To display the qualifying process

So,We use the following command to find out the occupation of a port program and the corresponding PID

Then use the following command to kill the corresponding process:

correct,If you want to see what this program is,Here is not recommended to use the command line to complete the,of course,Again use the lsof command can be,Make or recommend you to use "active monitor" to find PID--after all,The graphics capabilities of the system。

Original article written by Gerber drop-off:R0uter's Blog » Mac OS X resolved socket.error: [Errno 48] Address already in use Port occupation problem

Reproduced Please keep the source and description link:

About the Author


The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。


Leave a Reply

Your email address will not be published. Required fields are marked *