更新:
当我尝试在 Settings>App Engine> Version 中将版本 1(我只有版本)设置为默认版本时,我收到一个奇怪的错误,提示“无法将版本设置为默认版本”这可能是导致问题的原因吗? 关于如何解决的任何想法?
原始帖子:
我一直在使用 Google Cloud Endpoints 开发一个项目。到目前为止,我已经在本地开发了它。我今天去部署它,但有些东西不起作用。我可以在本地主机上访问 API 和 API 资源管理器。所以http://localhost:8080/_ah/api/myapi/v1/test
会起作用,但是当我部署它时,它不起作用。当我访问时,我得到“发现笔记” http://myapp.appspot.com/_ah/api/myapi/v1/test
。api explorer 也是如此,它在本地工作,但是当我尝试在部署的 URL 上使用它时,我什么也得不到。
部署似乎成功:
% appcfg.py update .
07:00 PM Application: struction-api; version: 1
07:00 PM Host: appengine.google.com
07:00 PM
Starting update of app: struction-api, version: 1
07:00 PM Getting current resource limits.
07:00 PM Scanning files on local disk.
07:00 PM Cloning 5 application files.
07:00 PM Uploading 2 files and blobs.
07:00 PM Uploaded 2 files and blobs
07:00 PM Compilation starting.
07:00 PM Compilation completed.
07:00 PM Starting deployment.
07:00 PM Checking if deployment succeeded.
07:00 PM Deployment successful.
07:00 PM Checking if updated app version is serving.
07:00 PM Checking if Endpoints configuration has been updated.
07:00 PM Will check again in 1 seconds.
07:00 PM Checking if Endpoints configuration has been updated.
07:00 PM Will check again in 2 seconds.
07:00 PM Checking if Endpoints configuration has been updated.
07:00 PM Completed update of app: struction-api, version: 1
07:00 PM Uploading index definitions.
检查日志或管理日志时,我也看不到任何错误。
以下是日志:
Endpoints: https://1-dot-struction-api.appspot.com/_ah/api/structions@v1 Saved
和管理员日志:
根据所有文档,这意味着它的部署没有错误。
问题可能出在我的 app.yaml 中吗?这里是:
application: my-app
version: 1
runtime: python27
threadsafe: true
api_version: 1
handlers:
# Endpoints handler
- url: /_ah/spi/.*
script: myapi.APPLICATION
libraries:
- name: pycrypto
version: latest
- name: endpoints
version: 1.0
根据我发现的一切,我做的一切都是正确的,但我的 API 仍然无法加载。如果这可能是一个因素,我正在使用 NDB,但我什至无法访问没有任何数据存储内容的 API。
如果有人知道这里发生了什么,请提前感谢,非常令人沮丧。