Redis config check throws an error with stacktrace

Dear Icingarians,

I try to migrate from Nagios to Icinga with a docker setup and latest images of icinga.
I use the web setup. All steps are working but the redis part is crashing with

foreach() argument must be of type array|object, null given

#0 /usr/share/icinga-php/vendor/vendor/predis/predis/src/Command/Redis/XREAD.php(51): Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}()
#1 /usr/share/icinga-php/vendor/vendor/predis/predis/src/Client.php(394): Predis\Command\Redis\XREAD->parseResponse()
#2 /usr/share/icinga-php/vendor/vendor/predis/predis/src/Client.php(336): Predis\Client->executeCommand()
#3 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Common/IcingaRedis.php(187): Predis\Client->__call()
#4 /usr/share/icingaweb2/modules/icingadb/application/forms/RedisConfigForm.php(636): Icinga\Module\Icingadb\Common\IcingaRedis::getLastIcingaHeartbeat()
#5 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Setup/RedisPage.php(63): Icinga\Module\Icingadb\Forms\RedisConfigForm::checkRedis()
#6 /usr/share/icingaweb2/library/Icinga/Web/Wizard.php(296): Icinga\Module\Icingadb\Setup\RedisPage->isValidPartial()
#7 /usr/share/icingaweb2/library/Icinga/Web/Wizard.php(266): Icinga\Web\Wizard->handleRequest()
#8 /usr/share/icingaweb2/modules/setup/application/controllers/IndexController.php(46): Icinga\Web\Wizard->handleRequest() #9 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(528): Icinga\Module\Setup\Controllers\IndexController->indexAction()
#10 /usr/share/icingaweb2/library/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#11 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch()
#12 /usr/share/icingaweb2/library/Icinga/Application/Web.php(294): Zend_Controller_Front->dispatch()
#13 /usr/share/icingaweb2/library/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#14 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#15 {main}

Redis itself is working. No selinux in place. Redis is password protected with default user. Protected mode is off.
Databases (0..15) are selectable.

What am I missing here?

Best and thank,
Don

  • Which Redis version do you use? You need at least Redis v5+ to support XREAD.
  • Is icingadb active, configured (pointed at the right Redis instance) and writing into Redis?

Thanks for you answer.

  1. Redis server v=8.0.2 sha=00000000:1 malloc=jemalloc-5.3.0 bits=64 build=7ba997ea5ea59a73
  2. I configured incingadb with mariadb. That is working properly. There was no other option but postgres. And the next step is Redis.

Maybe I’m making a mistake, but the GUI guides you through the configuration. At least, that’s what I thought :smiley:

Best and thanks,
Don

Thanks for posting and welcome to Icinga!

Since you wrote that you are using a Docker-based setup, could you please list the version of Icinga DB and the Icinga DB Web module within Icinga Web. There might be a discrepancy there. Otherwise, is the Redis reachable from the Icinga Web container?

Dear Alvar,

thanks for you answer.
Redis is within the same network and reachable yes.

Here are the requested version infos.

Best and thanks,
Don

Icinga Web 2 2.12.4
setup 2.12.4

Module: icingadb
Version: 1.2.1
Requires:
Libraries: icinga-php-library (>=0.16.1), icinga-php-thirdparty (>=0.13.0)
Description: Icinga DB Web
UI for Icinga DB – Provides a graphical interface to your Icinga monitoring

Thanks. Could you please also supply the version of Icinga DB and Icinga 2 - the used container versions should be good enough. Otherwise, open a shell in the container and execute icinga2 --version or icingadb --version, respectively.

This is the container for the daemon for icinga2

icinga2 - The Icinga 2 network monitoring daemon (version: v2.15.0)

System information:
Platform: Debian GNU/Linux
Platform version: 12 (bookworm)
Kernel: Linux
Kernel version: 6.8.0-1030-azure
Architecture: x86_64

In the icingaweb - container icingadb is ā€œnot availableā€ as binary. I can onyl find a php web module.

Maybe it is to hot for me today :confused:

No worries, I am melting as well.

Icinga DB is a daemon on its own, as further described in the docs. Thus, there needs to be a container running the icinga/icingadb image.

Sorry for the delay in replying.

I’ve started reinstalling everything.
When I’m finished, later today, I’ll share the results. I think the problem is that I have the intermediate layer for icingadb, but not icingadb itself.

Please do not close this topic.
Thanks and best,
Don

I’ll follow this since I’m having the same problems.
I did not have this problem a 1-2 weeks ago when I did exactly the same setup.
Total of 4 servers:
2 icinga masters (icingadb + redis),
Mysql
Icingaweb2 (icinga db web)

OK. Reset done.
Same issue.

container | image
icingadb | icinga/icingadb
mariadb-icingadb | mariadb:latest
redis-icingadb | redis

Redis:

2025-07-02T12:27:46.803Z INFO icingadb Starting database schema auto import
2025-07-02T12:27:48.515Z INFO icingadb The database schema was successfully imported
2025-07-02T12:27:48.515Z INFO icingadb Connecting to Redis at ā€˜redis://redis-icingadb:6379’
2025-07-02T12:27:51.517Z INFO icingadb Waiting for Icinga 2 to write into Redis, please make sure you have started Icinga 2 and the Icinga DB feature is enabled

Icingadb:
2025-07-02T12:27:46.803Z INFO icingadb Starting database schema auto import
2025-07-02T12:27:48.515Z INFO icingadb The database schema was successfully imported
2025-07-02T12:27:48.515Z INFO icingadb Connecting to Redis at ā€˜redis://redis-icingadb:6379’
2025-07-02T12:27:51.517Z INFO icingadb Waiting for Icinga 2 to write into Redis, please make sure you have started Icinga 2 and the Icinga DB feature is enabled

^^ logs

There is no connectivity at all.

:frowning:

We can disregard my problem.
Solved with:

icinga2 feature enable icingadb
service icinga2 restart

On my masters.

Sorry!

Also:
Redis connection can be checked by installing redis-tools and using like so:
redis-cli -h 1.2.3.4 -p 6380

2 Likes

I skipped the validation.
At the end I can logon to icinga2 web frontend. But same picture here.
But .. SQLSTATE[42S02]: Base table or view not found: 1146 Table ā€˜icinga.icingadb_schema’ doesn’t exist

Missed I a step within the wizzard?

Maybe you missed to import the schema into icingadb?

Read Setting up a MySQL or MariaDB Database¶

Please compare these two log messages from your last two posts. First, the Icinga DB daemon has imported its schema successfully, now Icinga DB Web complaints about missing tables.

Since you work in a containerized environment, I would guess that maybe your relational database’s storage is not in a persisted volume, but was deleted during container restarts?

Please take a look at the Icinga DB installation documentation for containerized setups.

Otherwise, please share more details about your setup, perhaps a Docker Compose file if you are using it.

You are absolutely right.
Persistence was not given due to missing mapped storage volume.
That is solved.

Redis is not working yet, but I’m on it.
I will create a summary if it is solved.

Thanks for your food for thoughts.