【发布时间】:2018-04-13 18:55:44
【问题描述】:
我是谷歌云的新手,当我尝试将我的 ruby api 部署到谷歌云时遇到了这个问题,这是我所做的:
我已将我的 ruby api 上传到 github(在 localhost 上运行良好),这里 >> https://github.com/guisantogui/it
我一直在学习 hello world google 教程 >> https://cloud.google.com/ruby/getting-started/hello-world
它按预期工作,但是当我上传自己的应用程序时,我收到了http 502 bad gateway 消息,日志如下:
2017-10-30 23:48:53 default[20171030t213633] => Booting Puma
2017-10-30 23:48:53 default[20171030t213633] => Rails 5.1.4 application starting in production
2017-10-30 23:48:53 default[20171030t213633] => Run `rails server -h` for more startup options
2017-10-30 23:48:53 default[20171030t213633] Puma starting in single mode...
2017-10-30 23:48:53 default[20171030t213633] * Version 3.10.0 (ruby 2.4.1-p111), codename: Russell's Teapot
2017-10-30 23:48:53 default[20171030t213633] * Min threads: 5, max threads: 5
2017-10-30 23:48:53 default[20171030t213633] * Environment: production
2017-10-30 23:48:53 default[20171030t213633] * Listening on tcp://0.0.0.0:3000
2017-10-30 23:48:53 default[20171030t213633] Use Ctrl-C to stop
2017-10-30 23:58:01 default[20171030t213633] "GET /" 502
2017-10-30 23:58:02 default[20171030t213633] "GET /favicon.ico" 502
2017-10-30 23:58:06 default[20171030t213633] "GET /" 502
2017-10-30 23:58:06 default[20171030t213633] "GET /favicon.ico" 502
2017-11-01 10:54:50 default[20171030t213633] "GET /" 502
2017-11-01 10:54:50 default[20171030t213633] "GET /favicon.ico" 502
2017-11-01 10:55:02 default[20171030t213633] "GET /favicon.ico" 502
2017-11-01 10:55:02 default[20171030t213633] "GET /tatoo_artis/list" 502
最后,我认为 app.yaml 文件更重要:
entrypoint: bundle exec rails server Puma -p 3000
env: flex
runtime: ruby
提前致谢,我不知道是什么问题以及如何解决它!
【问题讨论】:
-
这看起来像是某处的错误配置,因为该应用程序非常简单。您还有其他来自 GCP 的日志可以分享吗?
标签: ruby-on-rails ruby google-app-engine google-cloud-platform cloud