Pergunta

While running the server, I am unable to view the layers in GeoServer. I checked the Enabled checkbox, and still I am unable to view the map. If I login once again into GeoServer, the Enabled checkbox is unchecked. The below error which I got in logs after starting the Apache Tomcat Server:

Caused by: java.lang.RuntimeException: Unable to obtain connection: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "postgres")

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "postgres")

Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"

ERROR [geotools.jdbc] - There's code using JDBC based datastore and not disposing them. This may lead to temporary loss of database connections. Please make sure all data access code calls DataStore.dispose() before freeing all references to it.

Foi útil?

Solução

The one thing that can cause this suddenly is password expiration in PostgreSQL, though this is not typical. Most likely the password changed on one of the sides, so check that first.

PostgreSQL allows you to specify that a password expires at a specific timestamp. So you can:

 ALTER USER foo WITH PASSWORD 'bar' VALID UNTIL 'tomorrow';

And foo will be able to log in with the password 'bar' until the next day at system time....

So if you can verify that the password did not change on both sides, try this:

ALTER USER foo WITH VALID UNTIL 'infinity';

Of course substitute your real user for foo. This will clear any expiration, or rather move the expiration time indefinitely into the future.

Outras dicas

I think this is likely to be that the postgres user is configured to only accept logins from the local machine. You will need to configure it to accept logins from the machine name or ip address you are logining in from or even better create a new user that has only the required permissions to login rather than using the deffault admin postgres user. Even if you are on the same machine using eclipse may be making it look as though you are coming from a different machine depending on your configuration.

Please see here and here about configuring this type of access

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top