Summary
When notify_push is installed but Redis is unavailable or not configured, notify_push attempts to connect to 127.0.0.1:6379 during app/command initialization. The resulting RedisException: Connection refused can abort unrelated Nextcloud operations.
In my case, deleting a user from the admin UI returned an Internal Server Error. Afterward, the user no longer existed according to Nextcloud (user not found), but stale/ghost entries were still visible in the Accounts admin UI. This suggests the user deletion process was interrupted after only part of the cleanup had completed.
Removing notify_push stopped the Redis connection errors.
Environment
- Nextcloud:
33.0.8.2
- Deployment: Kubernetes / k3s
- Database: PostgreSQL
memcache.local: \OC\Memcache\APCu
- No
redis, memcache.distributed, or memcache.locking configuration in the Nextcloud system config
- Redis was not running on
127.0.0.1:6379
Steps to reproduce
- Run Nextcloud without Redis configured/running.
- Install/enable
notify_push.
- Attempt to delete a user from the Nextcloud admin Accounts page.
- The request fails with an Internal Server Error caused by
RedisException: Connection refused.
- The deletion may be left partially completed:
occ user:info <uid> reports that the user is not found, while the Accounts UI can still show a stale entry for that UID.
The Redis error can also be reproduced by running an unrelated occ command such as:
php /var/www/html/occ config:list system
It prints Connection refused before the normal command output.
Relevant stack trace
RedisException: Connection refused
#0 /var/www/html/lib/private/RedisFactory.php(104):
Redis->pconnect('127.0.0.1', 6379, ...)
#1 /var/www/html/lib/private/RedisFactory.php(148):
OC\RedisFactory->create()
#2 /var/www/html/custom_apps/notify_push/lib/Queue/PushRedisFactory.php(38):
OC\RedisFactory->getInstance()
#3 /var/www/html/custom_apps/notify_push/lib/AppInfo/Application.php(46):
OCA\NotifyPush\Queue\PushRedisFactory->getRedis()
#4 ...
#15 /var/www/html/lib/private/Console/Application.php(209)
#16 /var/www/html/lib/private/Console/Application.php(101)
#17 /var/www/html/console.php(86)
#18 /var/www/html/occ(33)
The connection parameters shown in the original log were:
Expected behavior
If Redis is unavailable or notify_push is not fully configured, notify_push should fail gracefully and report its own configuration problem without aborting unrelated Nextcloud operations.
In particular, a Redis connection failure in notify_push should not be able to interrupt a destructive core operation such as user deletion after that operation has already partially modified state.
It would also be preferable if merely loading occ commands did not establish a Redis connection that can throw an exception before the requested command runs.
Actual behavior
notify_push initializes its Redis-backed queue while Nextcloud is loading the app/commands. If Redis refuses the connection, the exception propagates into unrelated requests/commands. In the user-deletion case this appears capable of leaving the deletion only partially completed.
Additional note
After removing notify_push, the RedisException: Connection refused errors stopped.
Summary
When
notify_pushis installed but Redis is unavailable or not configured,notify_pushattempts to connect to127.0.0.1:6379during app/command initialization. The resultingRedisException: Connection refusedcan abort unrelated Nextcloud operations.In my case, deleting a user from the admin UI returned an Internal Server Error. Afterward, the user no longer existed according to Nextcloud (
user not found), but stale/ghost entries were still visible in the Accounts admin UI. This suggests the user deletion process was interrupted after only part of the cleanup had completed.Removing
notify_pushstopped the Redis connection errors.Environment
33.0.8.2memcache.local:\OC\Memcache\APCuredis,memcache.distributed, ormemcache.lockingconfiguration in the Nextcloud system config127.0.0.1:6379Steps to reproduce
notify_push.RedisException: Connection refused.occ user:info <uid>reports that the user is not found, while the Accounts UI can still show a stale entry for that UID.The Redis error can also be reproduced by running an unrelated
occcommand such as:It prints
Connection refusedbefore the normal command output.Relevant stack trace
The connection parameters shown in the original log were:
Expected behavior
If Redis is unavailable or
notify_pushis not fully configured,notify_pushshould fail gracefully and report its own configuration problem without aborting unrelated Nextcloud operations.In particular, a Redis connection failure in
notify_pushshould not be able to interrupt a destructive core operation such as user deletion after that operation has already partially modified state.It would also be preferable if merely loading
occcommands did not establish a Redis connection that can throw an exception before the requested command runs.Actual behavior
notify_pushinitializes its Redis-backed queue while Nextcloud is loading the app/commands. If Redis refuses the connection, the exception propagates into unrelated requests/commands. In the user-deletion case this appears capable of leaving the deletion only partially completed.Additional note
After removing
notify_push, theRedisException: Connection refusederrors stopped.