FATAL 1: Password authentication failed

From: "Godson Retna" <godsonr(at)siptech(dot)co(dot)in>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: FATAL 1: Password authentication failed
Date: 2002-12-10 13:23:58
Message-ID: NGBBIKACPKEPGIODDAKHOEDECFAA.godsonr@siptech.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi

I have tested some java code to connect to PostgreSQL database using 'trust'
relationship, which works.

quote:
----------------------------------------------------------------------------
----
[snathan(at)sip008 security]$ java Sample
DAtabase :PostGRESQL
Inside Main of Sample ####
Here
Database Driver rg.postgresql.Driver
Database Datasource :jdbcostgresql://192.168.66.3:5432/test
Database Login :u_test
Database Password :u_test
----------------------------------------------------------------------------
----

However, when I change the pg_hba.conf to have 'password' or 'md5' or
'crypt', the connection fails with the above error. But, I am able to
connect using 'psql' ...

quote:
----------------------------------------------------------------------------
----
[snathan(at)sip008 security]$ java Sample
DAtabase :PostGRESQL
Inside Main of Sample ####
Here
Database Driver rg.postgresql.Driver
Database Datasource :jdbcostgresql://192.168.66.3:5432/test
Database Login :u_test
Database Password :u_test
Something unusual has occured to cause the driver to fail. Please report
this exception: Exception: java.sql.SQLException: FATAL 1: Password
authentication failed for user "u_test"

Stack Trace:

java.sql.SQLException: FATAL 1: Password authentication failed for user
"u_test"

at org.postgresql.Connection.openConnection(Connection.java:178)
at org.postgresql.Driver.connect(Driver.java:149)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Sample.getConnectionToDatabase(Sample.java:58)
at Sample.main(Sample.java:22)
End of Stack Trace

at org.postgresql.Driver.connect(Driver.java:166)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Sample.getConnectionToDatabase(Sample.java:58)
at Sample.main(Sample.java:22)

----------------------------------------------------------------------------
----

Thanks for your valuable input.

Best Regards.

Godson R.
Chennai, India.

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ian Barwick 2002-12-10 15:38:03 Re: [INTERFACES] Patch for DBD::Pg pg_relcheck problem
Previous Message Tom Lane 2002-12-09 23:47:30 Re: Patch for DBD::Pg pg_relcheck problem