Bug 675862 - Agent appears to assume default postgres user credentials
Agent appears to assume default postgres user credentials
Status: CLOSED NOTABUG
Product: RHQ Project
Classification: Other
Component: Configuration (Show other bugs)
4.0.0.B02
x86_64 Windows
unspecified Severity high (vote)
: ---
: ---
Assigned To: Thomas Segismont
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-07 19:40 EST by Rick Herrick
Modified: 2014-04-04 04:25 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-04 04:25:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rick Herrick 2011-02-07 19:40:51 EST
Description of problem:
Installed onto system with PostgreSQL 9.0.2. postgres user existed in database, but password had been changed from default of 'postgres'. Dashboard showed PostgreSQL service as down even though it was running (verified with queries in the pgAdmin3 tool). No configuration was available on the postgres page in the inventory.

Checking the agent.log gave the following error:

2011-02-07 18:23:15,898 INFO  [ResourceContainer.invoker.daemon-10] (org.rhq.plugins.postgres.PostgresDiscoveryComponent)- Failed to connect to the database
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
	at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
	at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
	at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
	at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)
	at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)
	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 java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at org.rhq.plugins.postgres.PostgresDiscoveryComponent.buildConnection(PostgresDiscoveryComponent.java:230)
	at org.rhq.plugins.postgres.PostgresServerComponent.getConnection(PostgresServerComponent.java:135)
	at org.rhq.plugins.postgres.PostgresServerComponent.getAvailability(PostgresServerComponent.java:117)
	at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

I changed the postgres user password back to 'postgres' and the service was able to find the postgres service without logging an error message.

Version-Release number of selected component (if applicable):
rhq-enterprise-agent-4.0.0.B02
rhq-server-4.0.0.B02
PostgreSQL 9.0.2

How reproducible:

Steps to Reproduce:
1. Install PostgreSQL.
2. Change the password for the postgres user.
3. Install the RHQ server and agent and go through autodiscovery.
4. Accept all discovered services.
  
Actual results:
Unable to access postgres server.

Expected results:
Password would be handled somehow.

Additional info:
After resetting postgres user password and restarting agent, error on postgres server went away.
Comment 1 Thomas Segismont 2014-04-04 04:25:21 EDT
Password configuration is possible, you need to navigate to the "Connection Settings" tab of resource.

Note You need to log in before you can comment on or make changes to this bug.