anirudh
anirudh

Reputation: 4176

"Unable to bind localhost:8000" error while running sample application in google app engine

I have just installed GAE launcher and am trying to run a sample application to make sure it works and I am getting the below error.

raise BindError('Unable to bind %s:%s' % self.bind_addr)
google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to bind localhost:8000
2014-03-24 10:54:54 (Process exited with code 1)

I am trying to run the python version of the app with python 2.7 and am using windows 8.1 operating system. I did not create any files for the app, I just created a new application and am trying to run it in localhost.

Can someone please tell me what this error means and how to fix it?

Upvotes: 8

Views: 8642

Answers (4)

Frank Nguyen
Frank Nguyen

Reputation: 6653

For me, I have to use both --admin-port and --port

dev_appserver.py --admin_port=9000 --port=9999 app.yaml 

Upvotes: 5

Sebastiano Tognacci
Sebastiano Tognacci

Reputation: 103

I hope it might help others using PyCharm to understand where to set the admin port to something different than 8000.

Go to your "Run/Debug configurations" and in the configuration tab, add the following into "additional options":

--admin_port=9000

PyCharm Run/Debug Configuration

Upvotes: 2

Vaseem Ahmed Khan
Vaseem Ahmed Khan

Reputation: 805

The app server starts two servers: one for your application, the other for development console.

Change the ip address for the development console with:

dev_appserver.py --admin_port=9000

Upvotes: 8

Martin Berends
Martin Berends

Reputation: 4178

Another process is already bound to port 8000. Use netstat -an or netstat -anb or similar to investigate. It may be another instance of your development server.

Edit: If port 8000 is really occupied, Command-line arguments in the The Python Development Server says you can append --admin_port to change the 8000 to another free port.

Upvotes: 7

Related Questions