douliedai4838 2019-09-14 20:05
浏览 52
已采纳

从Flex迁移到标准版时,GAE Go 1.11实例启动问题

I am in the process of migrating a simple app using the Go 1.11 runtime from the AppEngine flex environment to the standard environment because flex got shockingly expensive for my low-traffic site (and standard wasn't available for this runtime until recently). Every time GAE hits the /_ah/start endpoint for my app it logs a 301 and the following error: Process terminated because it failed to respond to the start request with an HTTP status code of 200-299 or 404.

My server does have a handler for /_ah/start that simply writes a 200 and works fine locally. I also tried adding a handler for all routes in app.yaml just to make sure requests to the AppEngine load balancer are actually being routed to my server, but it still isn't working. I know from the service logs that my server is starting and listening on the correct port but it gets restarted over and over and can't actually handle any requests because of this issue with the GAE start request.

Here's my app.yaml:

runtime: go111
instance_class: B1
basic_scaling:
  max_instances: 1
handlers:
- url: /.*
  script: auto

Edit: Here's a screenshot of the logs

  • 写回答

1条回答 默认 最新

  • douchi0028 2019-09-14 22:15
    关注

    The application redirects http to https per discussion in the comments.

    An application running in the standard environment must serve http. The App Engine infrastructure handles https.

    Fix by removing the redirect from http to https.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!