Heroku Rails应用程序立即终止(SIGTERM)

时间:2014-05-07 19:37:28

标签: ruby-on-rails ruby ruby-on-rails-3 postgresql heroku

我试图简单地获取基本的Rails应用程序,只需初始化一个空/默认项目并将其放在Heroku上。

然而,无论我尝试什么,我似乎都无法获得默认" Welcome Aboard" Heroku上的页面。 一切都在当地工作。

似乎应用程序在被推送到Heroku后立即被终止。我看到了SIGTERM和'进程退出状态143'。

这是Heroku的日志:

2014-05-07T19:09:26.423194+00:00 heroku[router]: at=info method=GET path=/ host=young-caverns-5100.herokuapp.com request_id=b0b3030f-8292-4f5e-ad40-8763f6503d1e fwd="24.5.234.171" dyno=web.1 connect=1ms service=13ms status=404 bytes=1829
2014-05-07T19:09:26.703179+00:00 heroku[router]: at=info method=GET path=/ host=young-caverns-5100.herokuapp.com request_id=80608d62-5b9c-4c20-9450-3909c42a4042 fwd="24.5.234.171" dyno=web.1 connect=51ms service=55ms status=404 bytes=1829
2014-05-07T19:09:26.791689+00:00 heroku[router]: at=info method=GET path=/ host=young-caverns-5100.herokuapp.com request_id=d4c54ded-b7fa-4535-ad66-47ca49dbd8c4 fwd="24.5.234.171" dyno=web.1 connect=2ms service=14ms status=404 bytes=1829
2014-05-07T19:10:08.421266+00:00 heroku[router]: at=info method=GET path=/ host=young-caverns-5100.herokuapp.com request_id=e21b204e-8d22-4f47-83a8-01ea4b00163e fwd="24.5.234.171" dyno=web.1 connect=2ms service=8ms status=404 bytes=1829
2014-05-07T19:11:45.398253+00:00 heroku[router]: at=info method=GET path=/ host=young-caverns-5100.herokuapp.com request_id=c9c8c2e3-86f2-492d-b738-d7ed4427abd5 fwd="24.5.234.171" dyno=web.1 connect=1ms service=10ms status=404 bytes=1829
2014-05-07T19:11:45.664341+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=young-caverns-5100.herokuapp.com request_id=061df699-108d-4776-b6c0-9a32db8efd22 fwd="24.5.234.171" dyno=web.1 connect=1ms service=83ms status=404 bytes=1829
2014-05-07T19:11:48.467737+00:00 heroku[router]: at=info method=GET path=/home host=young-caverns-5100.herokuapp.com request_id=f884c580-3648-4bc5-913e-1a80d9563024 fwd="24.5.234.171" dyno=web.1 connect=7ms service=10ms status=404 bytes=1829
2014-05-07T19:11:52.832857+00:00 heroku[router]: at=info method=GET path=/leads host=young-caverns-5100.herokuapp.com request_id=43807ebc-4e3e-48f6-b014-9198b8dba0b2 fwd="24.5.234.171" dyno=web.1 connect=5ms service=13ms status=404 bytes=1829
2014-05-07T19:18:02.160375+00:00 heroku[web.1]: State changed from up to starting
2014-05-07T19:18:05.171369+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-05-07T19:18:05.870522+00:00 app[web.1]: [2014-05-07 19:18:05] FATAL SignalException: SIGTERM
2014-05-07T19:18:05.870530+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
2014-05-07T19:18:05.870533+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
2014-05-07T19:18:05.870534+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
2014-05-07T19:18:05.870535+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
2014-05-07T19:18:05.870537+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:14:in `run'
2014-05-07T19:18:05.870539+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
2014-05-07T19:18:05.870540+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/server.rb:69:in `start'
2014-05-07T19:18:05.870542+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2014-05-07T19:18:05.870544+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `tap'
2014-05-07T19:18:05.870551+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `server'
2014-05-07T19:18:05.870553+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2014-05-07T19:18:05.870556+00:00 app[web.1]:    bin/rails:8:in `require'
2014-05-07T19:18:05.870555+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
2014-05-07T19:18:05.870558+00:00 app[web.1]:    bin/rails:8:in `<main>'
2014-05-07T19:18:05.870625+00:00 app[web.1]: [2014-05-07 19:18:05] INFO  going to shutdown ...
2014-05-07T19:18:05.870698+00:00 app[web.1]: [2014-05-07 19:18:05] INFO  WEBrick::HTTPServer#start done.
2014-05-07T19:18:05.984386+00:00 app[web.1]: => Booting WEBrick
2014-05-07T19:18:05.984394+00:00 app[web.1]: => Rails 4.1.1 application starting in production on http://0.0.0.0:6427
2014-05-07T19:18:05.984396+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-05-07T19:18:05.984398+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2014-05-07T19:18:05.984400+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-05-07T19:18:05.984402+00:00 app[web.1]: Exiting
2014-05-07T19:18:08.381243+00:00 app[web.1]: [2014-05-07 19:18:08] INFO  ruby 2.0.0 (2014-02-24) [x86_64-linux]
2014-05-07T19:18:08.381212+00:00 app[web.1]: [2014-05-07 19:18:08] INFO  WEBrick 1.3.1
2014-05-07T19:18:08.381705+00:00 app[web.1]: [2014-05-07 19:18:08] INFO  WEBrick::HTTPServer#start: pid=2 port=53268
2014-05-07T19:18:08.432919+00:00 heroku[web.1]: State changed from starting to up
2014-05-07T19:18:05.271399+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 53268 -e production`
2014-05-07T19:18:07.843876+00:00 heroku[web.1]: Process exited with status 143

我看了很多其他SO帖子,尝试修复,但我没有到达任何地方。看起来像其他人一样。问题不涉及状态143&#39;无论是。

我已尝试在生产中更改为PostgreSQL,将预编译资产从“假”变为“假”。 to&#39; true&#39;,运行db:migrate等等。

我不确定这是否与此问题有关,但我昨天在this教程后下载了Ruby / Rails / etc。我在大约一年前使用Ubuntu使用VirtualBox,并且之前在课堂上轻松地在Heroku上创建了默认应用程序。我不能让它不能使用我当前的设置。

2 个答案:

答案 0 :(得分:4)

似乎有些事情与使用Heroku的Rails 4.X有所不同,我不知道。

关注Heroku网站上的this。工作得很好。

答案 1 :(得分:1)

在控制台上尝试此命令,希望它能正常工作

heroku restart worker.1 

它在控制台上似乎是这样的

80:~/Desktop/hospitality$ heroku restart worker.1 

Restarting worker.1 dyno... done