Welcome Guest | Login

PGError (FATAL: password authentication failed for user ...)

Hi,

Have been trying to get my rails app working for the last 12 hours! I have done everything as explained in the tutorial:

1. DB (postgres) created, db user created, user assigned to the DB,
2. The correct DB name and username (with the hostingrails user name and underscore prefixed) entered in the database.yml file
3. The rails env set to production in environments.rb
4. The correct shebang in dispatch.fcgi and dispatch.rb
5. The appropriate lines commented out and appropriate rewrite rule set in .htaccess

But still I get a 500 error. The cause, per the production.log:

PGError (FATAL:  password authentication failed for user ...)

In fact I created a db in mysql and tried but in that also I got a similar authentication error.Strangely, am able to log into both these databases from the shell using the same username and password as in the database.yml file! Have also checked the indentation in database.yml and that looks fine!

I ran the public/dispatch.fcgi script many times out of which twice I got the index page output to the console. The rest of the time it too returned the 500 error for the same reason quoted above!

My app is (or should be?) available on icf-alhpa.mindplough.com

The relevant portions of production.log:

Processing HomeController#index (for at 2008-02-19 23:20:19) [GET]
Session ID: 0e90bd0aea2ae6230f62dda8b2cae75e
Parameters: {"action"=>"index", "controller"=>"home"}


Processing HomeController#index (for at 2008-02-19 23:20:19) [GET]
Session ID: 0e90bd0aea2ae6230f62dda8b2cae75e
Parameters: {"action"=>"index", "controller"=>"home"}


PGError (FATAL: password authentication failed for user "..._..."
):
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:713:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:713:in `connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:713:in `connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:237:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:23:in `new'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:23:in `postgresql_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `connection='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in `retrieve_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:101:in `process_request'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:149:in `with_signal_handler'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:99:in `process_request'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:77:in `process_each_request'
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:606:in `each_cgi'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:76:in `process_each_request'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:50:in `process!'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:24:in `process!'
public/dispatch.fcgi:24

Rendering ..../public/500.html (500 Internal Server Error)


Pls help.

Thanks,
mano

2008-02-19 11:26 PM

I've made some changes in the PostgreSQL configuration. Please check now.

2008-02-19 11:56 PM

Hi Santhi,

Just checked. Get the same error!

Thanks,
mano

2008-02-20 01:50 AM

Please check now.

2008-02-20 02:28 AM

It works now :-)

Thanks a ton, Santhi.

regds,
mano

2008-02-20 02:32 AM


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