Nextcloud unavailable after changing to HTTP2

Hello,

i changed my webserver settings with this tutorial to be able to use HTTP2 on my hosted websites on the same server where my nextcloud instance works.
Link: https://www.tecmint.com/enable-http2-in-apache-on-ubuntu/
after that i changed the redis.conf from “supervised no” to “supervised systemd”

Now my Nextcloud instance broke,the websites are fine and work with redis, i think i have to add some more changes so my nextcloud instance also works with HTTP2 but i dont know what i have to change, i googled and tried to add some recommandations to my virtual host files but it does not work im unavailable to reach nextcloud over the browser and the app. What do i have to change to get my nextcloud working again with HTTP2?

System:
Ubuntu 20.04
Apache2
Redis
PHP 7.4

error log:

{“reqId”:“xxx”,“level”:3,“time”:“2022-12-12T04:35:47+00:00”,“remoteAddr”:“xxx”,“user”:“–”,“app”:“core”,“method”:“GET”,“url”:“/favicon.ico”,“message”:“Redis server went away”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0”,“version”:“25.0.2.3”,“exception”:{“Exception”:“RedisException”,“Message”:“Redis server went away”,“Code”:0,“Trace”:[{“file”:“/var/www/nextcloud/lib/private/Memcache/Redis.php”,“line”:48,“function”:“get”,“class”:“Redis”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Template/JSCombiner.php”,“line”:114,“function”:“get”,“class”:“OC\Memcache\Redis”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Template/JSCombiner.php”,“line”:94,“function”:“isCached”,“class”:“OC\Template\JSCombiner”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Template/JSResourceLocator.php”,“line”:125,“function”:“process”,“class”:“OC\Template\JSCombiner”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Template/JSResourceLocator.php”,“line”:77,“function”:“cacheAndAppendCombineJsonIfExist”,“class”:“OC\Template\JSResourceLocator”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Template/ResourceLocator.php”,“line”:78,“function”:“doFind”,“class”:“OC\Template\JSResourceLocator”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/TemplateLayout.php”,“line”:379,“function”:“find”,“class”:“OC\Template\ResourceLocator”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/TemplateLayout.php”,“line”:211,“function”:“findJavascriptFiles”,“class”:“OC\TemplateLayout”,“type”:“::”},{“file”:“/var/www/nextcloud/lib/private/legacy/OC_Template.php”,“line”:184,“function”:“__construct”,“class”:“OC\TemplateLayout”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Template/Base.php”,“line”:132,“function”:“fetchPage”,“class”:“OC_Template”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/legacy/OC_Template.php”,“line”:333,“function”:“printPage”,“class”:“OC\Template\Base”,“type”:“->”},{“file”:“/var/www/nextcloud/index.php”,“line”:74,“function”:“printExceptionErrorPage”,“class”:“OC_Template”,“type”:“::”}],“File”:“/var/www/nextcloud/lib/private/Memcache/Redis.php”,“Line”:48,“CustomMessage”:“–”}}
{“reqId”:“xxx”,“level”:3,“time”:“2022-12-12T04:38:45+00:00”,“remoteAddr”:“xxx”,“user”:“–”,“app”:“remote”,“method”:“GET”,“url”:“/status.php”,“message”:“No such file or directory”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0”,“version”:“25.0.2.3”,“exception”:{“Exception”:“RedisException”,“Message”:“No such file or directory”,“Code”:0,“Trace”:[{“file”:“/var/www/nextcloud/lib/private/RedisFactory.php”,“line”:137,“function”:“pconnect”,“class”:“Redis”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/RedisFactory.php”,“line”:178,“function”:“create”,“class”:“OC\RedisFactory”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Memcache/Redis.php”,“line”:43,“function”:“getInstance”,“class”:“OC\RedisFactory”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Memcache/Factory.php”,“line”:118,“function”:“__construct”,“class”:“OC\Memcache\Redis”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Server.php”,“line”:1120,“function”:“createLocking”,“class”:“OC\Memcache\Factory”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:162,“function”:“OC\{closure}”,“class”:“OC\Server”,“type”:“->”,“args”:[“*** sensitive parameters replaced “]},{“file”:”/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:122,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",“line”:129,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/ServerContainer.php”,“line”:136,“function”:“query”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:57,“function”:“query”,“class”:“OC\ServerContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Server.php”,“line”:2070,“function”:“get”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/View.php”,“line”:117,“function”:“getLockingProvider”,“class”:“OC\Server”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Server.php”,“line”:462,“function”:“__construct”,“class”:“OC\Files\View”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:162,“function”:“OC\{closure}”,“class”:“OC\Server”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:122,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",“line”:129,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/ServerContainer.php”,“line”:136,“function”:“query”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:57,“function”:“query”,“class”:“OC\ServerContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Server.php”,“line”:1472,“function”:“get”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/base.php”,“line”:617,“function”:“boot”,“class”:“OC\Server”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/base.php”,“line”:1144,“function”:“init”,“class”:“OC”,“type”:“::”},{“file”:“/var/www/nextcloud/status.php”,“line”:37,“args”:[“/var/www/nextcloud/lib/base.php”],“function”:“require_once”}],“File”:“/var/www/nextcloud/lib/private/RedisFactory.php”,“Line”:137,“CustomMessage”:“–”}}
{“reqId”:“xxxx”,“level”:3,“time”:“2022-12-12T04:38:46+00:00”,“remoteAddr”:“xxx”,“user”:“–”,“app”:“index”,“method”:“GET”,“url”:“/index.php/apps/photos/service-worker.js”,“message”:“No such file or directory”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0”,“version”:“25.0.2.3”,“exception”:{“Exception”:“RedisException”,“Message”:“No such file or directory”,“Code”:0,“Trace”:[{“file”:“/var/www/nextcloud/lib/private/RedisFactory.php”,“line”:137,“function”:“pconnect”,“class”:“Redis”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/RedisFactory.php”,“line”:178,“function”:“create”,“class”:“OC\RedisFactory”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Memcache/Redis.php”,“line”:43,“function”:“getInstance”,“class”:“OC\RedisFactory”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Memcache/Factory.php”,“line”:118,“function”:“__construct”,“class”:“OC\Memcache\Redis”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Server.php”,“line”:1120,“function”:“createLocking”,“class”:“OC\Memcache\Factory”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:162,“function”:“OC\{closure}”,“class”:“OC\Server”,“type”:“->”,“args”:["
sensitive parameters replaced “]},{“file”:”/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:122,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php",“line”:129,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/ServerContainer.php”,“line”:136,“function”:“query”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:57,“function”:“query”,“class”:“OC\ServerContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Server.php”,“line”:2070,“function”:“get”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Files/View.php”,“line”:117,“function”:“getLockingProvider”,“class”:“OC\Server”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Server.php”,“line”:462,“function”:“__construct”,“class”:“OC\Files\View”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:162,“function”:“OC\{closure}”,“class”:“OC\Server”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php",“line”:122,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”,“args”:[" sensitive parameters replaced ***”]},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:129,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/ServerContainer.php”,“line”:136,“function”:“query”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:57,“function”:“query”,“class”:“OC\ServerContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/private/Server.php”,“line”:1472,“function”:“get”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/base.php”,“line”:617,“function”:“boot”,“class”:“OC\Server”,“type”:“->”},{“file”:“/var/www/nextcloud/lib/base.php”,“line”:1144,“function”:“init”,“class”:“OC”,“type”:“::”},{“file”:“/var/www/nextcloud/index.php”,“line”:34,“args”:[“/var/www/nextcloud/lib/base.php”],“function”:“require_once”}],“File”:“/var/www/nextcloud/lib/private/RedisFactory.php”,“Line”:137,“CustomMessage”:“–”}}

After many hours and some system restores with snapshots i found a solution:

the Redis server was the problem not the upgrade to HTTP2 i just changed this in the nextcloud config.php:

‘redis’ => [
‘host’ => ‘/run/redis/redis-server.sock’,
‘port’ => 0,
‘dbindex’ => 0,
‘password’ => ‘secret’,
‘timeout’ => 1.5,
],

to this

‘redis’ => [
‘host’ => ‘localhost’,
‘port’ => 0,
‘dbindex’ => 0,
‘password’ => ‘secret’,
‘timeout’ => 1.5,
],

now its working again

1 Like