CMS Version
4.0.6.
Installation Method
Docker
Operating System
Debian GNU/Linux 11 (bullseye)
Issue
can’t connect to mysql
docker-compose logs cms-web
cms-web_1 | Configuring Database Settings
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | Setting up Maintenance
cms-web_1 | Protected Maintenance
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | Importing ca-certs
cms-web_1 | cp: cannot stat '/var/www/cms/ca-certs/*.pem': No such file or directory
cms-web_1 | cp: cannot stat '/var/www/cms/ca-certs/*.crt': No such file or directory
cms-web_1 | Updating certificates in /etc/ssl/certs...
cms-web_1 | 0 added, 0 removed; done.
cms-web_1 | Running hooks in /etc/ca-certificates/update.d...
cms-web_1 | done.
cms-web_1 | Setting up Quickchart
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | Configuring Maintenance
cms-web_1 | Removing web/install/index.php from production container
cms-web_1 | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (-2)
cms-web_1 | Configure PHP
cms-web_1 | Configure Apache
cms-web_1 | Starting cron
cms-web_1 | Starting webserver
cms-web_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.24.0.6. Set the 'ServerName' directive globally to suppress this message
calling over Browser:
Fatal Error - sorry this shouldn’t happen.
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known
I had a running 2.3.x Xibo version and tried to update up to 3.3. but also got this error. Then I tried to go back and used the backup files, I got the same error like above. Then I removed everything. clean up all Docker Images, container and everything in the folder. Now I tried directly the last version 4.0.6 and I got this error.
The only change I do is using an Apache2 to serve https like describe here Xibo for Docker | Xibo Digital Signage
What can I do to find the solution?
EDIT:
May I show also the logs from the db
cms-db_1 | 2024-01-25 12:29:19+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.36-1.el8 started.
cms-db_1 | 2024-01-25 12:29:21+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
cms-db_1 | 2024-01-25 12:29:21+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.36-1.el8 started.
cms-db_1 | 2024-01-25 12:29:21+00:00 [Note] [Entrypoint]: Initializing database files
cms-db_1 | 2024-01-25T12:29:21.513291Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
cms-db_1 | 2024-01-25T12:29:21.515662Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.36) initializing of server in progress as process 81
cms-db_1 | 2024-01-25T12:29:21.589681Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
cms-db_1 | 2024-01-25T12:29:25.482120Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
cms-db_1 | 2024-01-25T12:29:33.852258Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
cms-db_1 | 2024-01-25 12:29:51+00:00 [Note] [Entrypoint]: Database files initialized
cms-db_1 | 2024-01-25 12:29:51+00:00 [Note] [Entrypoint]: Starting temporary server
cms-db_1 | 2024-01-25T12:29:52.209979Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
cms-db_1 | 2024-01-25T12:29:52.211943Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.36) starting as process 123
cms-db_1 | 2024-01-25T12:29:52.253796Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
cms-db_1 | 2024-01-25T12:29:53.418597Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
cms-db_1 | 2024-01-25T12:29:53.942185Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
cms-db_1 | 2024-01-25T12:29:53.942239Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
cms-db_1 | 2024-01-25T12:29:53.953167Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
cms-db_1 | 2024-01-25T12:29:53.985428Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
cms-db_1 | 2024-01-25T12:29:53.985487Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.36' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
cms-db_1 | 2024-01-25 12:29:54+00:00 [Note] [Entrypoint]: Temporary server started.
cms-db_1 | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
cms-db_1 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
cms-db_1 | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
cms-db_1 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
cms-db_1 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
cms-db_1 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
cms-db_1 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
cms-db_1 | 2024-01-25 12:29:57+00:00 [Note] [Entrypoint]: GENERATED ROOT PASSWORD: 7rj27FJvMgP684f8ynkaM8bxXYk+9jSb
cms-db_1 | 2024-01-25 12:29:57+00:00 [Note] [Entrypoint]: Creating database cms
cms-db_1 | 2024-01-25 12:29:58+00:00 [Note] [Entrypoint]: Creating user cms
cms-db_1 | 2024-01-25 12:29:58+00:00 [Note] [Entrypoint]: Giving user cms access to schema cms
cms-db_1 |
cms-db_1 | 2024-01-25 12:29:58+00:00 [Note] [Entrypoint]: Stopping temporary server
cms-db_1 | 2024-01-25T12:29:58.254524Z 13 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.36).
cms-db_1 | 2024-01-25T12:30:05.816145Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.36) MySQL Community Server - GPL.
cms-db_1 | 2024-01-25 12:30:06+00:00 [Note] [Entrypoint]: Temporary server stopped
cms-db_1 |
cms-db_1 | 2024-01-25 12:30:06+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
cms-db_1 |
cms-db_1 | 2024-01-25T12:30:06.536961Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
cms-db_1 | 2024-01-25T12:30:06.538784Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.36) starting as process 1
cms-db_1 | 2024-01-25T12:30:06.546990Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
cms-db_1 | 2024-01-25T12:30:07.130418Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
cms-db_1 | 2024-01-25T12:30:07.906440Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
cms-db_1 | 2024-01-25T12:30:07.906490Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
cms-db_1 | 2024-01-25T12:30:07.941971Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
cms-db_1 | 2024-01-25T12:30:07.976332Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
cms-db_1 | 2024-01-25T12:30:07.976394Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.36' socket: '/var/run/mysqld/mysqld.sock' port: 3306