. Advertisement .
..3..
. Advertisement .
..4..
I get the “socket.error: [errno 98] address already in use” issue when trying to setup application.py.
Here is the detail of the error I got the error message:
Traceback (most recent call last):
File "application.py", line 121, in <module>
main()
File "application.py", line 117, in main
http_server.listen(options.port)
File "/usr/local/lib/python2.7/site-packages/tornado-3.1-py2.7.egg/tornado/tcpserver.py", line 117, in listen
sockets = bind_sockets(port, address=address)
File "/usr/local/lib/python2.7/site-packages/tornado-3.1-py2.7.egg/tornado/netutil.py", line 90, in bind_sockets
sock.bind(sockaddr)
File "/usr/local/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
Please give me some advice to solve this problem.
The cause: This error happens perhaps because another process is plainly listening on the port.
The solution: To fix this error, you can use the following command:
or change the port of your Tornado app.
It is likely that another process is listening to the port. This command might help you find that process:
or change your tornado app’s port. This is explicit information about the tornado’s errors.