Обсуждение: please help
I got following error, goggling hundreds of material and still no clue. Please help.
best regards,
abdi indra
# $OPENNMS_HOME/bin/install -dis
==============================================================================
OpenNMS Installer Version $Id: Installer.java 11800 2009-01-11 23:04:48Z dhustace $
==============================================================================
Configures PostgreSQL tables, users, and other miscellaneous settings.
- searching for jicmp:
- trying to load /usr/lib/libjicmp.so: OK
- searching for jrrd:
- trying to load /usr/lib/libjrrd.so: OK
- checking database version... Exception in thread "main" java.sql.SQLException: Could not get an administrative connection to the database. Is the database running, listening for TCP connections, and allowing us to connect and authenticate from localhost? Tried connecting to database specified by data source SimpleDataSource[URL='jdbc:postgresql://192.168.110.133:5432/template1', driver class='org.postgresql.Driver', properties: user='postgres', password='']. Original error: org.postgresql.util.PSQLException: FATAL: missing or erroneous pg_hba.conf file
at org.opennms.netmgt.dao.db.InstallerDb.rethrowDatabaseConnectionException(InstallerDb.java:2214)
at org.opennms.netmgt.dao.db.InstallerDb.initializeAdminConnection(InstallerDb.java:2191)
at org.opennms.netmgt.dao.db.InstallerDb.getAdminConnection(InstallerDb.java:2180)
at org.opennms.netmgt.dao.db.InstallerDb.databaseCheckVersion(InstallerDb.java:1526)
at org.opennms.install.Installer.install(Installer.java:194)
at org.opennms.install.Installer.main(Installer.java:778)
Caused by: org.postgresql.util.PSQLException: FATAL: missing or erroneous pg_hba.conf file
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:94)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:116)
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:369)
at org.postgresql.Driver.connect(Driver.java:245)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.opennms.netmgt.dao.db.SimpleDataSource.getConnection(SimpleDataSource.java:79)
at org.opennms.netmgt.dao.db.InstallerDb.initializeAdminConnection(InstallerDb.java:2189)
... 4 more
This is pg_hba.conf
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all ident sameuser
local all all 192.168.110.133 trust
# IPv4 local connections:
host all all 127.0.0.1/32 ident sameuser
host all all 192.168.110.133/32 trust
# IPv6 local connections:
host all all ::1/128 ident sameuser
host all all 192.168.110.133/255.255.255.255 trust
this is postgres.conf
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
port = 5432
max_connections = 100
Get your preferred Email name!
Now you can @ymail.com and @rocketmail.com.
On Wed, 18 Feb 2009, abdi indra wrote: > org.postgresql.util.PSQLException: FATAL: missing or erroneous > pg_hba.conf This is not a Java/JDBC problem, but a server configuration problem. > local all all 192.168.110.133 trust This line is bogus because local means a unix domain socket which doesn't have an IP address. > host all all 192.168.110.133/255.255.255.255 > trust This isn't a valid line either. You want the CIDR /32 format, not a netmask. Kris Jurka