Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I see this error message when I'm trying to connect to PostgreSQL from Eclipse.

org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres" at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:415) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:188) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64) at org.postgresql.jdbc2.AbstractJdbc2Connection.(AbstractJdbc2Connection.java:143) at org.postgresql.jdbc3.AbstractJdbc3Connection.(AbstractJdbc3Connection.java:29) at org.postgresql.jdbc3g.AbstractJdbc3gConnection.(AbstractJdbc3gConnection.java:21) at org.postgresql.jdbc4.AbstractJdbc4Connection.(AbstractJdbc4Connection.java:38) at org.postgresql.jdbc4.Jdbc4Connection.(Jdbc4Connection.java:24) at org.postgresql.Driver.makeConnection(Driver.java:412) at org.postgresql.Driver.connect(Driver.java:280) at org.eclipse.datatools.enablement.internal.postgresql.PostgreSQLJDBCConnection.createConnection(PostgreSQLJDBCConnection.java:87) at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105) at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54) at org.eclipse.datatools.enablement.internal.postgresql.PostgreSQLJDBCConnection.(PostgreSQLJDBCConnection.java:47) at org.eclipse.datatools.enablement.internal.postgresql.PostgreSQLConnectionFactory.createConnection(PostgreSQLConnectionFactory.java:51) at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83) at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359) at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76) at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

share|improve this question

closed as off-topic by RLF, Max Vernon, Paul White Oct 1 '15 at 1:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – RLF, Max Vernon, Paul White
If this question can be reworded to fit the rules in the help center, please edit the question.

5  
The error kind of explains the problem. password authentication failed for user "postgres" . Presumably you used the wrong password for the user postgres. – Craig Ringer Sep 30 '15 at 5:31

org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres" tells you the error, that your password failed to authenticate for the postgres user.

Fix the password using psql and \password and verify your pg_hba.conf using the pg_hba.conf documentation.

(Edited to take @CraigRinger's comments on the allowed authentication methods of PgJDBC into account)

share|improve this answer
    
peer isn't likely to work since Eclipse will be using PgJDBC which only supports TCP/IP, not unix sockets. Almost nothing runs an identd, so ident won't tend to work either. Really, it's a matter of getting the password right. – Craig Ringer Sep 30 '15 at 11:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.