Symptoms
-
Nextcloud instance stop working after migration.
-
The following error shows up in web browser:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log. -
The following error shows up in Plesk Panel when accessing Extensions > My Extensions > Nextcloud:
An unhandled exception has been thrown: RedisException: Connection refused in /var/www/vhosts/example.com/lib/private/RedisFactory.php:137
Stack trace:
#0 /var/www/vhosts/example.com/lib/private/RedisFactory.php(137): Redis->pconnect()
#1 /var/www/vhosts/example.com/lib/private/RedisFactory.php(178): OC\RedisFactory->create()
#2 /var/www/vhosts/example.com/lib/private/Memcache/Redis.php(66): OC\RedisFactory->getInstance()
#3 /var/www/vhosts/example.com/lib/private/Memcache/Redis.php(72): OC\Memcache\Redis->getCache()
#4 /var/www/vhosts/example.com/lib/private/App/InfoParser.php(58): OC\Memcache\Redis->get()
#5 /var/www/vhosts/example.com/lib/private/App/AppManager.php(732): OC\App\InfoParser->parse()
#6 /var/www/vhosts/example.com/lib/private/legacy/OC_App.php(434): OC\App\AppManager->getAppInfo()
#7 /var/www/vhosts/example.com/lib/private/AppFramework/App.php(71): OC_App::getAppInfo()
#8 /var/www/vhosts/example.com/lib/private/legacy/OC_App.php(155): OC\AppFramework\App::buildAppNamespace()
#9 /var/www/vhosts/example.com/lib/private/AppFramework/Bootstrap/Coordinator.php(119): OC_App::registerAutoloading()
#10 /var/www/vhosts/example.com/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC\AppFramework\Bootstrap\Coordinator->registerApps() -
Redis database parameters are configured in
/var/www/vhosts/example.com/nextcloud/config/config.php
:'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
Cause
Nextcloud is trying to connect to redis database that does not exist or was not migrated.
Resolution
Use Docker native utilities such as docker export
and docker import
to migrate the container from one host to another or redeploy the redis container and manually move files from volume mapping.
Note: This is considered an administrative task that should be performed by the server administrator
-
Connect to the server via SSH.
-
Backup current
config.php
configuration file:# cp /var/www/vhosts/example.com/nextcloud/config/config.php{,.backup}
Note: The
config.php
file is located in the config folder within the installation directory of Nextcloud -
Use
vi
ornano
and edit the config file:# vi /var/www/vhosts/example.com/nextcloud/config/config.php
-
Comment out redis section with
/*
and*/
. Should stay like this:/*
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
*/
Comments
0 comments
Please sign in to leave a comment.