docker-mautic icon indicating copy to clipboard operation
docker-mautic copied to clipboard

docker compose file error

Open gzcwnk opened this issue 5 years ago • 5 comments

[root@vuwunicopatch8b mautic]# docker-compose up -d ERROR: Service "mautic" uses an undefined network "mauticnet" [root@vuwunicopatch8b mautic]#

Something missing out of the std file provided?

======== version: "2"

services: database: image: powertic/percona-docker container_name: database environment: MYSQL_ROOT_PASSWORD: mypassword ports: - "3306:3306" volumes: - database:/var/lib/mysql restart: always networks: - mauticnet command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --sql-mode=""

mautic: container_name: mautic image: mautic/mautic:v3 volumes: - mautic_data:/var/www/html environment: - MAUTIC_DB_HOST=database - MAUTIC_DB_USER=root - MAUTIC_DB_PASSWORD=mypassword - MAUTIC_DB_NAME=mautic3 restart: always networks: - mauticnet ports: - "8880:80"


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

gzcwnk avatar Aug 28 '20 01:08 gzcwnk

Think just missing 2 lines on the end?

====== version: "2"

services: database: image: powertic/percona-docker container_name: database environment: MYSQL_ROOT_PASSWORD: xxxxxxxxxx ports: - "3306:3306" volumes: - /home/mautic/mysql:/var/lib/mysql #- database:/var/lib/mysql #restart: always restart: unless-stopped networks: - mauticnet command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --sql-mode=""

mautic: container_name: mautic image: mautic/mautic:v3 volumes: #- mautic_data:/var/www/html - /home/mautic/mautic_data:/var/www/html environment: - MAUTIC_DB_HOST=database - MAUTIC_DB_USER=root - MAUTIC_DB_PASSWORD=xxxxxxxx - MAUTIC_DB_NAME=mautic3 #restart: always restart: unless-stopped networks: - mauticnet ports: - "8880:80"

networks: mauticnet:

gzcwnk avatar Aug 28 '20 01:08 gzcwnk

however the database is in a restart loop so not happy :(

gzcwnk avatar Aug 28 '20 01:08 gzcwnk

8><----- 20 mautic | mautic | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution mautic | mautic | Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution mautic | mautic | Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution mautic | mautic | Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution mautic | mautic | Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution mautic | mautic | Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution mautic | mautic | Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution mautic | mautic | Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution mautic | mautic | Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /makedb.php on line 20 mautic | mautic | MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution ^CGracefully stopping... (press Ctrl+C again to force) Stopping mautic ... done Stopping database ... done [root@vuwunicopatch8b mautic]#

gzcwnk avatar Aug 28 '20 01:08 gzcwnk

Got the same error in first place. Check if the database service's log contains mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 13 - Permission denied). I was able to solve this by changing the permissions of the directory I mounted to mysql service. Since it's for local testing only, I was fine with chmod 777, but you don't want that in any other stage.

Better solutions are appreciated.

mikel-jason avatar Sep 29 '20 10:09 mikel-jason

version: "2"

volumes: database: mautic_data:

services: database: image: powertic/percona-docker container_name: realizamautic environment: MYSQL_ROOT_PASSWORD: oO5kR9yG6dV1aT6z ports: - "3306:3306" volumes: - database:/var/lib/mysql restart: always networks: - mauticnet command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --sql-mode=""

mautic: container_name: mautic image: mautic/mautic:v3 volumes: - mautic_data:/var/www/html environment: - MAUTIC_DB_HOST=realizamautic - MAUTIC_DB_USER=root - MAUTIC_DB_PASSWORD=oO5kR9yG6dV1aT6z - MAUTIC_DB_NAME=mautic3 restart: always networks: - mauticnet ports: - "8880:80"

networks: mauticnet:

magnoeasy avatar Sep 29 '20 21:09 magnoeasy