应用程序无法在GAE上运行 - '无法绑定到localhost:0' [英] Apps won't run on GAE - 'unable to bind to localhost:0'

查看:126
本文介绍了应用程序无法在GAE上运行 - '无法绑定到localhost:0'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将Google App Engine升级到了1.7.7。并且因为未能在本地运行任何应用程序。这包括更新前工作的应用程序和自从我创建的应用程序。我还没有遇到任何其他引用这个特定问题'无法绑定到本地主机:0',所以任何深入了解这个障碍的见解将不胜感激。

我将包含今天添加的新Hello World应用的日志。在OS X 10.6.8上通过ActivePython使用Python 2.7。

  ***使用以下标志运行dev_appserver:
--skip_sdk_update_check = yes --port = 12084 - admin_port = 8007
Python命令:/ usr / local / bin / pythonw
INFO 2013-04-13 06:37:31,627 devappserver2.py:498]跳过SDK更新检查。
警告2013-04-13 06:37:31,691 api_server.py:328]无法初始化图像API;你可能会错过Python的PIL模块。
警告2013-04-13 06:37:31,692 simple_search_stub.py:977]无法读取/var/folders/ag/ag25hkLMFEG1p0pLBBX5Mk+++TI/-Tmp-/appengine.binderror.b/中的搜索索引search_indexes
Traceback(最近一次调用最后一次):
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py,第193行,在< module>
_run_file(__ file__,globals())
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py,第189行, _run_file
execfile(script_path,globals_)
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2。 py,第662行,在< module>
main()
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py,行655,主
dev_server.start(选项)
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2 /devappserver2.py,第626行,开始
apis.start()
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google /appengine/tools/devappserver2/api_server.py,第151行,启动
super(APIServer,self).start()
文件/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine- default.bundle / Contents / Resources / google_appengine / google / appengine / tools / devappserver2 / wsgi_server.py,第296行,开头
raise BindError('U nable to bind%s:%s'%self.bind_addr)
google.appengine.tools.devappserver2.wsgi_server.BindError:无法绑定localhost:0

更新:我可以通过GAE启动器部署'Hello World'应用程序,没有任何问题。我运行了命令 errinfo -c -n GoogleAppEngineLauncher.app ,它使用包含的 dtrace ,然后尝试运行三个应用程序,然后关闭它们。以下是输出结果:[/ b>]

  EXEC SYSCALL ERR COUNT DESC 
GoogleAppEngine madvise 12 1 Can not分配内存
GoogleAppEngine __disable_threadsignal 0 2
GoogleAppEngine访问权限0 3
GoogleAppEngine bsdthread_register 22 3无效参数
GoogleAppEngine chdir 0 3
GoogleAppEngine close_nocancel 0 3
GoogleAppEngine fcntl_nocancel 0 3
GoogleAppEngine分支0 3
GoogleAppEngine getdtablesize 0 3
GoogleAppEngine getpid 0 3
GoogleAppEngine open_nocancel 0 3
GoogleAppEngine setsid 0 3
GoogleAppEngine sigprocmask 0 3
GoogleAppEngine stat64 0 3
GoogleAppEngine wait4 0 3
GoogleAppEngine workq_open 0 3
GoogleAppEngine write 0 3
GoogleAppEngine lstat64 0 4
GoogleAppEngine pipe 0 6
GoogleAppEngine thread_selfid 0 6
GoogleAppEngine gettimeofday 0 7
GoogleAppEngine dup2 0 9
GoogleAppEngine madvise 0 17
GoogleAppEngine munmap 0 31
GoogleAppEngine mmap 0 33
GoogleAppEngine sigaction 0 87
GoogleAppEngine getattrlist 0 102
GoogleAppEngine fstat64 0 118
GoogleAppEngine开放0 118
GoogleAppEngine geteuid 0 208
GoogleAppEngine dup 0 10418
GoogleAppEngine读取0 10532
GoogleAppEngine关闭0 10584
GoogleAppEngine workq_kernreturn 0 20752
GoogleAppEngine关闭9 21459 Ba d文件描述符
GoogleAppEngine kevent 0 72543

8月2日16日:我安装了最新的版本的GAE启动器[1.8.3],现在一切正常。

解决方案

