New icinga install on ubuntu 20.04: many PHP Deprecated errors

This is an entirely new icinga2 and icinga web 2 installation. I am installing icinga web 2 and running into a bunch of PHP Deprecated errors

Here are the installation steps I am using - I am at “Step 6: Install and setup Icinga Web 2”

I am running PHP 8.1.2 (cli) (built: Jan 24 2022 10:42:33) (NTS) [more details below]

Any assistance is appreciated.

List of contents below

  1. system details below

  2. PHP error messages when visiting http://server-ip/icingaweb2/setup from my browser

  3. PHP error messages when running the command: ‘sudo icingacli setup token create’

---- system details ----

icinga2 --version

icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.2-1)

Copyright (c) 2012-2022 Icinga GmbH

License GPLv2+: GNU GPL version 2 or later

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

System information:

Platform: Ubuntu

Platform version: 20.04.3 LTS (Focal Fossa)

Kernel: Linux

Kernel version: 5.4.0-99-generic

Architecture: x86_64

Build information:

Compiler: GNU 9.3.0

Build host: runner-hh8q3bz2-project-298-concurrent-0

OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020

Application information:

General paths:

Config directory: /etc/icinga2

Data directory: /var/lib/icinga2

Log directory: /var/log/icinga2

Cache directory: /var/cache/icinga2

Spool directory: /var/spool/icinga2

Run directory: /run/icinga2

Old paths (deprecated):

Installation root: /usr

Sysconf directory: /etc

Run directory (base): /run

Local state directory: /var

Internal paths:

Package data directory: /usr/share/icinga2

State path: /var/lib/icinga2/icinga2.state

Modified attributes path: /var/lib/icinga2/modified-attributes.conf

Objects path: /var/cache/icinga2/icinga2.debug

Vars path: /var/cache/icinga2/icinga2.vars

PID path: /run/icinga2/icinga2.pid

:# php -v

PHP 8.1.2 (cli) (built: Jan 24 2022 10:42:33) (NTS)

Copyright (c) The PHP Group

Zend Engine v4.1.2, Copyright (c) Zend Technologies

with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies

:# icinga2 feature list

Disabled features: api command compatlog debuglog elasticsearch gelf graphite icingadb influxdb influxdb2 livestatus opentsdb perfdata statusdata syslog

Enabled features: checker ido-mysql mainlog notification

:# icinga2 daemon -C

[2022-02-13 07:17:26 +0000] information/cli: Icinga application loader (version: r2.13.2-1)

[2022-02-13 07:17:26 +0000] information/cli: Loading configuration file(s).

[2022-02-13 07:17:26 +0000] information/ConfigItem: Committing config item(s).

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 13 Notifications.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 IcingaApplication.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 2 HostGroups.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 2 NotificationCommands.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 Host.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 Downtime.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 FileLogger.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 CheckerComponent.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 IdoMysqlConnection.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 3 Zones.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 Endpoint.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 244 CheckCommands.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 NotificationComponent.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 UserGroup.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 User.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 3 TimePeriods.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 3 ServiceGroups.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 1 ScheduledDowntime.

[2022-02-13 07:17:26 +0000] information/ConfigItem: Instantiated 12 Services.

[2022-02-13 07:17:26 +0000] information/ScriptGlobal: Dumping variables to file ‘/var/cache/icinga2/icinga2.vars’

[2022-02-13 07:17:26 +0000] information/cli: Finished validating the configuration file(s).

---- system details ----

---- PHP error messages when visiting URL server-ip/icingaweb2/setup —

Deprecated : Return type of Icinga\Application\Libraries::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Libraries.php on line 20

Deprecated : Return type of Icinga\Application\Config::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 125

Deprecated : Return type of Icinga\Application\Config::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 145

Deprecated : Return type of Icinga\Application\Config::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 175

Deprecated : Return type of Icinga\Application\Config::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 165

Deprecated : Return type of Icinga\Application\Config::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 155

Deprecated : Return type of Icinga\Application\Config::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 135

Deprecated : Return type of Icinga\Web\Session\SessionNamespace::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Web/Session/SessionNamespace.php on line 35

Deprecated : Return type of Zend_Controller_Action_HelperBroker_PriorityStack::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php on line 91

Deprecated : Return type of Zend_Controller_Action_HelperBroker_PriorityStack::offsetExists($priorityOrHelperName) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php on line 102

Deprecated : Return type of Zend_Controller_Action_HelperBroker_PriorityStack::offsetGet($priorityOrHelperName) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php on line 117

