I have Nextcloud installed using docker-compose. Due to issues uploading a huge folder (560Gb). I had to restart the docker compose set up, I saw that the Nextcloud container was recreated/updated.
After this Nextcloud refuses to start, web says “Internal server error”. Webtools says it cant load favicon. Well the container starts without issues. The ssl-certificate is loaded like it should.
nextcloud:
image: lscr.io/linuxserver/nextcloud:latest
container_name: nextcloud
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- MYSQL_DATABASE=${MYSQL_DB}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PW}
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_PORT=${MYSQL_PORT}
- NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN}
- NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_ADMIN_PW}
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- REDIS_HOST_PASSWORD=${REDIS_PW}
depends_on:
- mariadb
- redis
volumes:
- ./appdata/nextcloud:/config
- /amsvartnir/nextcloudstorage/:/data
#ports:
# - 11100:80
# - 12100:443
labels:
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.entrypoints=websecure"
- "traefik.http.routers.nextcloud.rule=Host(`cloud.${DOMAIN}`)"
- "traefik.http.routers.nextcloud.tls=true"
- "traefik.http.routers.nextcloud.tls.certresolver=letencrypt"
#- "traefik.http.routers.nextcloud.middlewares=nextcloud-dav,secHeaders@file"
- "traefik.http.middlewares.nextcloud-dav.replacepathregex.regex=^/.well-known/ca(l|rd)dav"
- "traefik.http.middlewares.nextcloud-dav.replacepathregex.replacement=/remote.php/dav/"
networks:
- frontend
restart: unless-stopped
This is a first time for me with this error, what shall I do?
jtr
July 7, 2025, 7:04pm
2
This is a generic error. Check your nextcloud.log
as described in the support template .
I had to restart the docker compose set up, I saw that the Nextcloud container was recreated/updated.
I see you’re using the latest
tag. You may want to use a more specific tag to avoid surprising major version bumps. See LSIO’s image docs.
Webtools says it cant load favicon
Failing favicon retrieval won’t prevent anything from functioning (to this degree). This is likely a red herring.
You are correct, this is a red herring.
This is what show now:
nextcloud | Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mariadb failed: Name does not resolve in /app/www/public/lib/private/DB/Connection.php:237
nextcloud | Stack trace:
nextcloud | #0 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(458): OC\DB\Connection->connect()
nextcloud | #1 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(416): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
nextcloud | #2 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(323): Doctrine\DBAL\Connection->detectDatabasePlatform()
nextcloud | #3 /app/www/public/lib/private/DB/Connection.php(903): Doctrine\DBAL\Connection->getDatabasePlatform()
nextcloud | #4 /app/www/public/lib/private/DB/ConnectionAdapter.php(235): OC\DB\Connection->getDatabaseProvider()
nextcloud | #5 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(96): OC\DB\ConnectionAdapter->getDatabaseProvider()
nextcloud | #6 /app/www/public/lib/private/AppConfig.php(1226): OC\DB\QueryBuilder\QueryBuilder->expr()
nextcloud | #7 /app/www/public/lib/private/AppConfig.php(243): OC\AppConfig->loadConfig()
nextcloud | #8 /app/www/public/lib/private/AppConfig.php(1366): OC\AppConfig->searchValues()
nextcloud | #9 /app/www/public/lib/private/App/AppManager.php(136): OC\AppConfig->getValues()
nextcloud | #10 /app/www/public/lib/private/App/AppManager.php(157): OC\App\AppManager->getInstalledAppsValues()
nextcloud | #11 /app/www/public/lib/private/legacy/OC_App.php(188): OC\App\AppManager->getInstalledApps()
nextcloud | #12 /app/www/public/lib/private/AppFramework/Bootstrap/Coordinator.php(48): OC_App::getEnabledApps()
nextcloud | #13 /app/www/public/lib/base.php(675): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
nextcloud | #14 /app/www/public/lib/base.php(1171): OC::init()
nextcloud | #15 /app/www/public/cron.php(24): require_once('...')
nextcloud | #16 {main}
I know that the database is up and running. I have a healthcheck on it and I see it is up and running, the login works. And other services is using it.
jtr
July 7, 2025, 7:32pm
4
Can you test DNS resolution for mariadb
from within the Nextcloud container?
Is the mariadb
container on your frontend
Docker network?
1 Like
jtr:
networks:
- frontend
Without checking it that has to be it!
system
Closed
July 15, 2025, 7:44pm
6
This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.