Deleting a comment : 404 No objects found

Hi !

When trying to delete a comment I get this and the comment is not deleted.
Does anybody know how to fix it?

thank you !

icinga2: Can’t send external Icinga command: 404 No objects found.

#0 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Object/DeleteCommentCommandForm.php(100): Icinga\Module\Monitoring\Command\Transport\CommandTransport->send(Object(Icinga\Module\Monitoring\Command\Object\DeleteCommentCommand))
#1 /usr/share/php/Icinga/Web/Form.php(1171): Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm->onSuccess()
#2 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(74): Icinga\Web\Form->handleRequest()
#3 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServiceController.php(72): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->showAction()
#4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\ServiceController->showAction()
#5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#9 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#10 {main}

Hello @GenBuri!

Please share the permissions of the Icinga 2 API user used by your Icinga Web 2 command transport.


Can you tell me how I can find that out?
I have never restricted anything so I figure it would be admin rights?

By the way it is a one time thing, we never have this issue.

$ icinga2 object list -t apiuser
Object 'root' of type 'ApiUser':
  * permissions = [ "*" ]

@Al2Klimov yes same permissions “*”

(How) Did you get rid of the particular comment?

@Al2Klimov It’s still there…

Does it differ from others in some way?

@Al2Klimov No not at all. It contains the same info (ticket number) as always. I tried commenting the host, do a reload and then re adding it but that didn’t work. Still in the DB I guess…

“re adding” what exactly?

@Al2Klimov The host. I thought removing the host and putting it back would fix this, kind of like a reset. It did not.

You said the comment contains a ticket number. I assume you could find the comment by that number. Please run icinga2 daemon -C; icinga2 object list -t comment > comments.txt, find the comment by that number in the newly created text file and share the found details.

@Al2Klimov The file is empty unfortunately !

And w/o -t comment?

@Al2Klimov Yes now it’s huge. I see the host in there but nothing about that specific comment.

Are there any comments at all?

@Al2Klimov I do see some comments yes but not for that host. I guess that’s why I get the 404.

Exactly. You’ll have to delete it from the IDO database manually.

That doesn’t look easy lol

Re-creating the database (loosing history) is also an option.