Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9633

JDBC collector event reason provides no useful information

    XMLWordPrintable

    Details

    • Sprint:
      Horizon - Feb 6th 2019

      Description

      "XY data collection on interface 10.10.3.118 failed because of the following condition 'Collection failed.'."

      This error message doesn't help to find a cause. But we have the event reason as you can see below:
       

      The log file give useful information:

      org.opennms.netmgt.collection.api.CollectionException: Collection failed. at org.opennms.netmgt.collectd.CollectionSpecification$1.onUnknown(CollectionSpecification.java:310) at org.opennms.netmgt.collectd.CollectionSpecification$1.onUnknown(CollectionSpecification.java:287) at org.opennms.core.rpc.api.RpcExceptionUtils.handleException(RpcExceptionUtils.java:56) at org.opennms.netmgt.collectd.CollectionSpecification.collect(CollectionSpecification.java:287) at org.opennms.netmgt.collectd.CollectableService.doCollection(CollectableService.java:428) at org.opennms.netmgt.collectd.CollectableService.doRun(CollectableService.java:360) at org.opennms.netmgt.collectd.CollectableService.access$200(CollectableService.java:80) at org.opennms.netmgt.collectd.CollectableService$1.run(CollectableService.java:332) at org.opennms.core.logging.Logging.withPrefix(Logging.java:71) at org.opennms.netmgt.collectd.CollectableService.run(CollectableService.java:321) at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:179) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.ExecutionException: org.opennms.netmgt.collectd.jdbc.JdbcCollectorException: Unable to connect to JDBC URL: 'jdbc:postgresql://10.10.7.161:6432/DBNAME' at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) at org.opennms.netmgt.collectd.CollectionSpecification.collect(CollectionSpecification.java:279) ... 11 more Caused by: org.opennms.netmgt.collectd.jdbc.JdbcCollectorException: Unable to connect to JDBC URL: 'jdbc:postgresql://10.10.7.161:6432/DBNAME' at org.opennms.netmgt.collectd.jdbc.JdbcAgentState.getJdbcConnection(JdbcAgentState.java:126) at org.opennms.netmgt.collectd.JdbcCollector.isGroupAvailable(JdbcCollector.java:244) at org.opennms.netmgt.collectd.JdbcCollector.collect(JdbcCollector.java:133) at org.opennms.netmgt.collection.client.rpc.CollectorClientRpcModule$1.get(CollectorClientRpcModule.java:83) at org.opennms.netmgt.collection.client.rpc.CollectorClientRpcModule$1.get(CollectorClientRpcModule.java:77) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Caused by: org.postgresql.util.PSQLException: ERROR: Auth failed at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:446) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:220) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:55) at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:219) at org.postgresql.Driver.makeConnection(Driver.java:407) at org.postgresql.Driver.connect(Driver.java:275) at org.opennms.netmgt.collectd.jdbc.JdbcAgentState.getJdbcConnection(JdbcAgentState.java:120)

      It would be nice to have (in this case) the auth error message as event reason. I've also seen typical pg_hba entry is missing errors which would make the admins life easier, if it would be shown in the event

        Attachments

          Activity

            People

            • Assignee:
              cgorantla Chandra Gorantla
              Reporter:
              fuhrmann Marcel Fuhrmann
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: