I have a flask app wrapped in a tornado server and I was trying to run app on a remote server when I got this error:
Traceback (most recent call last):
File "run.py", line 7, in <module>
server.listen(80)
File "/home/ec2-user/gatekeeper/local/lib/python2.7/site-packages/tornado/tcpserver.py", line 126, in listen
sockets = bind_sockets(port, address=address)
File "/home/ec2-user/gatekeeper/local/lib/python2.7/site-packages/tornado/netutil.py", line 187, in bind_sockets
sock.bind(sockaddr)
File "/usr/lib64/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 13] Permission denied
So I tried to use sudo
and I got this:
Traceback (most recent call last):
File "run.py", line 1, in <module>
from tornado.wsgi import WSGIContainer
ImportError: No module named tornado.wsgi
So I am wondering if I must install tornado as root which will in turn mean that my virtualenv
is practically useless.