Icingaweb: vsprintf(): Too few arguments

Hi

I’ve a problem with icingaweb.
I’ve added many hosts and services and all works fine (checks are made automatically). But when I try to clik on “check now” on a host, i’ve the error:

#0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(Integer, String, String, Integer, Array)
#1 /usr/share/php/Icinga/Exception/IcingaException.php(28): vsprintf(String, Array)
#2 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php(137): Icinga\Exception\IcingaException->__construct(String)
#3 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php(76): Icinga\Module\Monitoring\Command\Transport\CommandTransport->send(Object(Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand))
#4 /usr/share/php/Icinga/Web/Form.php(1171): Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm->onSuccess()
#5 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(282): Icinga\Web\Form->handleRequest()
#6 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(60): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->setupQuickActionForms()
#7 /usr/share/icingaweb2/modules/monitoring/application/controllers/HostController.php(63): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->showAction()
#8 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\HostController->showAction()
#9 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#10 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#11 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#12 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#13 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#14 {main}

When I look on my user.log:

Icinga\Module\Monitoring\Exception\CommandTransportException in /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Command/Transport/ApiCommandTransport.php:217 with message: Got invalid JSON response from the Icinga 2 API: Syntax error: ''
ErrorException in /usr/share/php/Icinga/Exception/IcingaException.php:28 with message: vsprintf(): Too few arguments    #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(Integer, String, String, Integer, }

I’m not able to find where it break…
It worked some days ago and I’ ve changed nothing…

My icinga version:

icinga2:
  Installed: 2.11.2-1.buster
  Candidate: 2.11.2-1.buster


icingaweb2:
  Installed: 2.7.3-1.buster
  Candidate: 2.7.3-1.buster

Sorry for long thread but I wanted to add many informations to debug.

Thanks

Alex

Hi,

which PHP version are you using?

Also, please share the command transport configuration from the monitoring backend (replace sensitive credentials).

Cheers,
Michael

Thanks for answer.
It’s now solved. In fact API didnt answer very well so that’s the reason of the problem.
Now API works fine so all is ok.