Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CurlException in RestRequest.php - API Timeout but curl from shell works fine #3725

Closed
Duffkess opened this issue Mar 21, 2019 · 3 comments
Closed
Assignees
Labels
area/monitoring Affects the monitoring module needs-feedback We'll only proceed once we hear from you again no-issue Better asked in one of our support channels

Comments

@Duffkess
Copy link

Duffkess commented Mar 21, 2019

I want to reschedule service checks, acknowledge problems and apply downtimes using the icingaweb2 interface.

when I do one of these things I get this error:

icinga2: Operation timed out after 30000 milliseconds with 0 out of 0 bytes received.

When looking in the icingaweb2.log I see:

2019-03-21T15:39:16+01:00 - DEBUG - Executing curl -s -X POST -H 'Accept: application/json' -k -u 'username':'password' -d '{"next_check":1553179156,"force":true,"host":"myhost"}' 'https://node-a.domain.tld:5665/v1/actions/reschedule-check'
2019-03-21T15:39:46+01:00 - ERROR - Icinga\Module\Monitoring\Exception\CurlException in /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Rest/RestRequest.php:291 with message: Operation timed out after 30000 milliseconds with 0 out of 0 bytes received
2019-03-21T15:39:46+01:00 - ERROR - Icinga\Module\Monitoring\Exception\CommandTransportException in /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Command/Transport/CommandTransport.php:137 with message: icinga2: Operation timed out after 30000 milliseconds with 0 out of 0 bytes received.
#0 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php(70): Icinga\Module\Monitoring\Command\Transport\CommandTransport->send(Object(Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand))
#1 /usr/share/php/Icinga/Web/Form.php(1158): Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm->onSuccess()
#2 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(275): Icinga\Web\Form->handleRequest()
#3 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(60): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->setupQuickActionForms()
#4 /usr/share/icingaweb2/modules/monitoring/application/controllers/HostController.php(61): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->showAction()
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\HostController->showAction()
#6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#9 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#10 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#11 {main}

I also see the same stacktrace when using service php-fpm status -l

When using the provided curl command from the shell (even when run under apache user) it works just fine.

My commandtransports.ini look like this:

transport = "api"
host = "node-a.domain.tld"
port = "5665"
username = "username"
password = "password"
  • Icinga Web 2 version and modules (System - About):
    Icinga Web 2 Version
    2.6.2
    Git Commit
    63cb9d7

  • Version used (icinga2 --version):
    r2.10.4-1

  • Operating System and version:
    CentOS 7

@dnsmichi
Copy link
Contributor

That's a problem with Icinga 2 and its API. Currently there's no workaround, you'll need to wait up until Icinga/icinga2#7041 is implemented and released.

@dnsmichi
Copy link
Contributor

dnsmichi commented Apr 5, 2019

You can test the snapshot packages of icinga2, the network stack related fixes for the API are in there.

@dnsmichi dnsmichi added area/monitoring Affects the monitoring module needs-feedback We'll only proceed once we hear from you again labels Apr 5, 2019
@lippserd lippserd added the no-issue Better asked in one of our support channels label Apr 8, 2019
@lippserd
Copy link
Member

lippserd commented Apr 8, 2019

Hi,

Thanks for the report. Since this is a know Icinga 2 issue I'll close this one.

Best,
Eric

@lippserd lippserd closed this as completed Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/monitoring Affects the monitoring module needs-feedback We'll only proceed once we hear from you again no-issue Better asked in one of our support channels
Projects
None yet
Development

No branches or pull requests

3 participants