gpt4 book ai didi

google-app-engine - 如何解决 'Unable to find consistent port localhost' App Engine 错误?

转载 作者:太空宇宙 更新时间:2023-11-03 15:26:22 26 4
gpt4 key购买 nike

我试图运行 Google App Engine 只是为了启动一个 hello world 应用程序,但一直失败。我在 Windows 7 上,并尝试使用 GUI 启动器和 Cygwin 终端。遵循了 SO 论坛 ( Failed to start devlopment server -- BindError: Unable to find a consistent port localhost ) 和其他人的许多不同建议:

-我已将 etc/hosts 文件中的 localhosts 条目编辑为 127.0.0.1

-我已经重新安装了 Google App Engine 包

-尝试编辑 .yaml 和 main.py 文件

-尝试将端口更改为 9000 和 8888

- 尝试明确指定我正在启动的主机? (例如:--skip_sdk_update_check=yes --port=8080 --admin_port=8000 --host 127.0.0.1)

-专门尝试允许应用引擎启动器通过防火墙进行通信

还没有什么不同。

错误信息如下:

"2013-07-13 16:35:05 Running command: "['C:\\Python27\\python.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000', u'C:\\Users\\Greg\\hello-udacity']"
INFO 2013-07-13 16:35:12,631 devappserver2.py:528] Skipping SDK update check.
WARNING 2013-07-13 16:35:12,655 api_server.py:314] Could not initialize images API; you are likely missing the Python "PIL" module.
WARNING 2013-07-13 16:35:12,660 simple_search_stub.py:955] Could not read search indexes from c:\users\greg\appdata\local\temp\appengine.hello-udacity\search_indexes
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 182, in <module>
_run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 178, in _run_file
execfile(script_path, globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 695, in <module>
main()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 688, in main
dev_server.start(options)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 659, in start
apis.start()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\api_server.py", line 137, in start
super(APIServer, self).start()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\wsgi_server.py", line 298, in start
raise BindError('Unable to find a consistent port %s' % host)
google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to find a consistent port localhost
2013-07-13 16:35:12 (Process exited with code 1)"

最佳答案

从错误消息看来,您正在显式传递 --skip_sdk_update_check=yes --port=8080 --admin_port=8000

您是否尝试过指定要启动的主机?例如:

--skip_sdk_update_check=yes --port=8080 --admin_port=8000 --host 127.0.0.1

另一个感兴趣的项目是暂时关闭您机器上运行的所有防火墙,看看是否有影响。

关于google-app-engine - 如何解决 'Unable to find consistent port localhost' App Engine 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17633881/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com