[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opennms-install
Subject:    Re: [opennms-install] opennms-install Digest, Vol 9, Issue 18
From:       "Paul Mona" <pmona () commpartners ! us>
Date:       2007-01-12 0:48:39
Message-ID: E7480C3D4575E746815043B7BBF9128701A8F9C8 () cpsrvr02 ! cpllc ! lan
[Download RAW message or body]

I did this:
|The cause of the error above is your database having multiple entries  
|in the snmpInterface table with the same nodeId and snmpIfIndex.   
|This was caused by a bug in earlier versions of OpenNMS.  
|Earlier versions of the OpenNMS database schema allowed this 
|situation, but we've tightened it up a bit, as  you can see.
|
|The best way to deal with this is to delete all but one of the 
|snmpInterfaces entries for each of the sets that have the same 
|nodeId, snmpIfIndex, but it isn't that easy to do.
|
|Deletion is another possibility, but it can cause problems...
|

And was able to move on to the next error, where I did:

|Some of those entries in the snmpInterface table that were 
|deleted were referred to by the ipInterface table.  You'll 
|need to delete these entries in the ipInterface table.  E.g.:
|
|	DELETE FROM ipInterface WHERE nodeId = 6 AND ifIndex = 10101;
|
|Hopefully this will be a one-time pain-in-the-you-know-what.  
|We've added a lot more database constraints to enforce the 
|foreign key relationships that were assumed by OpenNMS but not 
|enforced in the database.  We have pretty good coverage now, 
|so once you get your database cleaned up and can run the 
|installer without any errors, you should be in good shape for awhile.
|
|
|	- djg



There are literally thousands of entries which failed to meet
constraints -- as I delete them, it seems to cause more problems.
This limitations virtually make upgrading from 1.3.1 to 1.3.2
impossible.


Paul









|
|Message: 1
|Date: Thu, 11 Jan 2007 17:46:00 -0500
|From: DJ Gregor <dj@opennms.org>
|Subject: Re: [opennms-install] Upgrade from 1.3.1 to 1.3.2 -- Failed
|	DB	install
|To: Installation questions and help
|	<opennms-install@lists.sourceforge.net>
|Message-ID: <EAE36593-A9EC-4E74-BEA6-3613F603B15B@opennms.org>
|Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
|
|On Jan 11, 2007, at 4:56 PM, Paul Mona wrote:
|> - checking for rows that violate constraints... DONE Exception in 
|> thread "main" java.lang.Exception: Unique index 
|> 'snmpinterface_nodeid_ifindex_unique_idx' cannot be added to table 
|> 'snmpinterface' because 4 rows are not unique.  See the 
|install guide 
|> for details on how to correct this problem.  You can use the 
|following 
|> SQL to see which rows are not unique:
|> SELECT * FROM snmpinterface WHERE ( nodeID, snmpIfIndex ) IN 
|( SELECT 
|> nodeID, snmpIfIndex FROM snmpinterface GROUP BY nodeID, snmpIfIndex 
|> HAVING count(nodeID) > 1 ORDER BY nodeID, snmpIfIndex ) ORDER BY 
|> nodeID, snmpIfIndex
|>         at
|> org.opennms.netmgt.dao.db.InstallerDb.checkIndexUniqueness
|> (InstallerDb.java:1967)
|>         at org.opennms.install.Installer.install(Installer.java:197)
|>         at org.opennms.install.Installer.main(Installer.java:729)
|>
|> If I delete the 4 rows which it is complaining about it gets further 
|> but still fails:
|
|The cause of the error above is your database having multiple entries  
|in the snmpInterface table with the same nodeId and snmpIfIndex.   
|This was caused by a bug in earlier versions of OpenNMS.  
|Earlier versions of the OpenNMS database schema allowed this 
|situation, but we've tightened it up a bit, as  you can see.
|
|The best way to deal with this is to delete all but one of the 
|snmpInterfaces entries for each of the sets that have the same 
|nodeId, snmpIfIndex, but it isn't that easy to do.
|
|Deletion is another possibility, but it can cause problems...
|
|> Caused by: java.sql.SQLException: Statement.execute() threw an 
|> SQLException while inserting a row: "INSERT INTO ipinterface 
|(ifindex, 
|> ipaddr, iphostname, iplastcapsdpoll, ipstatus, ismanaged, 
|> issnmpprimary, nodeid) values (10101, 0.0.0.0, NULL, 2006-12-19 
|> 12:27:36.187000 -0800, 1, U, N, 6)".  Original exception:
|> org.postgresql.util.PSQLException: ERROR: IpInterface 
|Trigger Notice, 
|> Condition 1: No SnmpInterface found for... nodeid: 6
|> ifindex: 10101
|
|Some of those entries in the snmpInterface table that were 
|deleted were referred to by the ipInterface table.  You'll 
|need to delete these entries in the ipInterface table.  E.g.:
|
|	DELETE FROM ipInterface WHERE nodeId = 6 AND ifIndex = 10101;
|
|Hopefully this will be a one-time pain-in-the-you-know-what.  
|We've added a lot more database constraints to enforce the 
|foreign key relationships that were assumed by OpenNMS but not 
|enforced in the database.  We have pretty good coverage now, 
|so once you get your database cleaned up and can run the 
|installer without any errors, you should be in good shape for awhile.
|
|
|	- djg
|
|
|
|

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-install mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-install
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic