2

Following error is arriving while I initailize after downloading the packages of opennms:

PLease tell me what I am doing wrong or any suggestions how to resolve this issue

OpenNMS Installer

Configures PostgreSQL tables, users, and other miscellaneous settings.

15:48:58.468 [Main] WARN  org.opennms.install.Installer - Could not create file: /usr/share/opennms/etc/libraries.properties
- using SQL directory... /usr/share/opennms/etc
- using create.sql... /usr/share/opennms/etc/create.sql
15:48:58.496 [Main] INFO  org.opennms.core.schema.Migrator - validating database version
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.opennms.bootstrap.Bootstrap$4.run(Bootstrap.java:525)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.opennms.core.schema.MigrationException: an error occurred getting the version from the database
    at org.opennms.core.schema.Migrator.getDatabaseVersion(Migrator.java:183)
    at org.opennms.core.schema.Migrator.validateDatabaseVersion(Migrator.java:211)
    at org.opennms.install.Installer.install(Installer.java:245)
    at org.opennms.install.Installer.main(Installer.java:991)
    ... 6 more
Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
    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 java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:208)
    at org.opennms.core.db.install.SimpleDataSource.getConnection(SimpleDataSource.java:113)
    at org.opennms.core.schema.Migrator.getDatabaseVersion(Migrator.java:171)
    ... 9 more

Any suggestions?

Varun Singh
  • 444
  • 6
  • 21
  • I am using ubuntu 14.04 , postgres version 9.3 and opennms-22. I have installed opennms but initialization has failed. I m trying to initialize opennms by running ${OPENNMS_HOME}/bin/install -dis but it shows that connnection ins refused and cI can inderstand there is something wrong with the opennms-datasource.xml file but unable to identify the problem. – Varun Singh Aug 01 '18 at 11:35

1 Answers1

2

It looks like you do not have permission to access the PostgreSQL database.

Did you edit pg_hba.conf?

I made a video on installing OpenNMS that you might find helpful. It covers the changes you need to make to PostgreSQL so that OpenNMS can access it.

  • Oh yes I did change the pg_hba.conf according to the documention – Varun Singh Aug 03 '18 at 10:49
  • Also thanks fro replying but I remembered that once when I ran opennms in ubuntu I tared the packages and stored in ftp. Now when I m installing from package it directly starts without any extra changes – Varun Singh Aug 03 '18 at 10:50