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

Can't re-enable notifications after update to 2.6.0 #3535

Closed
log1-c opened this issue Jul 19, 2018 · 5 comments · Fixed by #3537
Closed

Can't re-enable notifications after update to 2.6.0 #3535

log1-c opened this issue Jul 19, 2018 · 5 comments · Fixed by #3537
Assignees
Labels
area/monitoring Affects the monitoring module bug Something isn't working
Milestone

Comments

@log1-c
Copy link
Contributor

log1-c commented Jul 19, 2018

Expected Behavior

Under .../icingaweb2/monitoring/health/info you should be able to enable/disable monitoring functions globally

Current Behavior

I disabled notifications before updating to 2.6.0 via http:///icingaweb2/monitoring/health/info by removing the check.
After the update I'm now unable to re-enable notifications and get the following stack trace



icinga2: Array to string conversion.

#0 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php(269): Icinga\Module\Monitoring\Command\Transport\CommandTransport->send(Object(Icinga\Module\Monitoring\Command\Instance\ToggleInstanceFeatureCommand))
#1 /usr/share/php/Icinga/Web/Form.php(1158): Icinga\Module\Monitoring\Forms\Command\Instance\ToggleInstanceFeaturesCommandForm->onSuccess()
#2 /usr/share/icingaweb2/modules/monitoring/application/controllers/HealthController.php(99): Icinga\Web\Form->handleRequest()
#3 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\HealthController->infoAction()
#4 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#6 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#8 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#9 {main}

Steps to Reproduce (for bugs)

  1. Disabled notifications globally
  2. Update to 2.6.0
  3. try re-enabling the updates

Your Environment

  • Icinga Web 2 version and modules (System - About): 2.6.0

  • Version used (icinga2 --version): 2.9.0

  • Operating System and version: CentOS Linux release 7.5.1804 (Core)

  • Enabled features (icinga2 feature list): api checker command ido-mysql mainlog notification perfdata

  • PHP version (from <?php phpinfo(); ?>): PHP Version 7.2.8 (updated using this)

  • Icingaweb.conf


<IfVersion < 2.4>
    # Forward PHP requests to FPM
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    <LocationMatch "^/icingaweb2/(.*\.php)$">
        ProxyPassMatch "fcgi://127.0.0.1:9000/usr/share/icingaweb2/public/$1"
    </LocationMatch>
</IfVersion>

<Directory "/usr/share/icingaweb2/public">
    Options SymLinksIfOwnerMatch
    AllowOverride None

    DirectoryIndex index.php

    <IfModule mod_authz_core.c>
        # Apache 2.4
        <RequireAll>
            Require all granted
        </RequireAll>
    </IfModule>

    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order allow,deny
        Allow from all
    </IfModule>

    SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2"

    EnableSendfile Off

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteBase /icingaweb2/
        RewriteCond %{REQUEST_FILENAME} -s [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>

    <IfModule !mod_rewrite.c>
        DirectoryIndex error_norewrite.html
        ErrorDocument 404 /icingaweb2/error_norewrite.html
    </IfModule>

    <IfVersion >= 2.4>
        # Forward PHP requests to FPM
        SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
        <FilesMatch "\.php$">
            SetHandler "proxy:fcgi://127.0.0.1:9000"
            ErrorDocument 503 /icingaweb2/error_unavailable.html
        </FilesMatch>
    </IfVersion>
</Directory>
@log1-c log1-c changed the title Can't re-eanble notifications after update to 2.6.0 Can't re-enable notifications after update to 2.6.0 Jul 19, 2018
@nilmerg
Copy link
Member

nilmerg commented Jul 20, 2018

Hi,

thanks for reporting this here!

For anyone else facing this issue: If possible, you may workaround this by switching to a local/remote command pipe transport backend. This bug does only apply if you're sending commands over the Icinga API.

@nilmerg nilmerg added bug Something isn't working area/monitoring Affects the monitoring module labels Jul 20, 2018
@nilmerg nilmerg added this to the 2.6.1 milestone Jul 20, 2018
@nilmerg nilmerg self-assigned this Jul 20, 2018
nilmerg added a commit that referenced this issue Jul 20, 2018
$data may be arbitrarily nested.

fixes #3535
lippserd pushed a commit that referenced this issue Jul 24, 2018
$data may be arbitrarily nested.

refs #3535

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
@marcofl
Copy link

marcofl commented Jul 24, 2018

same issue here on Ubuntu 16.04, icinga2 2.9.1-1.xenial, icingaweb2 2.6.0-1.xenial
Unfortunately command pipe is not really an easy workaround for us when icingaweb2 is on a different server.

@dnsmichi
Copy link
Contributor

Try applying the patch from the linked PR.

@tduboys
Copy link

tduboys commented Jul 31, 2018

Hi,
Same issue here since 2.6.0 but also when trying to enable/disable notification only on 1 service (not globally).
The linked PR #3537 looks working for me. I didnt found any side-effect right now.

@lippserd
Copy link
Member

Hi,

Thanks for the feedback. We'll release a 2.6.1 on Thursday this week which includes this fix.

Cheers,
Eric

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

Successfully merging a pull request may close this issue.

6 participants