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

OpenNMS unable to connect to opennms database with opennms username

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.8.8, 1.9.4
    • Fix Version/s: 1.8.9, 1.9.5
    • Component/s: Command-Line Tools
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:

      Description

      problem looks like the same as NMS-4378
      bash-3.00# pkginfo -l opennms
      PKGINST: opennms
      NAME: OpenNMS
      CATEGORY: application
      ARCH: all
      VERSION: 1.9.4
      BASEDIR: /
      VENDOR: The OpenNMS Group
      DESC: Enterprise-grade open source network management system
      PSTAMP: biggayal20110208183617
      INSTDATE: Feb 09 2011 11:56
      EMAIL: dj@opennms.org
      STATUS: completely installed
      FILES: 3441 installed pathnames
      341 directories
      949 executables
      280 setuid/setgid executables
      525154 blocks used (approx)

      bash-3.00#

      when i'm try to start opennms, i have this records in logfile:
      less /opt/opennms/logs/controller/controller.log
      2011-02-09 14:20:58,301 DEBUG [Main] OpenNMS.Manager.org.opennms.netmgt.config.ServiceConfigFactory: ServiceConfigFactory.init: config file p
      ath /opt/opennms/etc/service-configuration.xml
      2011-02-09 14:20:58,447 DEBUG [Main] org.exolab.castor.util.LocalConfiguration: Trying to load configuration file from jar:file:/opt/opennms/
      lib/opennms-services-1.9.4.jar!/castor.properties
      2011-02-09 14:21:01,557 DEBUG [Main] OpenNMS.Manager.org.opennms.netmgt.config.ServiceConfigFactory: ServiceConfigFactory.init: config file p
      ath /opt/opennms/etc/service-configuration.xml
      2011-02-09 14:21:01,768 DEBUG [Main] org.exolab.castor.util.LocalConfiguration: Trying to load configuration file from jar:file:/opt/opennms/
      lib/opennms-services-1.9.4.jar!/castor.properties
      2011-02-09 14:21:02,930 INFO [Main] OpenNMS.Manager.org.opennms.netmgt.vmmgr.DatabaseChecker: Data source 'opennms-admin' is missing from op
      ennms-datasources.xml
      2011-02-09 14:21:02,932 ERROR [Main] OpenNMS.Manager.org.opennms.netmgt.vmmgr.DatabaseChecker: Unable to connect to data source 'opennms' wit
      h username 'opennms', check opennms-datasources.xml and your database permissions.
      2011-02-09 14:21:02,935 ERROR [Main] OpenNMS.Manager.org.opennms.netmgt.vmmgr.Controller: error invoking check command
      org.opennms.netmgt.vmmgr.InvalidDataSourceException: Data source 'opennms' failed.
      at org.opennms.netmgt.vmmgr.DatabaseChecker.check(DatabaseChecker.java:166)
      at org.opennms.netmgt.vmmgr.Controller.check(Controller.java:271)
      at org.opennms.netmgt.vmmgr.Controller.main(Controller.java:180)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at org.opennms.bootstrap.Bootstrap$3.run(Bootstrap.java:352)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.sql.SQLException: No suitable driver
      at java.sql.DriverManager.getConnection(DriverManager.java:545)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at org.opennms.netmgt.vmmgr.DatabaseChecker.check(DatabaseChecker.java:160)

      from cli i'm connected with postgres without any problem:
      bash-3.00# /usr/postgres/8.3/bin/64/psql -d opennms -U opennms
      Welcome to psql 8.3.7, the PostgreSQL interactive terminal.

      Type: \copyright for distribution terms
      \h for help with SQL commands
      ? for help with psql commands
      \g or terminate with semicolon to execute query
      \q to quit

      opennms=# \l
      List of databases
      Name | Owner | Encoding
      ---------------------------
      opennms | postgres | UTF8
      postgres | postgres | UTF8
      template0 | postgres | UTF8
      template1 | postgres | UTF8
      (4 rows)

      opennms=#

      i commented out "opennms-admin" section but it don't help

      bash-3.00# cat /opt/opennms/etc/opennms-datasources.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <datasource-configuration xmlns:this="http://xmlns.opennms.org/xsd/config/opennms-datasources"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://xmlns.opennms.org/xsd/config/opennms-datasources
      http://www.opennms.org/xsd/config/opennms-datasources.xsd ">
      <jdbc-data-source name="opennms"
      database-name="opennms"
      class-name="org.postgresql.Driver"
      url="jdbc:postgresql://localhost:5432/opennms"
      user-name="opennms"
      password="opennms" />
      <!--
      <jdbc-data-source name="opennms-admin"
      database-name="template1"
      class-name="org.postgresql.Driver"
      url="jdbc:postgresql://localhost:5432/template1"
      user-name="postgres"
      password="" /> -->
      </datasource-configuration>

      bash-3.00#

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              andy clark Andrew Clark
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: