I have a box with the Inventory-job flagged as red. When I run the job form the command-line I get the following error:
/usr/local/nav/bin/ipdevpolld -J inventory -n <boxname>
2018-09-25 08:37:19,646 [INFO nav.ipdevpoll] --- Starting ipdevpolld inventory --- 2018-09-25 08:37:26,439 [INFO plugins] Imported 30 plugin classes, 30 classes in plugin registry 2018-09-25 08:37:26,439 [INFO nav.ipdevpoll] Running single 'inventory' job for <boxname> 2018-09-25 08:37:26,497 [WARNING plugins.typeoid.typeoid] [inventory <boxname> ] Netbox has changed type from unknown to 1.3.6.1.4.1.42610.1.4.4 2018-09-25 08:37:26,561 [ERROR jobs.jobhandler] [inventory <boxname>] Plugin nav.ipdevpoll.plugins.modules.Modules(u'<boxname>') reported an unhandled failure Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 423, in errback self._startRunCallbacks(fail) File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks self._runCallbacks() File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 577, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1155, in gotResult _inlineCallbacks(r, g, deferred) --- <exception caught here> --- File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g) File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb) File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/modules.py", line 51, in handle need_to_collect = yield self._need_to_collect() File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g) File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb) File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/modules.py", line 62, in _need_to_collect yield self.stampcheck.load() File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g) File "/usr/local/lib/python2.7/site-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb) File "/usr/local/nav/lib/python/nav/ipdevpoll/timestamps.py", line 108, in load self.loaded_times = yield db.run_in_thread(_unpickle) File "/usr/local/lib/python2.7/site-packages/twisted/python/threadpool.py", line 196, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/local/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/local/nav/lib/python/nav/ipdevpoll/db.py", line 100, in _reset return func(*args, **kwargs) File "/usr/local/nav/lib/python/nav/ipdevpoll/timestamps.py", line 100, in _unpickle key=INFO_KEY_NAME, variable=self.var_name) File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line 92, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 361, in get num if num <= MAX_GET_RESULTS else 'more than %s' % MAX_GET_RESULTS nav.models.manage.MultipleObjectsReturned: get() returned more than one NetboxInfo -- it returned 2!
2018-09-25 08:37:26,561 [ERROR jobs.jobhandler] [inventory <boxname>] Job 'inventory' for <boxname> aborted: Job aborted due to plugin failure (cause=MultipleObjectsReturned('get() returned more than one NetboxInfo -- it returned 2!',))
OK, something is duplicated in my database, but where shall I look?
--Ingeborg