Hi and thanks for your answer.
I tried it over the ip address but I still got the same error:
2021/07/15 10:05:41 [error] 414#414: *51529 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name does not resolve in /config/www/nextcloud/lib/private/DB/Connection.php:85
Stack trace:
#0 /config/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /config/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /config/www/nextcloud/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connection->executeQuery()
#3 /config/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /config/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /config/www/nextcloud/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /config/www/nextcloud/lib/private/AppConfig.php(1" while reading response header from upstream, client: <Client-IP>, server: _, request: "PROPFIND /remote.php/dav/files/<username>/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "<Host-IP>"
I also tried your suggestion but with no success. I got the following error with both, the hostname and the ip address.
After I ran the command the logs of MariaDB say the following but the same error appears when I run the command from Nextcloud container to the older working MariaDB container.
2021-07-17 20:00:04 4 [Warning] Aborted connection 4 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.4' (This connection closed normally without authentication)
This means that the Nextcloud container can reach the MariaDB container although the errormessage says that Nextcloud can't resolve the hostname?When I try to make an action on the webinterface of nextcloud connected to the latest container of MariaDB the error appears and there is no new record in the log of MariaDB. Thats so confusing... I've never had somthing like this bevor.
I tried the same command from another container (phpMyAdmin) and there the command has apparently been successful.
They are all in the same docker network.