2013-03-04 47 views
0
2013-03-04T06:47:21+00:00 heroku[web.1]: State changed from starting to crashed 
2013-03-04T06:47:21+00:00 heroku[web.1]: State changed from crashed to starting 
**2013-03-04T06:47:22+00:00 heroku[web.1]: Starting process with command `exec unicorn -p 6662 -c ./config/unicorn.rb`** 
2013-03-04T06:47:23+00:00 app[web.1]: I, [2013-03-04T06:47:23.679109 #2] INFO -- : Refreshing Gem list 
2013-03-04T06:47:24+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2013-03-04T06:47:24+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2013-03-04T06:47:25+00:00 app[web.1]:   This poses a security threat. It is strongly recommended that you 
2013-03-04T06:47:25+00:00 app[web.1]:   cookies. This will not be supported in future versions of Rack, and 
2013-03-04T06:47:25+00:00 app[web.1]:   Called from: /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initialize'. 
2013-03-04T06:47:25+00:00 app[web.1]: 
2013-03-04T06:47:25+00:00 app[web.1]: 
2013-03-04T06:47:25+00:00 app[web.1]:   provide a secret to prevent exploits that may be possible from crafted 
2013-03-04T06:47:25+00:00 app[web.1]:   SECURITY WARNING: No secret option provided to Rack::Session::Cookie. 
2013-03-04T06:47:25+00:00 app[web.1]:   future versions will even invalidate your existing user cookies. 
2013-03-04T06:47:27+00:00 app[web.1]: I, [2013-03-04T06:47:27.469450 #2] INFO -- : listening on addr=0.0.0.0:6662 fd=8 
2013-03-04T06:47:27+00:00 app[web.1]: Disconnected from ActiveRecord 
2013-03-04T06:47:27+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 55101, should be 6662 (see environment variable PORT) 
2013-03-04T06:47:27+00:00 heroku[web.1]: Stopping process with SIGKILL 
2013-03-04T06:47:28+00:00 heroku[web.1]: Process exited with status 137 
2013-03-04T06:47:28+00:00 heroku[web.1]: State changed from starting to crashed 
2013-03-04T06:47:31+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ivms/13? host=murmuring-plains-5992.herokuapp.com fwd="202.157.93.2" dyno= queue= wait= connect= service= status=503 bytes= 

因此exec使用正確的端口6662啓動,但最終出現錯誤的端口。這發生在每個 heroku ps:重啓或heroku重啓。

我錯過了什麼。

環境: Rails3中 紅寶石193 Heroku上雪松堆棧

+0

我procfile:網址:EXEC麒麟-p $ PORT -c ./config/unicorn.rb – 2013-03-04 07:01:44

回答

0

你能告訴你的Procfile? Heroku會爲每個測功機動態分配一個PORT變量。該值可能會改變。重新啓動。所以你的web進程類型應該讀取PORT變量值,並使用它。

見本article about unicorn的例子,這確實是這樣的:

web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb 
+0

我procfile:網址:EXEC unicorn -p $ PORT -c ./config/unicorn.rb – 2013-03-05 00:26:59

+0

使用命令'exec unicorn -p 6662 -c ./config/unicorn.rb'** 啓動進程錯誤R11(Bad bind) - >進程綁定到端口55101,應該是6662(見環境 所以它開始與正確的端口,但不知何故結束了錯誤的端口 – 2013-03-05 00:27:53

+0

什麼是你的unicorn.rb文件看起來像è? – 2013-03-05 19:12:44