friendica / docker

Docker image for Friendica
https://friendi.ca
GNU Affero General Public License v3.0
45 stars 18 forks source link

Driver 'redis' failed - Fallback to 'useAutoDriver()' #194

Closed ne20002 closed 2 years ago

ne20002 commented 2 years ago

I have a list of errors when trying to use redis with my installation.


RedisException: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct? in /var/www/html/src/Core/Cache/Type/RedisCache.php:68
Stack trace:
#0 /var/www/html/src/Core/Cache/Type/RedisCache.php(68): Redis->auth('')
#1 /var/www/html/src/Core/Cache/Factory/Cache.php(137): Friendica\Core\Cache\Type\RedisCache->__construct('xxx.xxxx.ch', Object(Friendica\Core\Config\Type\JitConfig))
#2 /var/www/html/src/Core/Cache/Factory/Cache.php(114): Friendica\Core\Cache\Factory\Cache->create('redis')
#3 /var/www/html/src/Core/Lock/Factory/Lock.php(85): Friendica\Core\Cache\Factory\Cache->createLocal('redis')
#4 /var/www/html/vendor/level-2/dice/Dice.php(150): Friendica\Core\Lock\Factory\Lock->create()
#5 /var/www/html/vendor/level-2/dice/Dice.php(96): Dice\Dice->Dice\{closure}(Array, Array)
#6 /var/www/html/vendor/level-2/dice/Dice.php(247): Dice\Dice->create('Friendica\\Core\\...', Array, Array)
#7 /var/www/html/vendor/level-2/dice/Dice.php(132): Dice\Dice->Dice\{closure}(Array, Array)
#8 /var/www/html/vendor/level-2/dice/Dice.php(96): Dice\Dice->Dice\{closure}(Array, Array)
#9 /var/www/html/index.php(44): Dice\Dice->create('Friendica\\App\\R...')
#10 {main}```

I use podman to create a pod including the redis container (I do the same with Nectcloud). 
nupplaphil commented 2 years ago

Can you output if there's a config value in the db:

SELECT * FROM config WHERE k='redis_password';

or as environment variable

printenv | grep REDIS_

It seems like there's a non-null variable, but it's set to empty .. I'll add a fix for it at the upstream, but maybe we can find the root-cause for it

ne20002 commented 2 years ago

Here ya go:

 env | grep REDIS
 REDIS_PORT=6379
 REDIS_HOST=friendica-friendica-redis

With latest image (stable-fpm) the substitution error in entrypoint.sh (as in #196) is gone, but no change to redis passwort error. I removed both env entries to get Friendica running without the error in the protocoll.

ne20002 commented 2 years ago

I now applied the changes from https://github.com/friendica/friendica/pull/11250 manually. Friendica starts with stating using Redis as session handler, no more errors shown in protocoll.

nupplaphil commented 2 years ago

Can I close this issue because you found a workaround until the root-cause is fixed?