On Thu, May 27, 2010 at 10:07 AM, daniel <[email protected]> wrote: > When I launch the server: > > $ paster serve --reload development.ini > > The server starts and I'm asked for the pem pass phrase ( .. Enter PEM > pass phrase:). After entering it I get the following portion of an > error and the server exit: > > HTTPServer.__init__(self, server_address, RequestHandlerClass) > File "/usr/lib/python2.6/SocketServer.py", line 400, in __init__ > self.server_bind() > File "/usr/lib/python2.6/BaseHTTPServer.py", line 108, in > server_bind > SocketServer.TCPServer.server_bind(self) > File "/usr/lib/python2.6/SocketServer.py", line 411, in server_bind > self.socket.bind(self.server_address) > File "<string>", line 1, in bind > socket.error: [Errno 13] Permission denied
The error suggests you're trying to open a privileged port as a non-privileged user. Ports lower than 1024 (including 80 for HTTP and 443 for HTTPS) can only be opened by root/administrator. For testing, just use a high port. For production, you'd need to launch the program as root and have it switch users after opening the port (so that it wouldn't have admin privileges when processing requests). If I'm reading the source correctly, Paster can do this as a command-line option --user, but not by an INI option. (paste/script/serve.py. paste/httpserver.py). So it looks like it changes user before instantiating the server, which would be useless for you. You can try a 'user' variable in the INI file and see if it works, or ask on the Paste list. (Note: this all may work differently on Windows.) You'll probably have to delete the passphrase for production, because otherwise it can't autostart at boot. The usual solution to this is to launch the program as root, and make sure only root as read access to the secret key file. -- Mike Orr <[email protected]> -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
