Is it possible to manually add a resource via CLI?
Joseph Marques
jmarques at redhat.com
Fri Jun 25 15:20:20 UTC 2010
Your logs indicate the process table scan is succeeding, but the overall
discovery workflow is not completing successfully. I've diagnosed the
issue in some detail and found that this is a regression over how
Postgres auto-discovery worked in previous releases --
https://bugzilla.redhat.com/show_bug.cgi?id=608064
If you're using HEAD of master or release-3.0.0 branch, you'll see this
issue. I've pinged the developer in question, so keep an eye on that BZ
for updates next week.
-joseph
On 06/25/2010 09:37 AM, Alexey Kamenchuk wrote:
> Hi Joseph
>
> Thanks a lot for your prompt and detailed answer
>
> Re process scan based auto discovery. For some reason it doesnt work
> for me. Below is the exception I can see in the agent logs. Any chance
> you can advise whats wrong here?
>
> Thank you
> WBR
> Alexey
>
>
>
> 2010-06-21 12:09:09,271 INFO [InventoryManager.discovery-1]
> (rhq.core.pc.inventory.AutoDiscoveryExecutor)- Process scan
> auto-detected new server resource: scan=[ProcessScan:
> query=[process|basename|match=^(postgres|postmaster)$,process|basename|nomatch|parent=^(postgres|postmaster)$],
> name=[unix]], discovered-process=[process: pid=[20646],
> name=[/data/pgsql/bin/postgres], ppid=[1]]
> 2010-06-21 12:09:09,292 INFO
> [ResourceDiscoveryComponent.invoker.daemon-2]
> (org.rhq.plugins.postgres.PostgresDiscoveryComponent)- Discovered a
> postgres process: ProcessScanResult: scan=[
> ProcessScan:
> query=[process|basename|match=^(postgres|postmaster)$,process|basename|nomatch|parent=^(postgres|postmaster)$],
> name=[unix]], info=[process: pid=[20646], name=[/data/pgsql/bi
> n/postgres], ppid=[1]]
> 2010-06-21 12:09:09,344 INFO
> [ResourceDiscoveryComponent.invoker.daemon-2]
> (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.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.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:195)
>
> at
> org.rhq.plugins.postgres.PostgresDiscoveryComponent.getConnection(PostgresDiscoveryComponent.java:259)
>
> at
> org.rhq.plugins.postgres.PostgresDiscoveryComponent.createResourceDetails(PostgresDiscoveryComponent.java:150)
>
> at
> org.rhq.plugins.postgres.PostgresDiscoveryComponent.discoverResources(PostgresDiscoveryComponent.java:123)
>
> at sun.reflect.GeneratedMethodAccessor37.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.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:266)
>
> 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:619)
> 2010-06-21 12:09:09,345 WARN [InventoryManager.discovery-1]
> (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for
> [Postgres Server] Resources - failed after 56 ms.
> java.lang.Exception: Discovery component invocation failed.
> at
> org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:270)
>
> 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:619)
> Caused by: java.lang.NullPointerException
> at
> org.rhq.plugins.postgres.PostgresDiscoveryComponent.getDatabaseNames(PostgresDiscoveryComponent.java:277)
>
> at
> org.rhq.plugins.postgres.PostgresDiscoveryComponent.getServerResourceName(PostgresDiscoveryComponent.java:295)
>
> at
> org.rhq.plugins.postgres.PostgresDiscoveryComponent.createResourceDetails(PostgresDiscoveryComponent.java:151)
>
> at
> org.rhq.plugins.postgres.PostgresDiscoveryComponent.discoverResources(PostgresDiscoveryComponent.java:123)
>
> at sun.reflect.GeneratedMethodAccessor37.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.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:266)
>
> ... 5 more
>
> On 20.06.2010 21:49, Joseph Marques wrote:
>> Any database instances should be automatically discovered via a
>> process scan.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://fedorahosted.org/pipermail/rhq-users/attachments/20100625/8fb29800/attachment-0001.html
More information about the rhq-users
mailing list