run "ruby script/about" error.

Added by ww yhy about 10 years ago

Hi,

My Redmine system isn't response every night. i need to kill ruby process and restart Redmine on every morning.

I don't know why? when i run "ruby script/about", i got the below error.
anybody's comment is welcome.

Redmine: 0.9.5
rails:2.3.5
ruby : 1.8.7
mysql : 5.1.41
ruby-mysql: 2.9.2

THNAKS!

------error log---------
[root@test redmine-0.9.5]# ruby script/about
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/usr/local/ruby/lib/ruby/gems/1.8/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:587:in `read': Access denied for user 'root'@'localhost' (using password: NO) (Mysql::AccessDeniedError)
from /usr/local/ruby/lib/ruby/gems/1.8/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:252:in `authenticate'
from /usr/local/ruby/lib/ruby/gems/1.8/gems/ruby-mysql-2.9.2/lib/mysql.rb:111:in `real_connect'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:589:in `connect'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:203:in `initialize'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `new'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `mysql_connection'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
from /usr/local/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
from /usr/local/redmine-0.9.5/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name'
from /usr/local/redmine-0.9.5/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set'
from /usr/local/redmine-0.9.5/app/models/project.rb:54
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_file'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:in `load_file'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:in `require_or_load_without_engine_additions'
from /usr/local/redmine-0.9.5/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:96:in `const_missing'
from /usr/local/redmine-0.9.5/app/models/attachment.rb:36
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_file'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:in `load_file'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:in `require_or_load_without_engine_additions'
from /usr/local/redmine-0.9.5/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:437:in `load_missing_constant'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:in `acts_as_attachable'
from /usr/local/redmine-0.9.5/app/models/message.rb:22
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_file'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:in `load_file'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:in `require_or_load_without_engine_additions'
from /usr/local/redmine-0.9.5/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/inflector.rb:361:in `constantize'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/inflector.rb:360:in `each'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/inflector.rb:360:in `constantize'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/observer.rb:157:in `observed_class'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/observer.rb:183:in `observed_classes'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/observer.rb:166:in `initialize'
from /usr/local/ruby/lib/ruby/1.8/singleton.rb:95:in `new'
from /usr/local/ruby/lib/ruby/1.8/singleton.rb:95:in `instance'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/observer.rb:38:in `instantiate_observers'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/observer.rb:36:in `each'
from /usr/local/redmine-0.9.5/vendor/rails/activerecord/lib/active_record/observer.rb:36:in `instantiate_observers'
from /usr/local/redmine-0.9.5/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:15:in `define_dispatcher_callbacks'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `call'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in `evaluate_method'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `each'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `send'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in `run'
from /usr/local/redmine-0.9.5/vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in `run_callbacks'
from /usr/local/redmine-0.9.5/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:in `send'
from /usr/local/redmine-0.9.5/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:631:in `prepare_dispatcher'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:185:in `process'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /usr/local/redmine-0.9.5/config/environment.rb:20
from /usr/local/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/redmine-0.9.5/vendor/rails/railties/lib/commands/about.rb:1
from /usr/local/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/about:4
[root@test redmine-0.9.5]#

Replies (7)

RE: run "ruby script/about" error. - Added by Felix Schäfer about 10 years ago

  1. When run without nothing, script/about tries to connect to the development DB, use RAILS_ENV=production script/about for a production environment.
  2. Last I looked the mysql gem didn't support MySQL 5.1, that might be the root of your problem.

RE: run "ruby script/about" error. - Added by ww yhy about 10 years ago

I try to change it according to your suggestion. But the problem still exist.

1) below is output of run "RAILS_ENV=production script/about"

[root@localhost redmine-0.9.5]# RAILS_ENV=production script/about
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
About your application's environment
Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.3.6
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /usr/local/redmine-0.9.5
Environment production
Database adapter mysql
Database schema version 20100221100219

2) I changed the mysql version from 5.1.41 to 5.0.41 . the problem still exist.

RE: run "ruby script/about" error. - Added by Felix Schäfer about 10 years ago

What rails server do you use (passenger, thin, unicorn, mongrel, …)?

RE: run "ruby script/about" error. - Added by ww yhy about 10 years ago

I don't know what's your mean? How do i see the rails server mode?

I use "ruby script/server webrick -d -e production" command to start my Redmine.

RE: run "ruby script/about" error. - Added by Felix Schäfer about 10 years ago

Yes, you use webrick, that's what I wanted to know. Webrick is more intended to be used behind a reverse proxy or for tests than for direct access, and AFAIK it's become one of the worst options to serve rails projects. See if you can switch to something else, e.g. passenger if you already have apache or nginx installed, or mongrel if not, or one of the many other options out there.

RE: run "ruby script/about" error. - Added by ww yhy about 10 years ago

OK. Thanks for your patience!

I have not install both Apache and nginx. So i want to try to use mongrel mode. What command need to given to start my Redmine?

is it "ruby script/server mongrel -d -e production"?

(1-7/7)