Getting rid of security warnings on kubernetes install with helm

I have been running nextcloud 26.0.1 for over a month now and was able to get rid of a critical warning. But this other 2 warnings

  • Your web server is not properly set up to resolve “/.well-known/caldav”.
  • Your web server is not properly set up to resolve “/.well-known/carddav”.

I tried all the documentation said to do. Now I have this new warning about database indexes

he database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.

  • Missing index “fs_parent” in table “oc_filecache”.
  • Missing index “cards_abid” in table “oc_cards”.

This row doesn’t exist on the db. There is a command I found "sudo -u www-data php occ db:add-missing-indices

I get this error

Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
An unhandled exception has been thrown:
RedisException: php_network_getaddresses: getaddrinfo for failed: Name or service not known in /var/www/html/lib/private/RedisFactory.php:137
Stack trace:
#0 /var/www/html/lib/private/RedisFactory.php(137): Redis->pconnect(‘’, 6379, 0.0, NULL, 0, 0.0)
#1 /var/www/html/lib/private/RedisFactory.php(178): OC\RedisFactory->create()
#2 /var/www/html/lib/private/Memcache/Redis.php(50): OC\RedisFactory->getInstance()
#3 /var/www/html/lib/private/Memcache/Redis.php(56): OC\Memcache\Redis->getCache()
#4 /var/www/html/lib/private/App/InfoParser.php(58): OC\Memcache\Redis->get(‘/var/www/html/a…’)
#5 /var/www/html/lib/private/App/AppManager.php(506): OC\App\InfoParser->parse(‘/var/www/html/a…’)
#6 /var/www/html/lib/private/legacy/OC_App.php(607): OC\App\AppManager->getAppInfo(‘files’, false, NULL)
#7 /var/www/html/lib/private/AppFramework/App.php(71): OC_App::getAppInfo(‘files’)
#8 /var/www/html/lib/private/legacy/OC_App.php(291): OC\AppFramework\App::buildAppNamespace(‘files’)
#9 /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php(119): OC_App::registerAutoloading(‘files’, ‘/var/www/html/a…’)
#10 /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC\AppFramework\Bootstrap\Coordinator->registerApps(Array)
#11 /var/www/html/lib/base.php(688): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#12 /var/www/html/lib/base.php(1165): OC::init()
#13 /var/www/html/console.php(48): require_once(‘/var/www/html/l…’)
#14 /var/www/html/occ(11): require_once(‘/var/www/html/c…’)

Please advise

For the .well-known refer to the latest helm:

For the indexes issues, those are a normal byproduct of an upgrade. The reason the command isn’t working is because appears your PHP CLI configuration (and possibly version, since they often coincide) does not match your web PHP version.

There are multiple ways of addressing this, but some Helm specific approaches:

thanks for your response. I was able to bypass the memory limit issue now I am facing this.

An unhandled exception has been thrown:
RedisException: php_network_getaddresses: getaddrinfo for failed: Name or service not known in /var/www/html/lib/private/RedisFactory.php:137
Stack trace:
#0 /var/www/html/lib/private/RedisFactory.php(137): Redis->pconnect(‘’, 6379, 0.0, NULL, 0, 0.0)
#1 /var/www/html/lib/private/RedisFactory.php(178): OC\RedisFactory->create()
#2 /var/www/html/lib/private/Memcache/Redis.php(50): OC\RedisFactory->getInstance()
#3 /var/www/html/lib/private/Memcache/Redis.php(56): OC\Memcache\Redis->getCache()
#4 /var/www/html/lib/private/App/InfoParser.php(58): OC\Memcache\Redis->get(‘/var/www/html/a…’)
#5 /var/www/html/lib/private/App/AppManager.php(506): OC\App\InfoParser->parse(‘/var/www/html/a…’)
#6 /var/www/html/lib/private/legacy/OC_App.php(607): OC\App\AppManager->getAppInfo(‘files’, false, NULL)
#7 /var/www/html/lib/private/AppFramework/App.php(71): OC_App::getAppInfo(‘files’)
#8 /var/www/html/lib/private/legacy/OC_App.php(291): OC\AppFramework\App::buildAppNamespace(‘files’)
#9 /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php(119): OC_App::registerAutoloading(‘files’, ‘/var/www/html/a…’)
#10 /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC\AppFramework\Bootstrap\Coordinator->registerApps(Array)
#11 /var/www/html/lib/base.php(688): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#12 /var/www/html/lib/base.php(1165): OC::init()
#13 /var/www/html/console.php(48): require_once(‘/var/www/html/l…’)
#14 /var/www/html/occ(11): require_once(‘/var/www/html/c…’)

Adding this to my ingress fixed the issue
#need to be using latest version 26.0.2

annotations:
nginx.ingress.kubernetes.io/server-snippet: |-
location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}