Deprecated : Return type of Zend_Controller_Action_HelperBroker_PriorityStack::offsetSet($priority, $helper) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php on line 137

Deprecated : Return type of Zend_Controller_Action_HelperBroker_PriorityStack::offsetUnset($priorityOrHelperName) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php on line 173

Deprecated : Return type of Zend_Controller_Action_HelperBroker_PriorityStack::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker/PriorityStack.php on line 198

Deprecated : Return type of Zend_View_Helper_Placeholder_Container_Standalone::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php on line 317

Deprecated : Return type of Zend_View_Helper_Placeholder_Container_Standalone::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php on line 261

Deprecated : Return type of Zend_View_Helper_Placeholder_Container_Standalone::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php on line 273

Deprecated : Return type of Zend_View_Helper_Placeholder_Container_Standalone::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php on line 284

Deprecated : Return type of Zend_View_Helper_Placeholder_Container_Standalone::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php on line 296

Deprecated : Return type of Zend_View_Helper_Placeholder_Container_Standalone::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/View/Helper/Placeholder/Container/Standalone.php on line 307

Deprecated : Return type of Zend_Paginator::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/Paginator.php on line 513

Deprecated : Return type of Zend_Paginator::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/icingaweb2/library/vendor/Zend/Paginator.php on line 815

Deprecated : Return type of Icinga\Authentication\AuthChain::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Authentication/AuthChain.php on line 200

Deprecated : Return type of Icinga\Authentication\AuthChain::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Authentication/AuthChain.php on line 220

Deprecated : Return type of Icinga\Authentication\AuthChain::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Authentication/AuthChain.php on line 210

Deprecated : Return type of Icinga\Authentication\AuthChain::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Authentication/AuthChain.php on line 231

Deprecated : Return type of Icinga\Authentication\AuthChain::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Authentication/AuthChain.php on line 189

Deprecated : Return type of Icinga\Web\Widget\Tabs::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Web/Widget/Tabs.php on line 406

Fatal error : Uncaught ErrorException: session_name(): Session name cannot be changed after headers have already been sent in /usr/share/php/Icinga/Web/Session/Php72Session.php:20 Stack trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}() #1 /usr/share/php/Icinga/Web/Session/Php72Session.php(20): session_name() #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(167): Icinga\Web\Session\Php72Session->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(533): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(483): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionController->postDispatch() #6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch() #7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch() #8 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch() #9 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #10 /usr/share/icingaweb2/public/index.php(4): require_once(’…’) #11 {main} Next Zend_Controller_Exception: session_name(): Session name cannot be changed after headers have already been sent#0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}() #1 /usr/share/php/Icinga/Web/Session/Php72Session.php(20): session_name() #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(167): Icinga\Web\Session\Php72Session->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(533): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(483): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionController->postDispatch() #6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch() #7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch() #8 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch() #9 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #10 /usr/share/icingaweb2/public/index.php(4): require_once(’…’) #11 {main} in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php:332 Stack trace: #0 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(948): Zend_Controller_Plugin_Broker->postDispatch() #1 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch() #2 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #3 /usr/share/icingaweb2/public/index.php(4): require_once(’…’) #4 {main} thrown in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 332

