Welcome Guest | Login

Help My Mongrel Server won't restart

I deployed and it wouldn't restart. Please help as quickly as possible.

2008-06-29 08:16 PM

It has restarted but is throwing errors now.

2008-06-29 08:18 PM

This is the current error:

Processing EmailsController#new (for 74.66.70.225 at 2008-06-29 20:17:50) [GET]
 Session ID: BAh7CToOcmV0dXJuX3RvMDoOcGVyc29uX2lkaQYiCmZsYXNoSUM6J0FjdGlv%0AbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhhc2h7AAY6CkB1c2VkewA6DGNz%0AcmZfaWQiJTU4OTFjMmNlMmQ5Y2Y3ZDJmOGU5NjM3NDZkNzVhNmZh--c8afb9f9bc6c84bceb8d0cd87593b348b1821460
 Parameters: {"action"=>"new", "controller"=>"emails"}
default field list: [:name, :description]


DRb::DRbConnError (druby://127.0.0.1:9010 - #<Errno::ECONNREFUSED: Connection refused - connect(2)>):
   /usr/local/lib/ruby/1.8/drb/drb.rb:736:in `open'
   /usr/local/lib/ruby/1.8/drb/drb.rb:729:in `each'
   /usr/local/lib/ruby/1.8/drb/drb.rb:729:in `open'
   /usr/local/lib/ruby/1.8/drb/drb.rb:1189:in `initialize'
   /usr/local/lib/ruby/1.8/drb/drb.rb:1169:in `new'
   /usr/local/lib/ruby/1.8/drb/drb.rb:1169:in `open'
   /usr/local/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'
   /usr/local/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'
   /usr/local/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'
   /vendor/plugins/acts_as_ferret/lib/remote_index.rb:16:in `send'
   /vendor/plugins/acts_as_ferret/lib/remote_index.rb:16:in `method_missing'
   /vendor/plugins/acts_as_ferret/lib/act_methods.rb:189:in `acts_as_ferret'
   /app/models/person.rb:38
   /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
   /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:104:in `require_or_load'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:248:in `load_missing_constant'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:465:in `const_missing'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:260:in `load_missing_constant'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
   /lib/authenticated_system.rb:98:in `login_from_session'
   /lib/authenticated_system.rb:12:in `current_person'
   /lib/authenticated_system.rb:6:in `logged_in?'
   /app/controllers/application.rb:44:in `require_activation'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:469:in `send!'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:469:in `call'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:441:in `run'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:716:in `run_before_filters'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:695:in `call_filters'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
   /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
   /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
   /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
   /vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
   /vendor/rails/actionpack/lib/action_controller/caching.rb:678:in `perform_action'
   /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
   /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
   /vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `perform_action'
   /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
   /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
   /vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
   /vendor/rails/actionpack/lib/action_controller/base.rb:388:in `process'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in `handle_request'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:76:in `process'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `synchronize'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `process'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:159:in `process_client'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in `each'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in `process_client'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `initialize'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `new'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `initialize'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `new'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:282:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in `each'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:128:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281
   /usr/local/bin/mongrel_rails:19:in `load'
   /usr/local/bin/mongrel_rails:19

Rendering /home/<user>/apps/<appname>/releases/20080630010835/public/500.html (500 Internal Server Error)

2008-06-29 08:25 PM

Could this be Ferret related?

Now I am getting this:
LoadError (Expected /home/<user>/apps/<appname>/releases/20080630011826/app/models/person.rb to define Person):
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:249:in `load_missing_constant'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:465:in `const_missing'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:260:in `load_missing_constant'
   /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
   /lib/authenticated_system.rb:98:in `login_from_session'
   /lib/authenticated_system.rb:12:in `current_person'
   /lib/authenticated_system.rb:6:in `logged_in?'
   /app/controllers/application.rb:44:in `require_activation'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:469:in `send!'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:469:in `call'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:441:in `run'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:716:in `run_before_filters'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:695:in `call_filters'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
   /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
   /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
   /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
   /vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
   /vendor/rails/actionpack/lib/action_controller/caching.rb:678:in `perform_action'
   /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
   /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
   /vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `perform_action'
   /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
   /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
   /vendor/rails/actionpack/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
   /vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
   /vendor/rails/actionpack/lib/action_controller/base.rb:388:in `process'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in `handle_request'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:76:in `process'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `synchronize'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `process'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:159:in `process_client'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in `each'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in `process_client'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `initialize'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `new'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `initialize'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `new'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:282:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in `each'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:128:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in `run'
   /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281
   /usr/local/bin/mongrel_rails:19:in `load'
   /usr/local/bin/mongrel_rails:19

Rendering /home/<user>/apps/<appname>/releases/20080630011826/public/500.html (500 Internal Server Error)

2008-06-29 09:10 PM

I think this may be related to the Ferret server. How can I restart the server?

2008-06-29 09:53 PM

Hi,

This Expected X to define Y error can be identified by loading up your script/console and typing
in the name of the model (Y) or controller -- that will give a more informative error, in this case with if it's with Ferret.    
Given below is a wiki thread on this.
http://www.hostingrails.com/forums/wiki_thread/54

Also to start ferret server, you may run the command below.

/usr/local/bin/ruby script/ferret_server  --environment=production start

2008-06-29 10:00 PM

To restart the Ferret server, do I run that command from the console? or from some other location?

Do you recommend that I delete the index? If so, what folders should I delete?

From the console, PeopleController works fine. Person gives the following error:

DRb::DRbConnError: druby://127.0.0.1:9010 - #<Errno::ECONNREFUSED: Connection refused - connect(2)>
       from /usr/local/lib/ruby/1.8/drb/drb.rb:736:in `open'
       from /usr/local/lib/ruby/1.8/drb/drb.rb:729:in `each'
       from /usr/local/lib/ruby/1.8/drb/drb.rb:729:in `open'
       from /usr/local/lib/ruby/1.8/drb/drb.rb:1189:in `initialize'
       from /usr/local/lib/ruby/1.8/drb/drb.rb:1169:in `new'
       from /usr/local/lib/ruby/1.8/drb/drb.rb:1169:in `open'
       from /usr/local/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing'
       from /usr/local/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend'
       from /usr/local/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/plugins/acts_as_ferret/lib/remote_index.rb:16:in `send'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/plugins/acts_as_ferret/lib/remote_index.rb:16:in `method_missing'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/plugins/acts_as_ferret/lib/act_methods.rb:189:in `acts_as_ferret'
       from /home/<user>/apps/<appname>/releases/20080630011826/app/models/person.rb:38
       from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
       from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in `require'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:104:in `require_or_load'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:248:in `load_missing_constant'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
       from /home/<user>/apps/<appname>/releases/20080630011826/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:465:in `const_missing'
       from (irb):4>>

2008-06-29 10:31 PM

I tried restarting the ferret server from apps/<appname>/current by typing:

script/ferret_server  --environment=production start

and got "starting ferret server..."

Does that mean it restarted? I am still getting the 'Expected X to define Y error'.

How do you recommend I proceed?

2008-06-29 10:45 PM

Hi,
I was able to load "Person" up on the console with out any errors.

# script/console
Loading production environment (Rails 2.0.2)
>> Person
=> Person(id: integer, email: string, name: string, remember_token: string, crypted_password: string, description: text, remember_token_expires_at: datetime, last_contacted_at: datetime, last_logged_in_at: datetime, forum_posts_count: integer, blog_post_comments_count: integer, wall_comments_count: integer, created_at: datetime, updated_at: datetime, admin: boolean, deactivated: boolean, connection_notifications: boolean, message_notifications: boolean, wall_comment_notifications: boolean, blog_comment_notifications: boolean, teamcap: boolean, team_id: integer)

Could you check it again ? Have you tried restarting mongrel ?
Also, I've confirmed that your ferret instance is up and running now.

2008-06-29 11:03 PM

Ok, the application is working now. I guess I successfully restarted the server and just needed to restart the mongrel.

Thanks.

2008-06-29 11:10 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.