On Tue, 25 Sep 2018 08:43:29 +0200 Ingeborg Hellemo ingeborg.hellemo@uit.no wrote:
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>
[snip]
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?
Oh noes, those dreaded duplications!
It looks like you've somehow accrued a duplicate timestamp for module collection for a single IP device, although I'm not sure how.
Simplest way out of this situation is to just delete all module collection timestamps:
DELETE FROM netboxinfo WHERE key='poll_times' AND var='modules';
And if it happens again, maybe post a bug report, and we'll see if there isn't a better way to fix this.