如何调试“没有默认机器人”错误?

huangapple go评论85阅读模式
英文:

How do I debug "No default robot"?

问题

我有一个在Google AppEngine上运行的应用程序(使用Go编写),正在进行迁移到Managed VMs的过程中。该应用程序已经嵌入到一个Docker容器中,并对Dockerfile进行了轻微的修改。

通过使用gcloud preview app run app.yaml启动的本地开发服务器正常运行并按预期提供服务。

然而,在尝试部署时,我遇到了以下错误。

使用gcloud--verbosity debug选项,我能够确定引起问题的请求(对于重复的输出我表示抱歉):

INFO: Preparing project for VM runtimes.
DEBUG: Running [appcfg.py] with: appcfg.py --application=coduno --called_by_gcloud --noisy --oauth2 --oauth2_credential_file=/Users/flowlo/.config/gcloud/legacy_credentials/flowlo@example.com/singlestore.json --skip_sdk_update_check --version=master prepare_vm_runtime
11:53 AM Host: appengine.google.com
DEBUG: _Authenticate configuring auth; needs_auth=False
DEBUG: Sending request to https://appengine.google.com/api/vms/prepare?app_id=coduno headers={'X-appcfg-api-version': '1', 'content-length': '0', 'Content-Type': 'application/octet-stream'} body=
DEBUG: Got http error 400, this is try #1
DEBUG: Unexpected results: {'status': '400', 'content-length': '65', 'expires': 'Fri, 01 Jan 1990 00:00:00 GMT', 'server': 'Google Frontend', 'cache-control': 'no-cache', 'date': 'Tue, 10 Mar 2015 10:53:09 GMT', 'content-type': 'text/plain'}
Error 400: --- begin server output ---
Failed Project Preparation (app_id='s~example'). No default robot.
--- end server output ---
DEBUG: Received error code [1] while running: [appcfg.py --application=example --called_by_gcloud --noisy --oauth2 --oauth2_credential_file=/Users/lorenz/.config/gcloud/legacy_credentials/flowlo@example.com/singlestore.json --skip_sdk_update_check --version=master prepare_vm_runtime]

<sub>注意:真实的应用程序ID已被替换为example,原始输出中存在前缀s~。类似地,我将app.yaml的位置替换为/path/to。</sub>

我的gcloud已经是最新版本:

$ gcloud --version
Google Cloud SDK 0.9.50

app 2015.03.03
app-engine-go-darwin-x86_64 1.9.18
app-engine-java 1.9.18
app-engine-managed-vms 2015.01.22
app-engine-python 1.9.18
app-engine-python-extras 1.9.18
bq 2.0.18
bq-nix 2.0.18
compute 2015.03.03
core 2015.03.03
core-nix 2014.10.20
dns 2015.03.03
gae-go 2015.03.03
gae-go-nix 2014.09.10
gae-python 2014.05.06
gae-python-launcher-mac 1.9.18
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.9
gsutil-nix 4.6
preview 2015.03.03
preview-extensions-darwin-x86_64 0.11.0
sql 2015.03.03

将完全相同的应用程序(相同的目录,相同的文件)部署到另一个项目中是可以工作的。

英文:

I have an Application (written in Go) running on Google AppEngine and am in the process of moving to Managed VMs. The App has been embedded in a Docker container with slight modifications to Dockerfile.

The local development server started by gcloud preview app run app.yaml runs fine and serves as expected.

When trying to deploy, however, I run into the following error.

Using gcloud's --verbosity debug I was able to isolate the request causing troubles (sorry for repeated output):

INFO: Preparing project for VM runtimes.
DEBUG: Running [appcfg.py] with: appcfg.py --application=coduno --called_by_gcloud --noisy --oauth2 --oauth2_credential_file=/Users/flowlo/.config/gcloud/legacy_credentials/flowlo@example.com/singlestore.json --skip_sdk_update_check --version=master prepare_vm_runtime
11:53 AM Host: appengine.google.com
DEBUG: _Authenticate configuring auth; needs_auth=False
DEBUG: Sending request to https://appengine.google.com/api/vms/prepare?app_id=coduno headers={&#39;X-appcfg-api-version&#39;: &#39;1&#39;, &#39;content-length&#39;: &#39;0&#39;, &#39;Content-Type&#39;: &#39;application/octet-stream&#39;} body=
DEBUG: Got http error 400, this is try #1
DEBUG: Unexpected results: {&#39;status&#39;: &#39;400&#39;, &#39;content-length&#39;: &#39;65&#39;, &#39;expires&#39;: &#39;Fri, 01 Jan 1990 00:00:00 GMT&#39;, &#39;server&#39;: &#39;Google Frontend&#39;, &#39;cache-control&#39;: &#39;no-cache&#39;, &#39;date&#39;: &#39;Tue, 10 Mar 2015 10:53:09 GMT&#39;, &#39;content-type&#39;: &#39;text/plain&#39;}
Error 400: --- begin server output ---
Failed Project Preparation (app_id=&#39;s~example&#39;). No default robot.
--- end server output ---
DEBUG: Received error code [1] while running: [appcfg.py --application=example --called_by_gcloud --noisy --oauth2 --oauth2_credential_file=/Users/lorenz/.config/gcloud/legacy_credentials/flowlo@example.com/singlestore.json --skip_sdk_update_check --version=master prepare_vm_runtime]

<sub>Note: The real application ID was replaced with example, the prefix s~ is present in original output. Similarily I replaced the location of app.yaml with /path/to.</sub>

My gcloud is up to date:

$ gcloud --version
Google Cloud SDK 0.9.50

app 2015.03.03
app-engine-go-darwin-x86_64 1.9.18
app-engine-java 1.9.18
app-engine-managed-vms 2015.01.22
app-engine-python 1.9.18
app-engine-python-extras 1.9.18
bq 2.0.18
bq-nix 2.0.18
compute 2015.03.03
core 2015.03.03
core-nix 2014.10.20
dns 2015.03.03
gae-go 2015.03.03
gae-go-nix 2014.09.10
gae-python 2014.05.06
gae-python-launcher-mac 1.9.18
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.9
gsutil-nix 4.6
preview 2015.03.03
preview-extensions-darwin-x86_64 0.11.0
sql 2015.03.03

Deploying the exact same app (same directory, same files) to a different project works.

答案1

得分: 0

我成功解决了这个问题,通过在google-appengine@googlegroups.com(Google App Engine的传统支持社区)上获得了一些帮助。

事实证明,由于某种原因,我的项目没有正确设置“Cloud Integration”。我不得不导航到 appspot.com 的“应用程序设置”页面,在页面的较低位置找到“Cloud Integration”(它在页面上相当靠下),会显示以下错误:“创建项目时发生错误,请重试。

点击“重试”并等待几分钟就解决了问题。

英文:

I managed to resolve this with some help on google-appengine@googlegroups.com (the legacy support community for Google App Engine).

It turned out that for some reason "Cloud Integration" was not correctly set up for my project. I had to navigate to "Application Settings" on appspot.com where "Cloud Integration" (it's quite far down on the page) would show following error: "An error occured when creating the project. Please retry."

Hitting "Retry" and waiting a few minutes did the trick.

huangapple
  • 本文由 发表于 2015年1月25日 02:08:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/28128598.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定