无法在本地运行Google App Engine Managed VM的Go Guestbook演示。

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

Can't get the Go Guestbook demo for Google App Engine Managed VM to run locally

问题

我正在按照这个页面上的说明进行操作:https://cloud.google.com/appengine/docs/go/managed-vms/,尝试让这个示例留言板演示在本地运行:https://github.com/golang/appengine/tree/master/demos/guestbook

当部署时,演示是可以正常工作的,但在本地运行时出现以下错误:在浏览器中访问localhost:8080时,出现service bridge HTTP failed: Post http://10.0.2.2:41019/rpc_http: dial tcp 10.0.2.2:41019: i/o timeout的错误。

这个错误发生在尝试访问数据存储时。调试语句是DEBUG: Container: f18ca4d19536: 2014/12/31 03:08:22 ERROR: GetAll: service bridge HTTP failed: Post http://10.0.2.2:36788/rpc_http: dial tcp 10.0.2.2:36788: i/o timeout,当查询的GetAll函数失败时生成。

以下是我用来准备运行留言板演示的语句:

gcloud config set project <project name>
gcloud components update app
gcloud components update gae-go
goapp get google.golang.org/appengine
gcloud preview app setup-managed-vms
从app.yaml中删除"application: vm-guestbook"行
在生成的Dockerfile中添加"apt-get update"
gcloud preview app run app.yaml

有什么想法是什么出了问题?如果我使用gcloud preview app deploy app.yaml部署应用程序,它可以正常工作。但我真的想弄清楚如何在本地运行托管的虚拟机应用程序。

我应该提到我能够在本地运行helloworld演示。区别在于helloworld演示不访问数据存储。另外,我在运行Ubuntu 14.04。

英文:

I'm following the instructions on this page: https://cloud.google.com/appengine/docs/go/managed-vms/ trying to get the example guestbook demo shown here to work: https://github.com/golang/appengine/tree/master/demos/guestbook

The demo works when deployed, but not when run locally. Running locally gives following error in the browser when hitting localhost:8080: service bridge HTTP failed: Post http://10.0.2.2:41019/rpc_http: dial tcp 10.0.2.2:41019: i/o timeout

The error occurs when trying to access the datastore. The debug statement is DEBUG: Container: f18ca4d19536: 2014/12/31 03:08:22 ERROR: GetAll: service bridge HTTP failed: Post http://10.0.2.2:36788/rpc_http: dial tcp 10.0.2.2:36788: i/o timeout which is generated when the query.GetAll function fails.

Here are the statements I used to prepare to run the guestbook demo:

gcloud config set project <project name>
gcloud components update app
gcloud components update gae-go
goapp get google.golang.org/appengine
gcloud preview app setup-managed-vms
remove the "application: vm-guestbook" line from app.yaml
add "apt-get update" to the generated Dockerfile
gcloud preview app run app.yaml

Any ideas what's wrong? If I deploy the app using gcloud preview app deploy app.yaml it works fine. But I'd really like to figure out how to run Managed VM apps locally.

I should mention that I'm able to run the helloworld demo locally. The difference is the helloworld demo doesn't access the datastore. Also, I'm running on Ubuntu 14.04.

答案1

得分: 1

你的配置目前不受支持。
我们目前要求即使在Linux上也必须使用boot2docker和VirtualBox。

英文:

It turns out that your configuration is not currently supported.
We currently require the use of boot2docker and VirtualBox even on Linux.

huangapple
  • 本文由 发表于 2014年12月31日 12:03:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/27715967.html
匿名

发表评论

匿名网友

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

确定