无法将本地主机:8000与Google App Engine绑定 [英] Unable to bind local host:8000 with Google App Engine
问题描述
我试图在Google App Engine中运行Python应用程序。 UI不起作用,所以我尝试使用命令行。我试过重新启动我的电脑,我尝试用dev_appserver.py --port = 9999更改端口。但它仍然表示无法绑定localhost:8000
:
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
推荐答案
应用服务器启动两台服务器;一个用于您的应用程序,另一个用于开发控制台。这是导致问题的第二台服务器;它通常会在8000端口上运行。
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.
用 - admin_port
更改开发控制台的IP地址。 switch:
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.
另请参阅< dev_appserver.py
Also see the command-line arguments documentation for dev_appserver.py
.
这篇关于无法将本地主机:8000与Google App Engine绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!