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.

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

报告相同问题?

悬赏问题

  • ¥15 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示