Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"rake db:migrate" gives "fe_sendauth: no password supplied" error #80

Closed
harsh-parihar opened this issue Jul 23, 2014 · 5 comments
Closed

Comments

@harsh-parihar
Copy link

I am getting this error while running Capistrano command when it tries to run "rake db:migrate"

INFO[c03035dd] Running ~/.rvm/bin/rvm default do bundle exec rake db:migrate on 128.199.211.80
DEBUG[c03035dd] Command: cd /home/deploy/my_app/releases/20140723173643 && ( RAILS_ENV=production ~/.rvm/bin/rvm default do bundle exec rake db:migrate )
DEBUG[c03035dd]   rake aborted!
DEBUG[c03035dd]   PG::ConnectionBad: fe_sendauth: no password supplied
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:881:in `initialize'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:881:in `new'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:881:in `connect'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:568:in `initialize'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `acquire_connection'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:350:in `checkout'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_handling.rb:87:in `connection'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:910:in `initialize'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:807:in `new'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:807:in `up'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/migration.rb:785:in `migrate'
DEBUG[c03035dd]   /home/deploy/my_app/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
DEBUG[c03035dd]   Tasks: TOP => db:migrate
DEBUG[c03035dd]   (See full trace by running task with --trace)
@Kriechi
Copy link
Contributor

Kriechi commented Aug 18, 2014

Looks to me like a postgres related error?
PG::ConnectionBad: fe_sendauth: no password supplied

Is your database.yml valid and filled with proper values?
Are you able to migrate manually via SSH on the server?

@ghn
Copy link

ghn commented Oct 3, 2014

this is a rails_env issue.
If you run the same command starting with "RAILS_ENV=production" it'll work.

RAILS_ENV=production bundle exec rake db:migrate

@Kriechi
Copy link
Contributor

Kriechi commented Oct 4, 2014

It is running with RAILS_ENV=production - or am I reading this wrong:

DEBUG[c03035dd] Command: cd /home/deploy/my_app/releases/20140723173643 && ( RAILS_ENV=production ~/.rvm/bin/rvm default do bundle exec rake db:migrate )

@kirs
Copy link
Member

kirs commented Dec 13, 2014

@Kriechi thanks for explanation.

I guess that PG::ConnectionBad from the Rails stack has no connection with the capistrano-rails code.

@kirs kirs closed this as completed Dec 13, 2014
@eduavencama
Copy link

eduavencama commented Apr 21, 2017

My friend, I was have the same problem. My solution was added the credentials for each environment and enable the host in th value localhost..

like this:

development:
  <<: *default
  database: SM_development
  username: user
  password: xxxx

host: localhost

test:
  <<: *default
  database: SM_test
  username: user
  password: xxxxxx

production:
  <<: *default
  database: SM_production
  username: user
  password: xxxxxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants