Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to bind local host:8000 with Google App Engine

I am trying to run a Python app in Google App Engine. The UI doesn't work so I tried using the command lines. I tried restarting my PC, I tried changing port with "dev_appserver.py --port=9999 ." but it still says Unable to bind localhost:8000:

    raise BindError('Unable to bind %s:%s' % self.bind_addr)
google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to bind localhost:8000
like image 277
Paperbag Writer Avatar asked Nov 26 '14 17:11

Paperbag Writer


2 Answers

The app server starts two servers; one for your application, the other for the development console. It is that second server that is causing the problem here; it normally would be run on port 8000.

Change the ip address for the development console with the --admin_port switch:

dev_appserver.py --admin_port=9000

You may still want to change the port for the main application server too, of course.

Also see the command-line arguments documentation for dev_appserver.py.

like image 123
Martijn Pieters Avatar answered Oct 13 '22 04:10

Martijn Pieters


It is possible some application is binding to your port in autostart event. It's highly probable to be the same service you are trying to run. In that case try killing the process

ps -ef | grep 'process_name'

Use kill -9 'pid' to end the process.

like image 45
Nikunj Pandya Avatar answered Oct 13 '22 05:10

Nikunj Pandya