Fatal error : Uncaught ErrorException: Uncaught ErrorException: session_name(): Session name cannot be changed after headers have already been sent in /usr/share/php/Icinga/Web/Session/Php72Session.php:20 Stack trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}() #1 /usr/share/php/Icinga/Web/Session/Php72Session.php(20): session_name() #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(167): Icinga\Web\Session\Php72Session->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(533): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(483): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionController->postDispatch() #6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch() #7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch() #8 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch() #9 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #10 /usr/share/icingaweb2/public/index.php(4): require_once(’…’) #11 {main} Next Zend_Controller_Exception: session_name(): Session name cannot be changed after headers have already been sent#0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}() #1 /usr/share/php/Icinga/Web/Session/Php72Session.php(20): session_name() #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(167): Icinga\Web\Session\Php72Session->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(533): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(483): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionController->postDispatch() #6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch() #7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch() #8 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch() #9 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #10 /usr/share/icingaweb2/public/index.php(4): require_once(’…’) #11 {main} in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php:332 Stack trace: #0 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(948): Zend_Controller_Plugin_Broker->postDispatch() #1 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch() #2 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #3 /usr/share/icingaweb2/public/index.php(4): require_once(’…’) #4 {main} thrown in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php:332 Stack trace: #0 [internal function]: Icinga\Application\Web->Icinga\Application{closure}() #1 {main} Next Zend_Controller_Exception: Uncaught ErrorException: session_name(): Session name cannot be changed after headers have already been sent in /usr/share/php/Icinga/Web/Session/Php72Session.php:20 Stack trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}() #1 /usr/share/php/Icinga/Web/Session/Php72Session.php(20): session_name() #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(167): Icinga\Web\Session\Php72Session->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(533): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(483): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionController->postDispatch() #6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch() #7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch() #8 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch() #9 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #10 /usr/share/icingaweb2/public/index.php(4): require_once(’…’) #11 {main} Next Zend_Controller_Exception: session_name(): Session name cannot be changed after headers have already been sent#0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}() #1 /usr/share/php/Icinga/Web/Session/Php72Session.php(20): session_name() #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(167): Icinga\Web\Session\Php72Session->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(533): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(483): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionController->postDispatch() #6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch() #7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch() #8 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch() #9 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #10 /usr/share/icingaweb2/public/index.php(4): require_once(’…’) #11 {main} in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php:332 Stack trace: #0 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(948): Zend_Controller_Plugin_Broker->postDispatch() #1 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch() #2 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #3 /usr/share/icingaweb2/public/index.php(4): require_once(’…’) #4 {main} thrown#0 [internal function]: Icinga\Application\Web->Icinga\Application{closure}() #1 {main} in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php:259 Stack trace: #0 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(906): Zend_Controller_Plugin_Broker->routeShutdown() #1 /usr/share/php/Icinga/Application/Web.php(471): Zend_Controller_Front->dispatch() #2 [internal function]: Icinga\Application\Web->Icinga\Application{closure}() #3 {main} thrown in /usr/share/icingaweb2/library/vendor/Zend/Controller/Plugin/Broker.php on line 259

— snip —

— PHP error messages when running the command: ‘sudo icingacli setup token create’ —

sudo icingacli setup token create

PHP Deprecated: Return type of Icinga\Application\Libraries::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Libraries.php on line 20

Deprecated: Return type of Icinga\Application\Libraries::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Libraries.php on line 20

PHP Deprecated: Return type of Icinga\Application\Config::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 125

Deprecated: Return type of Icinga\Application\Config::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 125

PHP Deprecated: Return type of Icinga\Application\Config::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 145

Deprecated: Return type of Icinga\Application\Config::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 145

PHP Deprecated: Return type of Icinga\Application\Config::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 175

Deprecated: Return type of Icinga\Application\Config::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 175

PHP Deprecated: Return type of Icinga\Application\Config::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 165

Deprecated: Return type of Icinga\Application\Config::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 165

PHP Deprecated: Return type of Icinga\Application\Config::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 155

Deprecated: Return type of Icinga\Application\Config::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 155

PHP Deprecated: Return type of Icinga\Application\Config::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 135

Deprecated: Return type of Icinga\Application\Config::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Icinga/Application/Config.php on line 135

PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /usr/share/php/Icinga/Application/Cli.php on line 126

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /usr/share/php/Icinga/Application/Cli.php on line 126

The newly generated setup token is:

— snip —

There is an Open Issue on github for supporting PHP 8.1:

Thanks, Lee.

I am hoping to install just PHP 8.0 components.

How do I get this apt command to install PHP 8.0 packages instead of PHP 8.1 packages?

---- snip —

sudo apt install icingaweb2 icingacli libapache2-mod-php8.0

Reading package lists… Done
Building dependency tree
Reading state information… Done
libapache2-mod-php8.0 is already the newest version (8.0.15-1+ubuntu20.04.1+deb.sury.org+1).
The following additional packages will be installed:
icinga-php-library icinga-php-thirdparty icingaweb2-common icingaweb2-module-doc icingaweb2-module-monitoring php-json php8.1-cli php8.1-common php8.1-opcache php8.1-phpdbg php8.1-readline
Suggested packages:
php-pear
The following NEW packages will be installed:
icinga-php-library icinga-php-thirdparty icingacli icingaweb2 icingaweb2-common icingaweb2-module-doc icingaweb2-module-monitoring php-json php8.1-cli php8.1-common php8.1-opcache
php8.1-phpdbg php8.1-readline
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.1 MB/15.2 MB of archives.
After this operation, 58.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]

---- snip ----

It would be helpful to format your posts for more readability. I personally don’t have as much Ubuntu experience, but it seems like a general Ubuntu question (I’m sure others here may be able to help).

1 Like