Cannot enable icingadb-redis

I’ve been doing the installation of IcingaDB Web as documented but upon the lasts steps where you add the Database to the module icingadb.
Documentation for reference: IcingaDB Web Installtion

My first error was this:

Uncaught Error: Class 'Redis' not found in /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Common/IcingaRedis.php:92
Stack trace:
#0 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Common/IcingaRedis.php(27): Icinga\Module\Icingadb\ProvidedHook\ApplicationState->getPrimaryRedis()
#1 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/ProvidedHook/ApplicationState.php(68): Icinga\Module\Icingadb\ProvidedHook\ApplicationState->getIcingaRedis()
#2 /usr/share/icingaweb2/modules/icingadb/library/Icingadb/ProvidedHook/ApplicationState.php(22): Icinga\Module\Icingadb\ProvidedHook\ApplicationState->checkRedis()
#3 /usr/share/php/Icinga/Application/Hook/ApplicationStateHook.php(74): Icinga\Module\Icingadb\ProvidedHook\ApplicationState->collectMessages()
#4 /usr/share/php/Icinga/Web/Widget/ApplicationStateMessages.php(23): Icinga\Application\Hook\ApplicationStateHook::getAllMessages()
#5 /usr/share/php/Icinga/Web/Widget/ApplicationStateMessages.php(45): Icinga\Web\Widget\ApplicationStateMessages->ge

But with installing php-redis first that went away and gave me other errors.
I cant see the menu bar anymore since this error is covering it:

Fatal error: Declaration of Icinga\Module\Icingadb\Model\Behavior\ReRoute::rewriteCondition(Icinga\Data\Filter\FilterExpression $expression, $relation = NULL) must be compatible with ipl\Orm\Contract\RewriteFilterBehavior::rewriteCondition(ipl\Stdlib\Filter\Condition $condition, $relation = NULL) in /usr/share/icingaweb2/modules/icingadb/library/Icingadb/Model/Behavior/ReRoute.php on line 19

In another discussion I found that you will need RC2 but after some research I knew I had that.

After all of this and trying other ways and methods I found that my icingadb-redis would not be able to be enabled, which is said to be done here.
The error message:

# systemctl enable icingadb-redis
Failed to enable unit: Refusing to operate on alias name or linked unit file: icingadb-redis.service

I really don’t know where to start or what exactly could be the problem. Would be nice if someone could help me out here. I’m working on a Debian system :slight_smile:

You should try: systemctl enable --now icingadb-redis-server

2 Likes

yeah it’s working, tq

The documentation needs to be update to reflect this. The doco at the URL below still indicates to use systemctl enable --now icingadb-redis:

https://icinga.com/docs/icinga-2/latest/doc/02-installation/02-Ubuntu/#install-icinga-db-redis-package

Using what is suggested by @jhoxha is indeed the fix.

The documentation needs to be update to reflect this. The doco at the URL below still indicates to use systemctl enable --now icingadb-redis:

Thanks for bringing this up again. There is actually already an open PR
addressing this, which I just bumped:
https://github.com/Icinga/icinga2/pull/9877