【发布时间】:2012-12-03 16:26:51
【问题描述】:
最近,我将 GAE SDK 升级到了版本。 1.7.4,当我尝试运行开发服务器时,它开始抛出“InvalidCertificateException”。我搜索了这个错误,有些人说它会随着时间的推移而消失,但我的没有。我应该研究什么来解决这个问题?我正在为我的应用程序使用 python 框架 Django,如果这很重要的话。
$ dev_appserver.py ./
INFO 2012-12-16 07:44:31,412 appcfg.py:586] Checking for updates to the SDK.
Traceback (most recent call last):
File "/usr/local/bin/dev_appserver.py", line 171, in <module>
run_file(__file__, globals())
File "/usr/local/bin/dev_appserver.py", line 167, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 747, in <module>
sys.exit(main(sys.argv))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 680, in main
update_check.CheckForUpdates()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 597, in CheckForUpdates
runtime=self.config.runtime)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 391, in Send
f = self.opener.open(req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 394, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 412, in _open
'_open', req)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.7/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 379, 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
【问题讨论】:
-
您的根证书似乎不是最新的。 GAE 证书由 Google 证书颁发机构签名 - 因此您的根证书存储需要更新。您是否缺少 Mac 的任何软件更新?
-
@BurhanKhalid 谢谢。我会检查并回复你。
-
@BurhanKhalid 不,一切都更新了,但仍然抛出异常。
-
我发现的快速解决方法:从已安装的 SDK 中删除文件 google_appengine/lib/cacerts/cacerts.txt。
-
我不知道为什么,但这个问题自己解决了。现在开发服务器使用 cacerts.txt 没有问题。
标签: python django google-app-engine