Reputation: 31
Thanks for your expertise, everyone. We're running a python server using Cherrypy to expose/handle our API. This use to run fine before upgrading Ubuntu 10.10 to 11.04 (with inherent python updates), but, unfortunately, since then CherryPy does not bind to port 80 (using a proxy port 9998). The error dump is as follows:
2015-03-24 23:21:16,610 cherrypy.error - INFO - [24/Mar/2015:23:21:16] ENGINE PID 17194 written to '/var/tmp/MYSERVERNAME.pid'.
2015-03-24 23:21:16,611 cherrypy.error - INFO - [24/Mar/2015:23:21:16] ENGINE Started monitor thread '_TimeoutMonitor'.
2015-03-24 23:21:16,611 cherrypy.error - INFO - [24/Mar/2015:23:21:16] ENGINE Started monitor thread 'Autoreloader'.
2015-03-24 23:21:21,771 cherrypy.error - ERROR - [24/Mar/2015:23:21:21] ENGINE Error in 'start' listener <bound method Server.start of <cherrypy._cpserver.Server object at 0x12ffa90>>
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/cherrypy/process/wspbus.py", line 147, in publish
output.append(listener(*args, **kwargs))
File "/usr/lib/pymodules/python2.7/cherrypy/_cpserver.py", line 90, in start
ServerAdapter.start(self)
File "/usr/lib/pymodules/python2.7/cherrypy/process/servers.py", line 60, in start
self.wait()
File "/usr/lib/pymodules/python2.7/cherrypy/process/servers.py", line 101, in wait
wait_for_occupied_port(host, port)
File "/usr/lib/pymodules/python2.7/cherrypy/process/servers.py", line 266, in wait_for_occupied_port
raise IOError("Port %r not bound on %r" % (port, host))
IOError: Port 9998 not bound on '127.0.0.1'
Running netstat to see what is occupying the port shows:
alpha$ sudo netstat -pnl | grep 8080
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 17194/python
As you can see, the python server with PID 17194 starts up, starts cherrypy (which fails). I'm not sure what's colliding with what here. As you can probably tell, I'm not a server guy but that doesn't stop me from mucking around and messing things up! Anyone have a clue why CherryPy might not be binding?
Upvotes: 0
Views: 1269
Reputation: 31
I uninstalled CherryPy and reinstalled CherryPy to the latest (3.2), and the problem resolved itself.
Upvotes: 2