2015-09-08 61 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 –

回答