为什么Heroku +瞧ipynb应用程序部署失败,原因是'未能在启动的60秒内绑定到$PORT'

o0lyfsai  于 2022-12-13  发布在  其他
关注(0)|答案(1)|浏览(155)

我按照不同的页面在Heroku上部署了一个IPynb应用程序:https://pythonforundergradengineers.com/deploy-jupyter-notebook-voila-heroku.htmlhttps://medium.com/analytics-vidhya/deploying-jupyter-notebook-as-a-web-app-with-heroku-d157b68bcccchttps://github.com/voila-dashboards/voila-heroku
不幸的是,上个月似乎有一个持续的bug(例如https://forums.fast.ai/t/heroku-app-wont-deploy/92875/4
你可以在这里找到我正在尝试部署的github repo:https://github.com/vpicouet/fireball2-etc
应用程序基于此Procfile web: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb
很遗憾,我收到此错误

2022-03-27T15:17:49.880973+00:00 app[web.1]: [Voila] Using /tmp to store connection files
2022-03-27T15:17:49.881302+00:00 app[web.1]: [Voila] Storing connection files in /tmp/voila_yih2j7ic.
2022-03-27T15:17:49.881356+00:00 app[web.1]: [Voila] Serving static files from /app/.heroku/python/lib/python3.8/site-packages/voila/static.
2022-03-27T15:17:49.890735+00:00 app[web.1]: [Voila] Voilà is running at:
2022-03-27T15:17:49.890737+00:00 app[web.1]: http://localhost:7758/
2022-03-27T15:17:58.000000+00:00 app[api]: Build succeeded
2022-03-27T15:18:48.015586+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2022-03-27T15:18:48.055996+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-03-27T15:18:48.227953+00:00 heroku[web.1]: Process exited with status 137
2022-03-27T15:18:48.274554+00:00 heroku[web.1]: State changed from starting to crashed
2022-03-27T15:24:44.773897+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fireball2-etc-2022.herokuapp.com request_id=0b0c1707-d6ae-449a-9059-f2d1d3f8c652 fwd="74.105.154.225" dyno= connect= service= status=503 bytes= protocol=https
2022-03-27T15:39:30.626492+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fireball2-etc-2022.herokuapp.com request_id=af5c3e4a-019f-47c3-a047-e5115ebd5fc7 fwd="74.105.154.225" dyno= connect= service= status=503 bytes= protocol=https

你知道如何解决这个问题吗?非常感谢!
我已经在网上尝试了一些想法:将web: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb更改为worker: voila --port=$PORT --no-browser --enable_nbextensions=True notebooks/ETC.ipynb

fae0ux8s

fae0ux8s1#

答案可以在这里找到:issue 1047
从0.3.0开始,由于安全原因,默认情况下Voila不会监听所有接口(#926)。对于Heroku,您需要在Procfile中的命令中添加--Voila.ip= 0.0.0.0以使其正常工作。
另请参阅:https://github.com/voila-dashboards/voila-heroku

相关问题