2015-09-08 101 views
1

正在关注this tutorial,所有工作都在本地进行。当我部署我的应用程序的Heroku和访问应用程序在浏览器上,我收到了503错误和消息:Heroku Go应用崩溃

应用程序错误 错误发生在应用程序和网页无法送达。请稍后重试。 如果您是应用程序所有者,请查看日志以获取详细信息。

日志说:

2015-09-08T16:31:53.976824+00:00 heroku[web.1]: State changed from crashed to starting 
2015-09-08T16:31:56.174376+00:00 heroku[web.1]: Starting process with command `mywebsite` 
2015-09-08T16:31:59.312461+00:00 app[web.1]: Listening on port: 39461 
2015-09-08T16:32:56.471550+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 
2015-09-08T16:32:56.471550+00:00 heroku[web.1]: Stopping process with SIGKILL 
2015-09-08T16:32:57.390752+00:00 heroku[web.1]: Process exited with status 137 
2015-09-08T16:32:57.404208+00:00 heroku[web.1]: State changed from starting to crashed 
2015-09-08T16:32:57.645135+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=boiling-eyrie-6897.herokuapp.com request_id=ec26... fwd="xx.xxx.xxx.xxx" dyno= connect= service= status=503 bytes= 
2015-09-08T16:32:58.233774+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=boiling-eyrie-6897.herokuapp.com request_id=ef40...fwd="xx.xxx.xxx.xxx" dyno= connect= service= status=503 bytes= 

我理解错误是什么,而是怎么能这么一个小教程应用程序会导致启动超时(R10)?

我该如何更好地进行调试并修复应用程序使其运行?

+0

是否有可能您的应用程序绑定正确的端口,但只能在本地连接循环上,而不能在所有端口上(这会使平台检测不到端口的绑定,并导致应用程序崩溃)。 –

+0

@DamienMATHIEU对不​​起,我不确定你在说什么。 “在本地连接循环上,而不是在所有这些上”是什么意思? – sargas

+0

如果您的应用程序只在'localhost'上侦听,则进程监视器无法检测到绑定的端口。您需要绑定所有可用的网络连接。见https://github.com/heroku/go-getting-started/blob/master/cmd/go-getting-started/main.go#L27 –

回答