c> fuser -k 8080 / tcp ,这是一个适合我的解决方案:

  lsof -P | grep':8080'| awk'{print $ 2}'| xargs kill -9 


I recently upgraded Google App Engine to 1.7.7. and have not been able to run any apps locally since. This includes apps that worked before the update and apps I've created since. I haven't come across any other references to this specific problem 'Unable to bind to localhost:0,' so any insights into clearing this hurdle would be much appreciated.

I'm including the log for a new 'Hello World' app I added today. Using Python 2.7 via ActivePython on OS X 10.6.8.

*** Running dev_appserver with the following flags:
    --skip_sdk_update_check=yes --port=12084 --admin_port=8007
Python command: /usr/local/bin/pythonw
INFO     2013-04-13 06:37:31,627 devappserver2.py:498] Skipping SDK update check.
WARNING  2013-04-13 06:37:31,691 api_server.py:328] Could not initialize images API; you are likely missing the Python "PIL" module.
WARNING  2013-04-13 06:37:31,692 simple_search_stub.py:977] Could not read search indexes from /var/folders/ag/ag25hkLMFEG1p0pLBBX5Mk+++TI/-Tmp-/appengine.binderror.b/search_indexes
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py", line 193, in <module>
    _run_file(__file__, globals())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py", line 189, in _run_file
    execfile(script_path, globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 662, in <module>
    main()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 655, in main
    dev_server.start(options)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 626, in start
    apis.start()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 151, in start
    super(APIServer, self).start()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 296, in start
    raise BindError('Unable to bind %s:%s' % self.bind_addr)
google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to bind localhost:0

Update: I was able to deploy the 'Hello World' app through GAE Launcher without any issues. I ran the command errinfo -c -n GoogleAppEngineLauncher.app, which uses the included dtrace, and then attempted to run three apps, then closed them. Here is the output [which is somewhat beyond me]:

           EXEC          SYSCALL  ERR  COUNT  DESC
 GoogleAppEngine          madvise   12      1  Cannot allocate memory 
 GoogleAppEngine __disable_threadsignal    0      2 
 GoogleAppEngine           access    0      3 
 GoogleAppEngine bsdthread_register   22      3  Invalid argument 
 GoogleAppEngine            chdir    0      3 
 GoogleAppEngine   close_nocancel    0      3 
 GoogleAppEngine   fcntl_nocancel    0      3 
 GoogleAppEngine             fork    0      3 
 GoogleAppEngine    getdtablesize    0      3 
 GoogleAppEngine           getpid    0      3 
 GoogleAppEngine    open_nocancel    0      3 
 GoogleAppEngine           setsid    0      3 
 GoogleAppEngine      sigprocmask    0      3 
 GoogleAppEngine           stat64    0      3 
 GoogleAppEngine            wait4    0      3 
 GoogleAppEngine       workq_open    0      3 
 GoogleAppEngine            write    0      3 
 GoogleAppEngine          lstat64    0      4 
 GoogleAppEngine             pipe    0      6 
 GoogleAppEngine    thread_selfid    0      6 
 GoogleAppEngine     gettimeofday    0      7 
 GoogleAppEngine             dup2    0      9 
 GoogleAppEngine          madvise    0     17 
 GoogleAppEngine           munmap    0     31 
 GoogleAppEngine             mmap    0     33 
 GoogleAppEngine        sigaction    0     87 
 GoogleAppEngine      getattrlist    0    102 
 GoogleAppEngine          fstat64    0    118 
 GoogleAppEngine             open    0    118 
 GoogleAppEngine          geteuid    0    208 
 GoogleAppEngine              dup    0  10418 
 GoogleAppEngine             read    0  10532 
 GoogleAppEngine            close    0  10584 
 GoogleAppEngine workq_kernreturn    0  20752 
 GoogleAppEngine            close    9  21459  Bad file descriptor 
 GoogleAppEngine           kevent    0  72543 

Update 2, 16 August: I installed the newest version of GAE Launcher [1.8.3] and everything now works.

解决方案

For people who got Unknown key when running fuser -k 8080/tcp, here is a solution which worked for me:

lsof -P | grep ':8080' | awk '{print $2}' | xargs kill -9

这篇关于应用程序无法在GAE上运行 - '无法绑定到localhost:0'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