psi-4ward / docker-powerdns

PowerDNS Docker Image based on Alpine
107 stars 110 forks source link

Infinte "Waiting for database to come up" if running via docker swarm #53

Closed 4n70w4 closed 4 years ago

4n70w4 commented 4 years ago
version: "3.8"

services:
 pdns:
   image: psitrax/powerdns
   depends_on:
     - mariadb
   ports:
     - 53:53
     - 53:53/udp
   environment:
     - MYSQL_USER=root
     - MYSQL_PASS=supersecret
     - MYSQL_PORT=3306
     - MYSQL_HOST=mariadb
   command:
     - --cache-ttl=120
     - --allow-axfr-ips=127.0.0.1,123.1.2.3

 mariadb:
   image: mariadb:10.1
   environment:
     - MYSQL_ROOT_PASSWORD=supersecret

If I start docker-compose up - all ok.

pdns_1     | Sep 12 19:35:24 Guardian is launching an instance
pdns_1     | Sep 12 19:35:24 UDP server bound to 0.0.0.0:53
pdns_1     | Sep 12 19:35:24 TCP server bound to 0.0.0.0:53
pdns_1     | Sep 12 19:35:24 Master/slave communicator launching
pdns_1     | Sep 12 19:35:24 Creating backend connection for TCP
pdns_1     | Sep 12 19:35:24 Only asked for 1 backend thread - operating unthreaded

But via docker stack deploy --compose-file docker-compose.yml stackdemo errors:

ERROR 1045 (28000): Access denied for user 'root'@'10.0.1.4' (using password: YES)
 Waiting for database to come up
 ERROR 1045 (28000): Access denied for user 'root'@'10.0.1.4' (using password: YES)
 Waiting for database to come up
 ERROR 1045 (28000): Access denied for user 'root'@'10.0.1.4' (using password: YES)
 Waiting for database to come up
 ERROR 1045 (28000): Access denied for user 'root'@'10.0.1.4' (using password: YES)
 Waiting for database to come up
 ERROR 1045 (28000): Access denied for user 'root'@'10.0.1.4' (using password: YES)
 Waiting for database to come up
 ERROR 1045 (28000): Access denied for user 'root'@'10.0.1.4' (using password: YES)
 Waiting for database to come up
 ERROR 1045 (28000): Access denied for user 'root'@'10.0.1.4' (using password: YES)
 Waiting for database to come up
 ERROR 1045 (28000): Access denied for user 'root'@'10.0.1.4' (using password: YES)
 Waiting for database to come up
psi-4ward commented 4 years ago

Access denied for user 'root'@'10.0.1.4' So seems this issue is not related to the container.