web: node www/main.js
我曾经得到:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within
60 seconds of launch
所以我已经将我的Procfile改为一个通用命令来解决这个问题,从here开始,使用:
start: node www/main.js
我在60秒后仍然关机.这是错误现在:
2015-01-20T13:04:01.452819+00:00 heroku[worker.1]: State changed from
up to starting
2015-01-20T13:04:02.728905+00:00 heroku[worker.1]: State changed from starting to down
2015-01-20T13:04:03.434251+00:00 heroku[worker.1]: Starting process with commandnode www/main.js
2015-01-20T13:04:03.874370+00:00 heroku[worker.1]: Stopping all processes with SIGTERM
2015-01-20T13:04:05.188100+00:00 heroku[worker.1]: Process exited with status 143
2015-01-20T13:04:05.930916+00:00 app[worker.1]: [Tue Jan 20 2015 13:04:05 GMT+0000 (UTC)] INFO Connecting…
2015-01-20T13:04:06.837197+00:00 app[worker.1]: Welcome to Slack. You are @derpy of
2015-01-20T13:04:06.837559+00:00 app[worker.1]: You are in: #general
2015-01-20T13:04:06.837637+00:00 app[worker.1]: As well as:
2015-01-20T13:04:06.837739+00:00 app[worker.1]: You have 13 unread messages
2015-01-20T13:04:07.526373+00:00 heroku[worker.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of
SIGTERM
2015-01-20T13:04:07.526508+00:00 heroku[worker.1]: Stopping remaining processes with SIGKILL
我使用https://github.com/slackhq/node-slack-client并且没有过多调整代码.我已经尝试了所有常用的东西,现在我正在寻求帮助.
另一个奇怪的事情是Slack机器人连接并在60秒内完美运行.
socket = io.listen(process.env.PORT);在main.js文件中执行此操作,然后恢复为web:node www / main.js