13
  File "C:\Python25\lib\SocketServer.py", line 330, in __init__
    self.server_bind()
  File "C:\Python25\lib\BaseHTTPServer.py", line 101, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "C:\Python25\lib\SocketServer.py", line 341, in server_bind
    self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
socket.error: (10013, 'Permission denied')

I tried to start up the Google App Engine development server and received this error the first time I tried to run it. Any ideas? I'm new to python.

SilentGhost
  • 264,945
  • 58
  • 291
  • 279

4 Answers4

22

It might be possible that you are trying to run on a port the current user account does not have permission to bind to. This could be port 80 or something. Try increasing the portnumber or use a user with sufficient privileges.

Hope this helps

TomHastjarjanto
  • 5,431
  • 1
  • 27
  • 42
  • I wonder why the error is not "Port already in use". I kind of know the answer but I should not need to use SO to know it. :) – OscarRyz May 13 '09 at 19:09
  • 3
    @Oscar if the port is in use, that is what python says ("error: (48, 'Address already in use')"). Sometimes users don't have permission to access ports below some number, which I presume is the case here. – llimllib Jul 04 '09 at 19:38
  • 1
    Worked for me with port 9000. Use --port=desired-port-number argument. – fjsj Apr 20 '10 at 19:23
  • If you're trying to use port 80 it will potentially raise an error because you don't have the right permissions. You must use this command "sudo dev_appserver.py --port=80 yourapp/" – Damien Jun 29 '12 at 07:23
  • Thanks! I mistyped my port. – Dan Abramov Jul 02 '13 at 12:46
  • ...or use authbind --deep – dat Aug 24 '15 at 02:12
3

I wonder why the error is not "Port already in use". I kind of know the answer but I should not need to use SO to know it. :) – Oscar Reyes May 13 at 19:09

The port is not in use, (in UNIX) you need to be superuser to listen on any port < 1024.

0

run it as follow. This should work

python -m 8888

if this does not work. Try other numbers like 8080.

Alaturqua
  • 1
  • 1
0

I am assuming your are using the default port assigned by gae sdk so you might want to ensure that it is not used by any other programs.

Bikal Lem
  • 2,333
  • 17
  • 18