Hello, can someone plz explain to me why i get on nextcloud-aio-nextcloud logs:
⚡ root@openmediavault ~ docker logs --tail=50 nextcloud-aio-nextcloud nc: getaddrinfo for host "nextcloud-aio-database" port 5432: Try again Waiting for database to start...
while i can do this manually:
⚡ root@openmediavault ~ docker exec -it nextcloud-aio-nextcloud sh
/var/www/html # ping nextcloud-aio-database
PING nextcloud-aio-database (172.25.0.9): 56 data bytes
64 bytes from 172.25.0.9: seq=0 ttl=42 time=0.074 ms
I renamed the topic to actually say something about the issue, but I don’t understand the command you shared. It is not a valid docker logs command. Was the command this:
docker logs --tail=50 nextcloud-aio-nextcloud
and the error log this?
nc: getaddrinfo for host "nextcloud-aio-database" port 5432: Try again Waiting for database to start...
If nc in the interactive shell worked, since the error log shows more than just an nc error, I guess it could be something related to how nextcloud tries to use nectat.
Or, the error log was shown before the database started and that is everything works in an interactive shell now.
Thank you for renaming the topic.
Yes you are correct : nc: getaddrinfo for host "nextcloud-aio-database" port 5432: Try again Waiting for database to start...
is the result i get of the cmd docker logs nextcloud-aio-nextcloud
even after restarting only the nextcloud-aio-nextcloud container, it can’t reach/find nextcloud-aio-nextcloud.
fyi : i checked iptables rules and i dont have ufw
If name resolution and netcat works from the terminal in the same container, it must be some NextCloud-related setting that overrides the DNS server, otherwise it would never work regardless of where you try in the container.
If ypu share which Docker image you are using to start the nextcloud container and how you start it, hopefully we can come up with an idea. If not, a NextCloud community could be a better choice.