当前位置: 技术问答>linux和unix
初始化OpenNMS 與 Database問題
来源: 互联网 发布时间:2016-06-17
本文导语: 麻煩各位高手幫忙看看,十分感激。 我做到初始化OpenNMS的数据库這步時出現如下情況 環境:Centos 5.2 (1/5): jicmp-1.0.7-1.i386 (2/5): opennms-1.7.5-0.13 (3/5): jdk-1_5_0_18-linux (4/5): opennms-webapp-jet (5/5): opennms-core-1.7.5 [root@...
麻煩各位高手幫忙看看,十分感激。
我做到初始化OpenNMS的数据库這步時出現如下情況
環境:Centos 5.2
(1/5): jicmp-1.0.7-1.i386
(2/5): opennms-1.7.5-0.13
(3/5): jdk-1_5_0_18-linux
(4/5): opennms-webapp-jet
(5/5): opennms-core-1.7.5
[root@localhost bin]# $OPENNMS_HOME/bin/install -l /usr/local/lib -dis
==============================================================================
OpenNMS Installer Version $Id: Installer.java 13609 2009-06-07 00:59:50Z rangerr
ick $
==============================================================================
Configures PostgreSQL tables, users, and other miscellaneous settings.
- searching for jicmp:
- trying to load /usr/local/lib/libjicmp.so: NO
- trying to load /usr/lib/libjicmp.so: OK
- searching for jrrd:
- trying to load /usr/local/lib/libjrrd.so: NO
- trying to load /usr/lib/libjrrd.so: NO
- trying to load /usr/java/jdk1.5.0_18/jre/lib/i386/client/libjrrd.so: NO
- trying to load /usr/java/jdk1.5.0_18/jre/lib/i386/libjrrd.so: NO
- trying to load /usr/java/jdk1.5.0_18/jre/../lib/i386/libjrrd.so: NO
- trying to load /libjrrd.so: NO
- trying to load /opt/opennms/lib/libjrrd.so: NO
- trying to load /usr/lib/jni/libjrrd.so: NO
- trying to load /usr/lib/libjrrd.so: NO
- trying to load /usr/local/lib/libjrrd.so: NO
- trying to load /opt/NMSjicmp/lib/32/libjrrd.so: NO
- trying to load /opt/NMSjicmp/lib/64/libjrrd.so: NO
- Failed to load the optional jrrd library.
- This error is not fatal, since jrrd is only required for optional features.
- For more information, see http://www.opennms.org/index.php/jrrd
- using SQL directory... /opt/opennms/etc
- using create.sql... /opt/opennms/etc/create.sql
* using 'postgres' as the PostgreSQL user for OpenNMS
* using '' as the PostgreSQL password for OpenNMS
* using 'opennms' as the PostgreSQL database name for OpenNMS
- checking if database "opennms" is unicode... ALREADY UNICODE
- Checking for old import files in /opt/opennms/etc... DONE
- Migrating/creating database:
Jul 9, 2009 1:00:41 PM liquibase.database.template.JdbcTemplate comment
INFO: Lock Database
Jul 9, 2009 1:00:41 PM liquibase.lock.LockHandler acquireLock
INFO: Successfully acquired change log lock
Jul 9, 2009 1:00:44 PM liquibase.database.AbstractDatabase getRanChangeSetList
INFO: Reading from databasechangelog
Jul 9, 2009 1:01:04 PM liquibase.database.template.JdbcTemplate comment
INFO: Changeset stored-procedures/getManagePercentAvailIntfWindow.xml::getManage
PercentAvailIntfWindow::rangerrick::(MD5Sum: ae6ef5514fb6bc147099ad82f796645)
Jul 9, 2009 1:01:04 PM liquibase.database.template.JdbcTemplate comment
INFO: Release Database Lock
Jul 9, 2009 1:01:04 PM liquibase.lock.LockHandler releaseLock
INFO: Successfully released change log lock
Exception in thread "main" org.opennms.core.schema.MigrationException: unable to
update the database
at org.opennms.core.schema.Migrator.migrate(Migrator.java:290)
at org.opennms.install.Installer.install(Installer.java:282)
at org.opennms.install.Installer.main(Installer.java:858)
Caused by: liquibase.exception.MigrationFailedException: Migration failed for ch
ange set stored-procedures/getManagePercentAvailIntfWindow.xml::getManagePercent
AvailIntfWindow::rangerrick:
Reason: liquibase.exception.JDBCException: Error executing SQL CREATE OR RE
PLACE FUNCTION getManagePercentAvailIntfWindow(integer,varchar(16), timestamp wi
thout time zone, timestamp without time zone)
RETURNS float8 AS '
DECLARE
nid ALIAS FOR $1;
ipid ALIAS FOR $2;
xtime ALIAS FOR $3;
ytime ALIAS FOR $4;
downtime float8 := 0.0;
count integer := 0;
rollingWindow float := 0;
totalServiceTime float := 0;
BEGIN
IF xtime 0 THEN
RETURN 100 * (1 - (downtime / totalServiceTime));
ELSE
IF totalServiceTime = 0 THEN
RETURN 100;
ELSE
RETURN -1;
END IF;
END IF;
END;
' LANGUAGE 'plpgsql';:
Caused By: Error executing SQL CREATE OR REPLACE FUNCTION getManagePer
centAvailIntfWindow(integer,varchar(16), timestamp without time zone, timestamp
without time zone)
RETURNS float8 AS '
DECLARE
nid ALIAS FOR $1;
ipid ALIAS FOR $2;
xtime ALIAS FOR $3;
ytime ALIAS FOR $4;
downtime float8 := 0.0;
count integer := 0;
rollingWindow float := 0;
totalServiceTime float := 0;
BEGIN
IF xtime 0 THEN
RETURN 100 * (1 - (downtime / totalServiceTime));
ELSE
IF totalServiceTime = 0 THEN
RETURN 100;
ELSE
RETURN -1;
END IF;
END IF;
END;
' LANGUAGE 'plpgsql';:
Caused By: ERROR: language "plpgsql" does not exist
at liquibase.ChangeSet.execute(ChangeSet.java:238)
at liquibase.parser.visitor.UpdateVisitor.visit(UpdateVisitor.java:26)
at liquibase.parser.ChangeLogIterator.run(ChangeLogIterator.java:41)
at liquibase.Liquibase.update(Liquibase.java:112)
at org.opennms.core.schema.Migrator.migrate(Migrator.java:287)
... 2 more
Caused by: liquibase.exception.JDBCException: Error executing SQL CREATE OR REPL
ACE FUNCTION getManagePercentAvailIntfWindow(integer,varchar(16), timestamp with
out time zone, timestamp without time zone)
RETURNS float8 AS '
DECLARE
nid ALIAS FOR $1;
ipid ALIAS FOR $2;
xtime ALIAS FOR $3;
ytime ALIAS FOR $4;
downtime float8 := 0.0;
count integer := 0;
rollingWindow float := 0;
totalServiceTime float := 0;
BEGIN
IF xtime 0 THEN
RETURN 100 * (1 - (downtime / totalServiceTime));
ELSE
IF totalServiceTime = 0 THEN
RETURN 100;
ELSE
RETURN -1;
END IF;
END IF;
END;
' LANGUAGE 'plpgsql';
at liquibase.database.template.JdbcTemplate.execute(JdbcTemplate.java:56
)
at liquibase.database.template.JdbcTemplate.execute(JdbcTemplate.java:87
)
at liquibase.change.AbstractChange.execute(AbstractChange.java:251)
at liquibase.change.AbstractChange.executeStatements(AbstractChange.java
:97)
at liquibase.ChangeSet.execute(ChangeSet.java:214)
... 6 more
Caused by: org.postgresql.util.PSQLException: ERROR: language "plpgsql" does not
exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx
ecutorImpl.java:1525)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
Impl.java:1309)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
va:188)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstract
Jdbc2Statement.java:340)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:332)
at liquibase.database.template.JdbcTemplate$1ExecuteStatementCallback.do
InStatement(JdbcTemplate.java:79)
at liquibase.database.template.JdbcTemplate.execute(JdbcTemplate.java:49
)
... 10 more
[root@localhost bin]#
我做到初始化OpenNMS的数据库這步時出現如下情況
環境:Centos 5.2
(1/5): jicmp-1.0.7-1.i386
(2/5): opennms-1.7.5-0.13
(3/5): jdk-1_5_0_18-linux
(4/5): opennms-webapp-jet
(5/5): opennms-core-1.7.5
[root@localhost bin]# $OPENNMS_HOME/bin/install -l /usr/local/lib -dis
==============================================================================
OpenNMS Installer Version $Id: Installer.java 13609 2009-06-07 00:59:50Z rangerr
ick $
==============================================================================
Configures PostgreSQL tables, users, and other miscellaneous settings.
- searching for jicmp:
- trying to load /usr/local/lib/libjicmp.so: NO
- trying to load /usr/lib/libjicmp.so: OK
- searching for jrrd:
- trying to load /usr/local/lib/libjrrd.so: NO
- trying to load /usr/lib/libjrrd.so: NO
- trying to load /usr/java/jdk1.5.0_18/jre/lib/i386/client/libjrrd.so: NO
- trying to load /usr/java/jdk1.5.0_18/jre/lib/i386/libjrrd.so: NO
- trying to load /usr/java/jdk1.5.0_18/jre/../lib/i386/libjrrd.so: NO
- trying to load /libjrrd.so: NO
- trying to load /opt/opennms/lib/libjrrd.so: NO
- trying to load /usr/lib/jni/libjrrd.so: NO
- trying to load /usr/lib/libjrrd.so: NO
- trying to load /usr/local/lib/libjrrd.so: NO
- trying to load /opt/NMSjicmp/lib/32/libjrrd.so: NO
- trying to load /opt/NMSjicmp/lib/64/libjrrd.so: NO
- Failed to load the optional jrrd library.
- This error is not fatal, since jrrd is only required for optional features.
- For more information, see http://www.opennms.org/index.php/jrrd
- using SQL directory... /opt/opennms/etc
- using create.sql... /opt/opennms/etc/create.sql
* using 'postgres' as the PostgreSQL user for OpenNMS
* using '' as the PostgreSQL password for OpenNMS
* using 'opennms' as the PostgreSQL database name for OpenNMS
- checking if database "opennms" is unicode... ALREADY UNICODE
- Checking for old import files in /opt/opennms/etc... DONE
- Migrating/creating database:
Jul 9, 2009 1:00:41 PM liquibase.database.template.JdbcTemplate comment
INFO: Lock Database
Jul 9, 2009 1:00:41 PM liquibase.lock.LockHandler acquireLock
INFO: Successfully acquired change log lock
Jul 9, 2009 1:00:44 PM liquibase.database.AbstractDatabase getRanChangeSetList
INFO: Reading from databasechangelog
Jul 9, 2009 1:01:04 PM liquibase.database.template.JdbcTemplate comment
INFO: Changeset stored-procedures/getManagePercentAvailIntfWindow.xml::getManage
PercentAvailIntfWindow::rangerrick::(MD5Sum: ae6ef5514fb6bc147099ad82f796645)
Jul 9, 2009 1:01:04 PM liquibase.database.template.JdbcTemplate comment
INFO: Release Database Lock
Jul 9, 2009 1:01:04 PM liquibase.lock.LockHandler releaseLock
INFO: Successfully released change log lock
Exception in thread "main" org.opennms.core.schema.MigrationException: unable to
update the database
at org.opennms.core.schema.Migrator.migrate(Migrator.java:290)
at org.opennms.install.Installer.install(Installer.java:282)
at org.opennms.install.Installer.main(Installer.java:858)
Caused by: liquibase.exception.MigrationFailedException: Migration failed for ch
ange set stored-procedures/getManagePercentAvailIntfWindow.xml::getManagePercent
AvailIntfWindow::rangerrick:
Reason: liquibase.exception.JDBCException: Error executing SQL CREATE OR RE
PLACE FUNCTION getManagePercentAvailIntfWindow(integer,varchar(16), timestamp wi
thout time zone, timestamp without time zone)
RETURNS float8 AS '
DECLARE
nid ALIAS FOR $1;
ipid ALIAS FOR $2;
xtime ALIAS FOR $3;
ytime ALIAS FOR $4;
downtime float8 := 0.0;
count integer := 0;
rollingWindow float := 0;
totalServiceTime float := 0;
BEGIN
IF xtime 0 THEN
RETURN 100 * (1 - (downtime / totalServiceTime));
ELSE
IF totalServiceTime = 0 THEN
RETURN 100;
ELSE
RETURN -1;
END IF;
END IF;
END;
' LANGUAGE 'plpgsql';:
Caused By: Error executing SQL CREATE OR REPLACE FUNCTION getManagePer
centAvailIntfWindow(integer,varchar(16), timestamp without time zone, timestamp
without time zone)
RETURNS float8 AS '
DECLARE
nid ALIAS FOR $1;
ipid ALIAS FOR $2;
xtime ALIAS FOR $3;
ytime ALIAS FOR $4;
downtime float8 := 0.0;
count integer := 0;
rollingWindow float := 0;
totalServiceTime float := 0;
BEGIN
IF xtime 0 THEN
RETURN 100 * (1 - (downtime / totalServiceTime));
ELSE
IF totalServiceTime = 0 THEN
RETURN 100;
ELSE
RETURN -1;
END IF;
END IF;
END;
' LANGUAGE 'plpgsql';:
Caused By: ERROR: language "plpgsql" does not exist
at liquibase.ChangeSet.execute(ChangeSet.java:238)
at liquibase.parser.visitor.UpdateVisitor.visit(UpdateVisitor.java:26)
at liquibase.parser.ChangeLogIterator.run(ChangeLogIterator.java:41)
at liquibase.Liquibase.update(Liquibase.java:112)
at org.opennms.core.schema.Migrator.migrate(Migrator.java:287)
... 2 more
Caused by: liquibase.exception.JDBCException: Error executing SQL CREATE OR REPL
ACE FUNCTION getManagePercentAvailIntfWindow(integer,varchar(16), timestamp with
out time zone, timestamp without time zone)
RETURNS float8 AS '
DECLARE
nid ALIAS FOR $1;
ipid ALIAS FOR $2;
xtime ALIAS FOR $3;
ytime ALIAS FOR $4;
downtime float8 := 0.0;
count integer := 0;
rollingWindow float := 0;
totalServiceTime float := 0;
BEGIN
IF xtime 0 THEN
RETURN 100 * (1 - (downtime / totalServiceTime));
ELSE
IF totalServiceTime = 0 THEN
RETURN 100;
ELSE
RETURN -1;
END IF;
END IF;
END;
' LANGUAGE 'plpgsql';
at liquibase.database.template.JdbcTemplate.execute(JdbcTemplate.java:56
)
at liquibase.database.template.JdbcTemplate.execute(JdbcTemplate.java:87
)
at liquibase.change.AbstractChange.execute(AbstractChange.java:251)
at liquibase.change.AbstractChange.executeStatements(AbstractChange.java
:97)
at liquibase.ChangeSet.execute(ChangeSet.java:214)
... 6 more
Caused by: org.postgresql.util.PSQLException: ERROR: language "plpgsql" does not
exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx
ecutorImpl.java:1525)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor
Impl.java:1309)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja
va:188)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstract
Jdbc2Statement.java:340)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:332)
at liquibase.database.template.JdbcTemplate$1ExecuteStatementCallback.do
InStatement(JdbcTemplate.java:79)
at liquibase.database.template.JdbcTemplate.execute(JdbcTemplate.java:49
)
... 10 more
[root@localhost bin]#
|
Error executing SQL CREATE OR REPLACE FUNCTION...
这一个提示貌似是主要原因。
getManagePercentAvailIntfWindow(integer,varchar(16), timestamp without time zone, timestamp without time zone)
可能是这个函数调用出了问题。
不知道怎么回事。
这一个提示貌似是主要原因。
getManagePercentAvailIntfWindow(integer,varchar(16), timestamp without time zone, timestamp without time zone)
可能是这个函数调用出了问题。
不知道怎么回事。
|
哇 看不懂啊,雷顶!
|
同样看不懂。。。
帮楼主顶!
帮楼主顶!
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。