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

Session Exception on Notification Endpoint since IcingaWeb2 2.12.1 #5154

Closed
jan-kantert opened this issue Nov 29, 2023 · 7 comments
Closed

Comments

@jan-kantert
Copy link

Describe the bug

When opening https://example.com/icingadb/notifications?history.event_time%20%3E%2030%20minutes%20ago&format=json we get this error:

[some_events<br />

<b>Fatal error</b>:  Uncaught ErrorException: Uncaught ErrorException: session_name(): Cannot change session name when headers already sent in /usr/share/icingaweb2/library/Icinga/Web/Session/Php72Session.php:20
Stack trace:
#0 [internal function]: Icinga\Application\ApplicationBootstrap-&gt;Icinga\Application\{closure}()
#1 /usr/share/icingaweb2/library/Icinga/Web/Session/Php72Session.php(20): session_name()
#2 /usr/share/icingaweb2/library/Icinga/Web/Session/PhpSession.php(167): Icinga\Web\Session\Php72Session-&gt;open()
#3 /usr/share/icingaweb2/library/Icinga/Web/Controller/ActionController.php(579): Icinga\Web\Session\PhpSession-&gt;write()
#4 /usr/share/icingaweb2/library/Icinga/Web/Controller/ActionController.php(525): Icinga\Web\Controller\ActionController-&gt;shutdownSession()
#5 /usr/share/icingaweb2/modules/icingadb/application/controllers/ErrorController.php(58): Icinga\Web\Controller\ActionController-&gt;postDispatch()
#6 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(521): Icinga\Module\Ici in <b>/usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Plugin/Broker.php</b> on line <b>262</b><br />

As we use this in our monitoring clients it breaks the client for us.

To Reproduce

Provide a link to a live example, or an unambiguous set of steps to reproduce this issue. Include configuration, logs, etc. to reproduce, if relevant.

  1. Open https://example.com/icingadb/notifications?history.event_time%20%3E%2030%20minutes%20ago&format=json

Expected behavior

Notifications should be returned correctly. This worked in 2.12.0.

Screenshots

See above.

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Icinga Web 2 version and modules (System - About): 2.12.1
    Git Commit cd2daeb
    Git Commit Datum 2023-11-15
  • Web browser used: Firefox, Chrome, Edge, curl, wget, requests
  • Icinga 2 version used (icinga2 --version): 2.13.8 (since 2.14.0 breaks sync for us)
  • PHP version used (php --version): 7.4.33
  • Server operating system and version: Debian/Official Docker Image
@nilmerg
Copy link
Member

nilmerg commented Nov 29, 2023

Hey,

please have a look at the php error log. There may be a clue (another stacktrace) why this is happening.

@nilmerg nilmerg added the needs-feedback We'll only proceed once we hear from you again label Nov 29, 2023
@jan-kantert
Copy link
Author

please have a look at the php error log. There may be a clue (another stacktrace) why this is happening.

php error log = apache error log? I guess the docker container pipes everything to standard out, correct? If that is the case then there has not been any log entries during that time according to our logging server.

We could upgrade again but I would need some clarification on where to look in the official docker.

@nilmerg
Copy link
Member

nilmerg commented Dec 12, 2023

php error log = apache error log?

Yes. Though, it's stderr were it's piped to. And if you let Icinga Web also log there (by using -e icingaweb.config.logging.log=php) it will also contain Icinga Web's log.

@nilmerg
Copy link
Member

nilmerg commented Jan 15, 2024

Hey, did you find more in the logs?

@jan-kantert
Copy link
Author

I see this error in our log:

[Wed Jan 17 09:58:11.190265 2024] [php7:error] [pid 91] [client 172.20.108.110:59222] PHP Fatal error:  Uncaught ErrorException: Uncaught ErrorException: session_name(): Cannot change session name when headers already sent in /usr/share/icingaweb2/library/Icinga/Web/Session/Php72Session.php:20\nStack trace:\n#0 [internal function]: Icinga\\Application\\ApplicationBootstrap->Icinga\\Application\\{closure}()\n#1 /usr/share/icingaweb2/library/Icinga/Web/Session/Php72Session.php(20): session_name()\n#2 /usr/share/icingaweb2/library/Icinga/Web/Session/PhpSession.php(167): Icinga\\Web\\Session\\Php72Session->open()\n#3 /usr/share/icingaweb2/library/Icinga/Web/Controller/ActionController.php(579): Icinga\\Web\\Session\\PhpSession->write()\n#4 /usr/share/icingaweb2/library/Icinga/Web/Controller/ActionController.php(525): Icinga\\Web\\Controller\\ActionController->shutdownSession()\n#5 /usr/share/icingaweb2/modules/icingadb/application/controllers/ErrorController.php(58): Icinga\\Web\\Controller\\ActionController->postDispatch()\n#6 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(521): Icinga\\Module\\Ici in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Plugin/Broker.php on line 262, referer: https://icinga.xxxx

Maybe that helps?

@nilmerg
Copy link
Member

nilmerg commented Jan 17, 2024

Oooh, sorry, I didn't try it for myself until now and thus didn't notice that it belongs to Icinga DB Web where a similar issue has been opened last week. 🤦‍♂️

@nilmerg
Copy link
Member

nilmerg commented Jan 17, 2024

Duplicate of Icinga/icingadb-web#955

@nilmerg nilmerg marked this as a duplicate of Icinga/icingadb-web#955 Jan 17, 2024
@nilmerg nilmerg closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2024
@nilmerg nilmerg removed the needs-feedback We'll only proceed once we hear from you again label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants