Обсуждение: PSQLException: FATAL: password authentication failed for user "XXX"
Hi,
I have experienced authentication problems after applying a security
patch(147440-09) to Solaris 10.
PostgreSQL 9.2.1
JDBC: 9.2 1002
I got the following exception during startup of my application:
Caused by: org.postgresql.util.PSQLException: FATAL: password authentication
failed for user "XXX"
at
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:398)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:173)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)
at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)
at
org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)
at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:183)
at
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:172)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.ensureFirstConnectionAcquisition(C3P0PooledConnectionPoolManager.java:959)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.createPooledConnectionPool(C3P0PooledConnectionPoolManager.java:846)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:319)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0PooledConnectionPoolManager.java:311)
at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:134)
at
org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:132)
... 18 more
However I can login via psql
My pg_hba.conf file
# TYPE DATABASE USER ADDRESS METHOD
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
host replication XXX 127.0.0.1/32 md5
host replication XXX ::1/128 md5
Does anyone know how to fix it ?
PS.
I must say that uninstalling the security patch is not an option for me :)
Regards,
Paweł
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/PSQLException-FATAL-password-authentication-failed-for-user-XXX-tp5753396.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
On 26.04.2013 16:09, pawel_kukawski wrote: > Hi, > > I have experienced authentication problems after applying a security > patch(147440-09) to Solaris 10. > > PostgreSQL 9.2.1 > JDBC: 9.2 1002 Dunno what that Solaris patch has in it, but if you care about security, you'll also want to upgrade your PostgreSQL server to 9.2.4... - Heikki
pawel_kukawski <kukismen@gmail.com> writes:
> I have experienced authentication problems after applying a security
> patch(147440-09) to Solaris 10.
> PostgreSQL 9.2.1
> JDBC: 9.2 1002
> I got the following exception during startup of my application:
> Caused by: org.postgresql.util.PSQLException: FATAL: password authentication
> failed for user "XXX"
You might try looking into the postmaster log to see what the server
logged about it --- the log entries are frequently more verbose than
what the client got told. Also, if the problem isn't immediately
obvious from the log entry, try turning on log_connections to verify
that the JDBC app is connecting with the database+username and from
the IP address that you're expecting.
regards, tom lane
SOLVED. This problem seems to be connected with my JPA provider (EclipseLink) rather than JDBC driver. Upgrade to JDK 1.7u21 fixes the problem. Thanks, Paweł -- View this message in context: http://postgresql.1045698.n5.nabble.com/PSQLException-FATAL-password-authentication-failed-for-user-XXX-tp5753396p5753614.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.