为什么我不能从shell启动我的应用程序?

时间:2013-07-21 23:25:27

标签: google-app-engine

我正在为python 2.7尝试helloworld App Engine tutorial

当我尝试从shell启动我的应用程序时(通过dev_appserver.py helloworld/),我收到此错误:

INFO     2013-07-21 23:09:26,779 sdk_update_checker.py:244] Checking for updates to the SDK.
Traceback (most recent call last):
  File "/usr/local/bin/dev_appserver.py", line 182, in <module>
    _run_file(__file__, globals())
  File "/usr/local/bin/dev_appserver.py", line 178, 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 707, in <module>
    main()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 700, 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 542, in start
    update_checker.check_for_updates(configuration)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/update_checker.py", line 91, in check_for_updates
    update_check.CheckForUpdates()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/sdk_update_checker.py", line 258, in CheckForUpdates
    runtime=runtime))
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
    f = self.opener.open(req)
  File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/urllib2.py", line 394, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/urllib2.py", line 412, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/urllib2.py", line 1207, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/fancy_urllib/fancy_urllib/__init__.py", line 383, in do_open
    url_error.reason.args[1])
fancy_urllib.InvalidCertificateException: Host appengine.google.com returned an invalid certificate (_ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed): 
To learn more, see http://code.google.com/appengine/kb/general.html#rpcssl

但是,当我启动从App Engine启动器GUI创建的应用程序时,我的应用程序在本地运行正常:我可以通过http://localhost:8080/访问该应用程序。

为什么我无法从终端启动我的应用程序?

我查看了其他各种建议删除某个包含某个证书的文件的帖子,但我觉得删除原生文件听起来很简单。

1 个答案:

答案 0 :(得分:2)

我可以看到出了什么问题,但我不知道为什么会出错。

SDK正在检查更新,但未能验证Google服务器的身份。

我会尝试这些事情:

  • 确保您安装了最新版本:https://developers.google.com/appengine/downloads

  • 确保在您的计算机上正确设置日期和时间(这可能导致SSL证书验证失败)

  • 删除(进行备份后)google_appengine / lib / cacerts / urlfetch_cacerts.txt