Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5032

NPE in linkd with two Cisco nodes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.9.92
    • Fix Version/s: None
    • Component/s: Enhanced Linkd / Linkd
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      2 pcs Cisco 2960G, managemet on VLAN 100, no links discovered.

      Description

      This one seems related to the outstanding NPE in NMS-4005, but is a different constraint being violated:

      2011-10-29 00:44:54,890 ERROR [LinkdScheduler-1 Pool-fiber0] RunnableConsumerThreadPool$FiberThreadImpl: No error listeners defined for unexpected error: org.springframework.dao.DataIntegrityViolationException: could not insert: [org.opennms.netmgt.model.OnmsVlan]; SQL [insert into vlan (lastPollTime, nodeId, status, vlanId, vlanName, vlanStatus, vlanType, id) values (?, ?, ?, ?, ?, ?, ?, ?)]; constraint [pk_vlan]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [org.opennms.netmgt.model.OnmsVlan]
      org.springframework.dao.DataIntegrityViolationException: could not insert: [org.opennms.netmgt.model.OnmsVlan]; SQL [insert into vlan (lastPollTime, nodeId, status, vlanId, vlanName, vlanStatus, vlanType, id) values (?, ?, ?, ?, ?, ?, ?, ?)]; constraint [pk_vlan]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [org.opennms.netmgt.model.OnmsVlan]
      at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:637)
      at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
      at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
      at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:737)
      at org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate.saveOrUpdate(AbstractDaoHibernate.java:425)
      at org.opennms.netmgt.linkd.HibernateEventWriter.saveVlan(HibernateEventWriter.java:522)
      at org.opennms.netmgt.linkd.AbstractQueryManager.processVlanTable(AbstractQueryManager.java:493)
      at org.opennms.netmgt.linkd.HibernateEventWriter.storeSnmpCollection(HibernateEventWriter.java:205)
      at org.opennms.netmgt.linkd.Linkd.updateNodeSnmpCollection(Linkd.java:570)
      at org.opennms.netmgt.linkd.SnmpCollection.run(SnmpCollection.java:516)
      at org.opennms.netmgt.linkd.scheduler.Scheduler$1.run(Scheduler.java:301)
      at org.opennms.core.concurrent.RunnableConsumerThreadPool$FiberThreadImpl.run(RunnableConsumerThreadPool.java:420)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: org.hibernate.exception.ConstraintViolationException: could not insert: [org.opennms.netmgt.model.OnmsVlan]
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2295)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)
      at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
      at org.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:390)
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:407)
      ... 11 more
      Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_vlan"
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
      at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2275)
      ... 21 more

      The topology is two C2960G's connected via normal dot1q trunk, and these are not discovering links to eachother.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              seth Seth Leger
              Reporter:
              alexh@boxed.no Alexander Hoogerhuis
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: