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

[dev.icinga.com #8815] Only the first external command is sent over SSH when submitting commands for multiple selected hosts or services #1497

Closed
icinga-migration opened this issue Mar 19, 2015 · 3 comments
Labels
area/monitoring Affects the monitoring module bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/8815

Created by aledermueller on 2015-03-19 11:55:40 +00:00

Assignee: elippmann
Status: Resolved (closed on 2015-04-01 11:59:17 +00:00)
Target Version: 2.0.0-rc1
Last Update: 2015-04-01 11:59:17 +00:00 (in Redmine)


Git resvision: 004301a

Hi,

Doing an ack on multiple services generates the following error. The ack for the first services is executed correclty (via ssh), but the ack for the second service gets executed on the local machine, instead via ssh on the remote.

Regards,
Achim

Server error: Can't send external Icinga command "[1426765776] ACKNOWLEDGE_SVC_PROBLEM_EXPIRE;host;service;2;1;0;1426769375;aledermueller;fsadfsa" to the local command file "/var/run/icinga2/cmd/icinga2.cmd": exception 'RuntimeException' with message 'SplFileObject::__construct(/var/run/icinga2/cmd/icinga2.cmd): failed to open stream: No such file or directory' in /usr/share/icingaweb2/library/Icinga/Util/File.php:39

Can't send external Icinga command "[1426765776] ACKNOWLEDGE_SVC_PROBLEM_EXPIRE;host;service;2;1;0;1426769375;aledermueller;fsadfsa" to the local command file "/var/run/icinga2/cmd/icinga2.cmd": exception 'RuntimeException' with message 'SplFileObject::__construct(/var/run/icinga2/cmd/icinga2.cmd): failed to open stream: No such file or directory' in /usr/share/icingaweb2/library/Icinga/Util/File.php:39
Stack trace:

#0 /usr/share/icingaweb2/library/Icinga/Util/File.php(39): SplFileObject->__construct('/var/run/icinga...', 'wn', false)
#1 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Command/Transport/LocalCommandFile.php(122): Icinga\Util\File->__construct('/var/run/icinga...', 'wn')
#2 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php(154): Icinga\Module\Monitoring\Command\Transport\LocalCommandFile->send(Object(Icinga\Module\Monitoring\Command\Object\AcknowledgeProblemCommand))
#3 /usr/share/icingaweb2/library/Icinga/Web/Form.php(844): Icinga\Module\Monitoring\Forms\Command\Object\AcknowledgeProblemCommandForm->onSuccess()
#4 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServicesController.php(50): Icinga\Web\Form->handleRequest()
#5 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServicesController.php(234): Monitoring_ServicesController->handleCommandForm(Object(Icinga\Module\Monitoring\Forms\Command\Object\AcknowledgeProblemCommandForm))
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Monitoring_ServicesController->acknowledgeProblemAction()
#7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Dispatcher/Standard.php(303): Zend_Controller_Action->dispatch('acknowledgeProb...')
#8 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Zend_Controller_Dispatcher_Standard->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#9 /usr/share/icingaweb2/library/Icinga/Application/Web.php(154): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#10 /usr/share/icingaweb2/library/Icinga/Application/webrouter.php(111): Icinga\Application\Web->dispatch()
#11 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/icin...')
#12 {main}

#0 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php(154): Icinga\Module\Monitoring\Command\Transport\LocalCommandFile->send(Object(Icinga\Module\Monitoring\Command\Object\AcknowledgeProblemCommand))
#1 /usr/share/icingaweb2/library/Icinga/Web/Form.php(844): Icinga\Module\Monitoring\Forms\Command\Object\AcknowledgeProblemCommandForm->onSuccess()
#2 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServicesController.php(50): Icinga\Web\Form->handleRequest()
#3 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServicesController.php(234): Monitoring_ServicesController->handleCommandForm(Object(Icinga\Module\Monitoring\Forms\Command\Object\AcknowledgeProblemCommandForm))
#4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Monitoring_ServicesController->acknowledgeProblemAction()
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Dispatcher/Standard.php(303): Zend_Controller_Action->dispatch('acknowledgeProb...')
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Zend_Controller_Dispatcher_Standard->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/icingaweb2/library/Icinga/Application/Web.php(154): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 /usr/share/icingaweb2/library/Icinga/Application/webrouter.php(111): Icinga\Application\Web->dispatch()
#9 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/icin...')
#10 {main}

Changesets

2015-04-01 11:53:44 +00:00 by elippmann 06d9e41

Fix that sending multiple commands over SSH failed

The config object has to cloned before unsetting the transport because else the
transport is removed for all subsequent calls to CommandTransport::fromConfig().

fixes #8815

Relations:

@icinga-migration
Copy link
Author

Updated by elippmann on 2015-04-01 09:33:20 +00:00

  • Subject changed from Action on multiple services generates an error Fixes to work with SLES 11 #2 to Only the first external command is sent over SSH when submitting commands for multiple selected hosts or services
  • Category set to Monitoring
  • Status changed from New to Assigned
  • Assigned to set to elippmann
  • Priority changed from Normal to Immediate
  • Target Version set to 2.0.0-rc1

@icinga-migration
Copy link
Author

Updated by elippmann on 2015-04-01 11:59:17 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 06d9e41.

@icinga-migration
Copy link
Author

Updated by elippmann on 2015-05-11 09:25:30 +00:00

  • Duplicated set to 8746

@icinga-migration icinga-migration added Immediate bug Something isn't working area/monitoring Affects the monitoring module labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.0.0-rc1 milestone Jan 17, 2017
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 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant