I’m deploying new rails applications. Everything works well
except when it comes to the db migration:
- executing “cd /var/rails/benefits_test/releases/20101129190121 &&
/opt/ruby-enterprise-1.8.7-2010.02/bin/rake RAILS_ENV=production
db:util:migrate”
servers: [“ps-test-app1”]
[ps-test-app1] executing command
** [out :: ps-test-app1] (in
/filestore/rails/benefits_test/releases/20101129190121)
*** [err :: ps-test-app1] rake aborted!
*** [err :: ps-test-app1] getaddrinfo: Name or service not known
*** [err :: ps-test-app1]
*** [err :: ps-test-app1] (See full trace by running task with –
trace)
command finished
failed: “sh -c ‘cd /var/rails/benefits_test/releases/20101129190121 &&
/opt/ruby-enterprise-1.8.7-2010.02/bin/rake RAILS_ENV=production
db:util:migrate’” on ps-test-app1
When I manually run it with ‘–trace’ I see nothing evident:
[root@ps-test-app1 current]# rake RAILS_ENV=production db:migrate
–trace
(in /filestore/rails/benefits_test/releases/20101129190121)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
getaddrinfo: Name or service not known
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:861:in
initialize' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:861:in
open’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:861:in
open_server' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:759:in
open_server’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:757:in
each' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:757:in
open_server’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:1342:in
initialize' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:1630:in
new’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/drb/drb.rb:1630:in
start_service' /filestore/rails/benefits_test/releases/20101129190121/vendor/plugins/ backgroundrb/lib/backgroundrb.rb:11 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:in
gem_original_require’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in
require' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/ activesupport-2.3.5/lib/active_support/dependencies.rb:158:in
require’
/filestore/rails/benefits_test/releases/20101129190121/vendor/plugins/
backgroundrb/init.rb:1:in
evaluate_init_rb' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/ lib/rails/plugin.rb:158:in
evaluate_init_rb’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:
11:in
silence_warnings' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/ lib/rails/plugin.rb:154:in
evaluate_init_rb’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/
lib/rails/plugin.rb:48:in
load' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/ lib/rails/plugin/loader.rb:38:in
load_plugins’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/
lib/rails/plugin/loader.rb:37:in
each' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/ lib/rails/plugin/loader.rb:37:in
load_plugins’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/
lib/initializer.rb:369:in
load_plugins' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/ lib/initializer.rb:165:in
process’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/
lib/initializer.rb:113:in
send' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/ lib/initializer.rb:113:in
run’
/filestore/rails/benefits_test/releases/20101129190121/config/
environment.rb:23
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in
gem_original_require' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:in
require’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/ activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
new_constants_in’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/
activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rails-2.3.5/ lib/tasks/misc.rake:4 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:636:in
call’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
lib/rake.rb:636:in
execute' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:631:in
each’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
lib/rake.rb:631:in
execute' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:597:in
invoke_with_call_chain’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/monitor.rb:242:in
synchronize' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:590:in
invoke_with_call_chain’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
lib/rake.rb:607:in
invoke_prerequisites' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:604:in
each’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
lib/rake.rb:604:in
invoke_prerequisites' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:596:in
invoke_with_call_chain’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/1.8/monitor.rb:242:in
synchronize' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:590:in
invoke_with_call_chain’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
lib/rake.rb:583:in
invoke' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:2051:in
invoke_task’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
lib/rake.rb:2029:in
top_level' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:2029:in
each’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
lib/rake.rb:2029:in
top_level' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:2068:in
standard_exception_handling’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
lib/rake.rb:2023:in
top_level' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:2001:in
run’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
lib/rake.rb:2068:in
standard_exception_handling' /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/ lib/rake.rb:1998:in
run’
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/
bin/rake:31
/opt/ruby-enterprise-1.8.7-2010.02/bin/rake:19:in `load’
/opt/ruby-enterprise-1.8.7-2010.02/bin/rake:19
I can ping the db with no problems and I can also telnet to the db
successfully from the app server:
[root@ps-test-app1 20101129190121]# telnet ps-test-db 3306
Trying 10.204.47.161…
Connected to ps-test-db.localdomain (10.204.47.161).
Escape character is ‘^]’.
4
5.1.33jSD7(_*2J\rJWW.~R[
ot packets out of orderConnection closed by foreign
host.
Im using the following database.yml:
production:
adapter: mysql
database: tsise_development
username: user
password: pass
host: ps-test-db
reconnect: true
Can someone please help me out?
Thanks,
Franck