Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.4.0
-
Fix Version/s: 1.2.0
-
Component/s: Provisioning/Discovery/Capsd/Provisiond
-
Security Level: Default (Default Security Scheme)
-
Labels:None
-
Environment:Operating System: Linux
Platform: Macintosh
-
Bugzilla Id:1828
Description
Setup
- Client host has 2 interfaces
- Both interfaces are in the auto discovery range and have a node assigend
- snmp is only available on one interface
Steps
- rescan host
Problem
- rescan failes while it tries to reparent the "secondary" interface
- there are no snmp information gathered for that host
Reproducabilty:
- always
Workaround:
- delete secondary node
2007-02-26 14:26:08,570 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateServicesOnForcedRescan: Service not to be polled
2007-02-26 14:26:08,570 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateServicesOnForcedRescan: Status Unchanged
2007-02-26 14:26:08,570 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: updating interface 10.2.3.86(targetIf=192.168.1.86)
2007-02-26 14:26:08,570 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: the snmp collection passed in is collected via192.168.1.86
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] IfSnmpCollector:
getIfIndex: retrieving ifIndex for 10.2.3.86
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] IpAddrTable:
getIfIndex: num ipAddrTable entries: 3
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] IpAddrTable:
getIfIndex: got a match for address 10.2.3.86 index: 2
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: interface = 10.2.3.86 ifIndex = 2. Checking for this address on
other nodes.
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: Checking address from snmpc ipAddrTable 10.2.3.86
2007-02-26 14:26:08,573 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: ckecking for 10.2.3.86 on existing nodeid 74
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
areDbInterfacesInSnmpCollection: found match for ipaddress: 10.2.3.86
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] IfSnmpCollector:
getIfIndex: retrieving ifIndex for 10.2.3.86
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] IpAddrTable:
getIfIndex: num ipAddrTable entries: 3
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] IpAddrTable:
getIfIndex: got a match for address 10.2.3.86 index: 2
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: reparenting interface 10.2.3.86 under node: 25 from existing
node: 74
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
reparentInterface: reparenting address/ifIndex/nodeID: 10.2.3.86/2/25
2007-02-26 14:26:08,579 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
reparentInterface: interface with ifindex 2 does not yet exist under new node 25
in ipinterface table, reparenting.
2007-02-26 14:26:08,648 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
reparentInterface: interface with ifindex 2 does not yet exist under new node 25
in snmpinterface table, reparenting.
2007-02-26 14:26:08,651 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
reparentInterface: interface with ifindex 2 does not yet exist under new node 25
in ifservices table, reparenting.
2007-02-26 14:26:08,658 DEBUG [Capsd Rescan Pool-fiber2] HttpPlugin: HttpPlugin:
did not connect to host within timeout: 3000 attempt: 2
2007-02-26 14:26:08,659 DEBUG [Capsd Rescan Pool-fiber2] IfCollector:
192.168.2.100 protocol HTTP supported? false
2007-02-26 14:26:08,659 DEBUG [Capsd Rescan Pool-fiber2] IfCollector:
192.168.2.100 plugin HTTP completed!
2007-02-26 14:26:08,659 DEBUG [Capsd Rescan Pool-fiber2] IfCollector:
192.168.2.100 testing plugin SMTP
2007-02-26 14:26:08,746 ERROR [Capsd Rescan Pool-fiber0] RescanProcessor:
SQLException while reparenting addr/ifindex/nodeid 10.2.3.86/2/74
2007-02-26 14:26:08,746 ERROR [Capsd Rescan Pool-fiber0] RescanProcessor:
SQLException while updating interface: 10.2.3.86 on nodeid: 25
2007-02-26 14:26:08,746 ERROR [Capsd Rescan Pool-fiber0] RescanProcessor: Error
updating records
org.postgresql.util.PSQLException: ERROR: update or delete on "ifservices"
violates foreign key constraint "ifservices_fkey1" on "outages"
Detail: Key (nodeid,ipaddr,serviceid)=(74,10.2.3.86,15) is still referenced
from table "outages".
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:308)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at
org.opennms.netmgt.capsd.RescanProcessor.reparentInterface(RescanProcessor.java:2375)
at
org.opennms.netmgt.capsd.RescanProcessor.updateInterface(RescanProcessor.java:986)
at
org.opennms.netmgt.capsd.RescanProcessor.updateInterfaces(RescanProcessor.java:501)
at org.opennms.netmgt.capsd.RescanProcessor.run(RescanProcessor.java:3269)
at
org.opennms.core.concurrent.RunnableConsumerThreadPool$FiberThreadImpl.run(RunnableConsumerThreadPool.java:412)
at java.lang.Thread.run(Thread.java:595)
2007-02-26 14:26:08,746 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor: Forced
rescan for node w/ nodeid 25 completed.
- Client host has 2 interfaces
- Both interfaces are in the auto discovery range and have a node assigend
- snmp is only available on one interface
Steps
- rescan host
Problem
- rescan failes while it tries to reparent the "secondary" interface
- there are no snmp information gathered for that host
Reproducabilty:
- always
Workaround:
- delete secondary node
2007-02-26 14:26:08,570 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateServicesOnForcedRescan: Service not to be polled
2007-02-26 14:26:08,570 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateServicesOnForcedRescan: Status Unchanged
2007-02-26 14:26:08,570 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: updating interface 10.2.3.86(targetIf=192.168.1.86)
2007-02-26 14:26:08,570 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: the snmp collection passed in is collected via192.168.1.86
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] IfSnmpCollector:
getIfIndex: retrieving ifIndex for 10.2.3.86
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] IpAddrTable:
getIfIndex: num ipAddrTable entries: 3
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] IpAddrTable:
getIfIndex: got a match for address 10.2.3.86 index: 2
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: interface = 10.2.3.86 ifIndex = 2. Checking for this address on
other nodes.
2007-02-26 14:26:08,572 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: Checking address from snmpc ipAddrTable 10.2.3.86
2007-02-26 14:26:08,573 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: ckecking for 10.2.3.86 on existing nodeid 74
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
areDbInterfacesInSnmpCollection: found match for ipaddress: 10.2.3.86
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] IfSnmpCollector:
getIfIndex: retrieving ifIndex for 10.2.3.86
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] IpAddrTable:
getIfIndex: num ipAddrTable entries: 3
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] IpAddrTable:
getIfIndex: got a match for address 10.2.3.86 index: 2
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
updateInterface: reparenting interface 10.2.3.86 under node: 25 from existing
node: 74
2007-02-26 14:26:08,578 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
reparentInterface: reparenting address/ifIndex/nodeID: 10.2.3.86/2/25
2007-02-26 14:26:08,579 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
reparentInterface: interface with ifindex 2 does not yet exist under new node 25
in ipinterface table, reparenting.
2007-02-26 14:26:08,648 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
reparentInterface: interface with ifindex 2 does not yet exist under new node 25
in snmpinterface table, reparenting.
2007-02-26 14:26:08,651 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor:
reparentInterface: interface with ifindex 2 does not yet exist under new node 25
in ifservices table, reparenting.
2007-02-26 14:26:08,658 DEBUG [Capsd Rescan Pool-fiber2] HttpPlugin: HttpPlugin:
did not connect to host within timeout: 3000 attempt: 2
2007-02-26 14:26:08,659 DEBUG [Capsd Rescan Pool-fiber2] IfCollector:
192.168.2.100 protocol HTTP supported? false
2007-02-26 14:26:08,659 DEBUG [Capsd Rescan Pool-fiber2] IfCollector:
192.168.2.100 plugin HTTP completed!
2007-02-26 14:26:08,659 DEBUG [Capsd Rescan Pool-fiber2] IfCollector:
192.168.2.100 testing plugin SMTP
2007-02-26 14:26:08,746 ERROR [Capsd Rescan Pool-fiber0] RescanProcessor:
SQLException while reparenting addr/ifindex/nodeid 10.2.3.86/2/74
2007-02-26 14:26:08,746 ERROR [Capsd Rescan Pool-fiber0] RescanProcessor:
SQLException while updating interface: 10.2.3.86 on nodeid: 25
2007-02-26 14:26:08,746 ERROR [Capsd Rescan Pool-fiber0] RescanProcessor: Error
updating records
org.postgresql.util.PSQLException: ERROR: update or delete on "ifservices"
violates foreign key constraint "ifservices_fkey1" on "outages"
Detail: Key (nodeid,ipaddr,serviceid)=(74,10.2.3.86,15) is still referenced
from table "outages".
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:308)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at
org.opennms.netmgt.capsd.RescanProcessor.reparentInterface(RescanProcessor.java:2375)
at
org.opennms.netmgt.capsd.RescanProcessor.updateInterface(RescanProcessor.java:986)
at
org.opennms.netmgt.capsd.RescanProcessor.updateInterfaces(RescanProcessor.java:501)
at org.opennms.netmgt.capsd.RescanProcessor.run(RescanProcessor.java:3269)
at
org.opennms.core.concurrent.RunnableConsumerThreadPool$FiberThreadImpl.run(RunnableConsumerThreadPool.java:412)
at java.lang.Thread.run(Thread.java:595)
2007-02-26 14:26:08,746 DEBUG [Capsd Rescan Pool-fiber0] RescanProcessor: Forced
rescan for node w/ nodeid 25 completed.
There is an ON DELETE CASCADE in the database schema now that should prevent foreign key references from the outages table from causing this problem. Marking as fixed.