docker-library / mysql

Docker Official Image packaging for MySQL Community Server
https://dev.mysql.com/
GNU General Public License v2.0
2.47k stars 2.2k forks source link

Container restarting all the time #1008

Open HKL-Kevin opened 1 year ago

HKL-Kevin commented 1 year ago
2023-11-02 08:02:18+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.2.0-1.el8 started.
2023-11-02 08:02:22+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-11-02 08:02:22+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.2.0-1.el8 started.
2023-11-02 08:02:25+00:00 [Note] [Entrypoint]: Initializing database files
2023-11-02T08:02:25.410121Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2023-11-02T08:02:25.416370Z 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.
2023-11-02T08:02:25.416631Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.2.0) initializing of server in progress as process 80
2023-11-02T08:02:25.444679Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-11-02T08:02:40.397536Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-11-02T08:02:57.818782Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2023-11-02T08:03:33.615005Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
2023-11-02 08:03:33+00:00 [Note] [Entrypoint]: Database files initialized
2023-11-02 08:03:33+00:00 [Note] [Entrypoint]: Starting temporary server
2023-11-02T08:03:34.011782Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2023-11-02T08:03:34.859498Z 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.
2023-11-02T08:03:34.861168Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.2.0) starting as process 124
2023-11-02T08:03:35.822188Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-11-02T08:03:37.256573Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-11-02T08:03:56.642648Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-11-02T08:03:56.643342Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-11-02T08:03:56.648839Z 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.
2023-11-02T08:03:56.714052Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2023-11-02T08:03:56.714241Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.2.0'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
2023-11-02T08:03:56.717881Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2023-11-02 08:03:58+00:00 [Note] [Entrypoint]: Temporary server started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.

2023-11-02 08:06:10+00:00 [Note] [Entrypoint]: Stopping temporary server
2023-11-02T08:06:12.326064Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.2.0).
2023-11-02T08:06:37.194395Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.2.0)  MySQL Community Server - GPL.
2023-11-02T08:06:37.209478Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2023-11-02 08:06:38+00:00 [Note] [Entrypoint]: Temporary server stopped

2023-11-02 08:06:38+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.

2023-11-02T08:06:38.455175Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2023-11-02T08:06:39.042995Z 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.
2023-11-02T08:06:39.044547Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.2.0) starting as process 1
2023-11-02T08:06:39.060412Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-11-02T08:06:42.010505Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-11-02T08:07:00.993999Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of bind-address: '*' port: 33060 failed, `socket()` failed with error: Permission denied(13)'
2023-11-02T08:07:00.994105Z 0 [ERROR] [MY-013597] [Server] Plugin mysqlx reported: 'Value '*' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.'
2023-11-02T08:07:01.317681Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-11-02T08:07:01.317765Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-11-02T08:07:01.319058Z 0 [ERROR] [MY-010250] [Server] Failed to create a socket for IPv4 '0.0.0.0': errno: 13.
2023-11-02T08:07:01.319098Z 0 [ERROR] [MY-010255] [Server] Can't create IP socket: Permission denied
2023-11-02T08:07:01.319124Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-11-02T08:07:02.873366Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.2.0)  MySQL Community Server - GPL.
2023-11-02T08:07:02.875335Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2023-11-02 08:07:33+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.2.0-1.el8 started.
2023-11-02 08:07:56+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-11-02 08:07:56+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.2.0-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2023-11-02T08:08:00.343711Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2023-11-02T08:08:03.374979Z 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.
2023-11-02T08:08:03.376633Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.2.0) starting as process 1
2023-11-02T08:08:03.595146Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-11-02T08:08:05.275063Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-11-02T08:08:31.855193Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of bind-address: '*' port: 33060 failed, `socket()` failed with error: Permission denied(13)'
2023-11-02T08:08:31.855465Z 0 [ERROR] [MY-013597] [Server] Plugin mysqlx reported: 'Value '*' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.'
2023-11-02T08:08:32.159379Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-11-02T08:08:32.160127Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-11-02T08:08:32.164676Z 0 [ERROR] [MY-010250] [Server] Failed to create a socket for IPv4 '0.0.0.0': errno: 13.
2023-11-02T08:08:32.164781Z 0 [ERROR] [MY-010255] [Server] Can't create IP socket: Permission denied
2023-11-02T08:08:32.165338Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-11-02T08:08:33.852485Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.2.0)  MySQL Community Server - GPL.
2023-11-02T08:08:33.855091Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2023-11-02 08:08:52+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.2.0-1.el8 started.
2023-11-02 08:10:04+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-11-02 08:10:04+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.2.0-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2023-11-02T08:10:23.658577Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2023-11-02T08:10:24.260788Z 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.
2023-11-02T08:10:24.262392Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.2.0) starting as process 1
2023-11-02T08:10:24.278309Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-11-02T08:10:24.850164Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-11-02T08:10:25.679976Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of bind-address: '*' port: 33060 failed, `socket()` failed with error: Permission denied(13)'
2023-11-02T08:10:25.680035Z 0 [ERROR] [MY-013597] [Server] Plugin mysqlx reported: 'Value '*' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.'
2023-11-02T08:10:26.678334Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-11-02T08:10:26.678721Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-11-02T08:10:26.681026Z 0 [ERROR] [MY-010250] [Server] Failed to create a socket for IPv4 '0.0.0.0': errno: 13.
2023-11-02T08:10:26.681283Z 0 [ERROR] [MY-010255] [Server] Can't create IP socket: Permission denied
2023-11-02T08:10:26.681486Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-11-02T08:10:30.337135Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.2.0)  MySQL Community Server - GPL.
2023-11-02T08:10:30.339855Z 0 [System] [MY-015016] [Server] MySQL Server - end.
LaurentGoderre commented 1 year ago

Duplicate of #1007

yosifkit commented 1 year ago

2023-11-02T08:10:26.681026Z 0 [ERROR] [MY-010250] [Server] Failed to create a socket for IPv4 '0.0.0.0': errno: 13. 2023-11-02T08:10:26.681283Z 0 [ERROR] [MY-010255] [Server] Can't create IP socket: Permission denied

Not sure what's causing it, but this is the source of the restarts. How are you running it, can you share your docker run line or compose file?

HKL-Kevin commented 1 year ago

2023-11-02T08:10:26.681026Z 0 [ERROR] [MY-010250] [Server] Failed to create a socket for IPv4 '0.0.0.0': errno: 13. 2023-11-02T08:10:26.681283Z 0 [ERROR] [MY-010255] [Server] Can't create IP socket: Permission denied

Not sure what's causing it, but this is the source of the restarts. How are you running it, can you share your docker run line or compose file?

My cmd as:

sudo docker run --restart always --name mysql -e MYSQL_ROOT_PASSWORD=mysql  --net=host --privileged=true -d arm64v8/mysql
tianon commented 11 months ago

You probably don't want to run this image with --net=host :grimacing: