Closed RJGhugo closed 4 years ago
Can you give show the errors that are encountered and any relevant log output
I'm not able to reproduce a failure: :confused:
$ docker pull mariadb:10.5
10.5: Pulling from library/mariadb
Digest: sha256:e694a07f60a2bef2c48de9a2c852d05f8be9c76a8170b16f98809977398db07a
Status: Image is up to date for mariadb:10.5
$ docker run -it --rm -e MYSQL_ROOT_PASSWORD=example mariadb:10.5
2020-09-14 22:36:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.5+maria~focal started.
2020-09-14 22:36:12+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-09-14 22:36:12+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.5+maria~focal started.
2020-09-14 22:36:13+00:00 [Note] [Entrypoint]: Initializing database files
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h password 'new-password'
Alternatively you can run:
'/usr/bin/mysql_secure_installation'
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the MariaDB Knowledgebase at https://mariadb.com/kb or the
MySQL manual for more instructions.
Please report any problems at https://mariadb.org/jira
The latest information about MariaDB is available at https://mariadb.org/.
You can find additional information about the MySQL part at:
https://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
2020-09-14 22:36:41+00:00 [Note] [Entrypoint]: Database files initialized
2020-09-14 22:36:41+00:00 [Note] [Entrypoint]: Starting temporary server
2020-09-14 22:36:41+00:00 [Note] [Entrypoint]: Waiting for server startup
2020-09-14 22:36:41 0 [Note] mysqld (mysqld 10.5.5-MariaDB-1:10.5.5+maria~focal) starting as process 109 ...
2020-09-14 22:36:41 0 [Note] InnoDB: Using Linux native AIO
2020-09-14 22:36:41 0 [Note] InnoDB: Uses event mutexes
2020-09-14 22:36:41 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-09-14 22:36:41 0 [Note] InnoDB: Number of pools: 1
2020-09-14 22:36:41 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions
2020-09-14 22:36:41 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-09-14 22:36:41 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2020-09-14 22:36:41 0 [Note] InnoDB: Completed initialization of buffer pool
2020-09-14 22:36:41 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-09-14 22:36:41 0 [Note] InnoDB: 128 rollback segments are active.
2020-09-14 22:36:41 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-09-14 22:36:41 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-09-14 22:36:41 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-09-14 22:36:41 0 [Note] InnoDB: 10.5.5 started; log sequence number 45289; transaction id 21
2020-09-14 22:36:41 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-09-14 22:36:41 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-09-14 22:36:41 0 [Note] InnoDB: Buffer pool(s) load completed at 200914 22:36:41
2020-09-14 22:36:41 0 [Warning] 'user' entry 'root@1802c7822fc7' ignored in --skip-name-resolve mode.
2020-09-14 22:36:41 0 [Warning] 'user' entry '@1802c7822fc7' ignored in --skip-name-resolve mode.
2020-09-14 22:36:41 0 [Warning] 'proxies_priv' entry '@% root@1802c7822fc7' ignored in --skip-name-resolve mode.
2020-09-14 22:36:41 0 [Note] Reading of all Master_info entries succeeded
2020-09-14 22:36:41 0 [Note] Added new Master_info '' to hash table
2020-09-14 22:36:41 0 [Note] mysqld: ready for connections.
Version: '10.5.5-MariaDB-1:10.5.5+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution
2020-09-14 22:36:42+00:00 [Note] [Entrypoint]: Temporary server started.
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.
2020-09-14 22:37:11 5 [Warning] 'proxies_priv' entry '@% root@1802c7822fc7' ignored in --skip-name-resolve mode.
2020-09-14 22:37:11+00:00 [Note] [Entrypoint]: Stopping temporary server
2020-09-14 22:37:11 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
2020-09-14 22:37:11 0 [Note] Event Scheduler: Purging the queue. 0 events
2020-09-14 22:37:11 0 [Note] InnoDB: FTS optimize thread exiting.
2020-09-14 22:37:11 0 [Note] InnoDB: Starting shutdown...
2020-09-14 22:37:11 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2020-09-14 22:37:11 0 [Note] InnoDB: Buffer pool(s) dump completed at 200914 22:37:11
2020-09-14 22:37:12 0 [Note] InnoDB: Shutdown completed; log sequence number 45301; transaction id 24
2020-09-14 22:37:12 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-09-14 22:37:12 0 [Note] mysqld: Shutdown complete
2020-09-14 22:37:13+00:00 [Note] [Entrypoint]: Temporary server stopped
2020-09-14 22:37:13+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
2020-09-14 22:37:13 0 [Note] mysqld (mysqld 10.5.5-MariaDB-1:10.5.5+maria~focal) starting as process 1 ...
2020-09-14 22:37:13 0 [Note] InnoDB: Using Linux native AIO
2020-09-14 22:37:13 0 [Note] InnoDB: Uses event mutexes
2020-09-14 22:37:13 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-09-14 22:37:13 0 [Note] InnoDB: Number of pools: 1
2020-09-14 22:37:13 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions
2020-09-14 22:37:13 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-09-14 22:37:13 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2020-09-14 22:37:13 0 [Note] InnoDB: Completed initialization of buffer pool
2020-09-14 22:37:13 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-09-14 22:37:13 0 [Note] InnoDB: 128 rollback segments are active.
2020-09-14 22:37:13 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-09-14 22:37:13 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-09-14 22:37:13 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-09-14 22:37:13 0 [Note] InnoDB: 10.5.5 started; log sequence number 45301; transaction id 21
2020-09-14 22:37:13 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-09-14 22:37:13 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-09-14 22:37:13 0 [Note] InnoDB: Buffer pool(s) load completed at 200914 22:37:13
2020-09-14 22:37:13 0 [Note] Server socket created on IP: '::'.
2020-09-14 22:37:13 0 [Warning] 'proxies_priv' entry '@% root@1802c7822fc7' ignored in --skip-name-resolve mode.
2020-09-14 22:37:13 0 [Note] Reading of all Master_info entries succeeded
2020-09-14 22:37:13 0 [Note] Added new Master_info '' to hash table
2020-09-14 22:37:13 0 [Note] mysqld: ready for connections.
Version: '10.5.5-MariaDB-1:10.5.5+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
Thanks for the quick response.
OS:
Linux node1 5.4.0-1018-raspi #20-Ubuntu SMP Sun Sep 6 05:11:16 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
k3s:
k3s version v1.18.8+k3s1 (6b595318)
Till now I was not able to run mariadb nor mysql with a test deployment...
apiVersion: apps/v1
kind: Deployment
metadata:
name: apache
spec:
replicas: 1
selector:
matchLabels:
app: apache
template:
metadata:
labels:
app: apache
spec:
containers:
- image: httpd
name: apache
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx
name: nginx
apiVersion: apps/v1
kind: Deployment
metadata:
name: mariadb
spec:
replicas: 1
selector:
matchLabels:
app: mariadb
template:
metadata:
labels:
app: mariadb
spec:
containers:
- image: mariadb
name: mariadb
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
spec:
replicas: 1
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- image: mysql
name: mysql
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextcloud
spec:
replicas: 1
selector:
matchLabels:
app: nextcloud
template:
metadata:
labels:
app: nextcloud
spec:
containers:
- image: nextcloud
name: nextcloud
The resultat is:
kubectl get pods
NAME READY STATUS RESTARTS AGE
apache-5c6f7c5747-gt5tc 1/1 Running 0 7m13s
nginx-f89759699-5l8hl 1/1 Running 0 7m13s
nextcloud-78fd9d45d5-jbfwv 1/1 Running 0 7m13s
mysql-6557b58685-pzsv7 0/1 ImagePullBackOff 0 7m13s
mariadb-545fdc7bcf-q9lvp** 0/1 CrashLoopBackOff 6 7m13s
ImagePullBackOff
and CrashLoopBackOff
, what's the output of kubectl describe pod mariadb
and kubectl logs mariadb
$ sudo docker -v Docker version 19.03.13, build 4484c46
$ sudo docker images REPOSITORY TAG IMAGE ID CREATED SIZE
$ cat test.yaml apiVersion: apps/v1 kind: Deployment metadata: name: mariadb spec: selector: matchLabels: app: mariadb template: metadata: labels: app: mariadb spec: containers:
$ kubectl create -f test.yaml deployment.apps/mariadb created
$ kubectl get pods NAME READY STATUS RESTARTS AGE mariadb-545fdc7bcf-vz6d9 0/1 CrashLoopBackOff 1 48s
$ kubectl describe pod mariadb
Name: mariadb-545fdc7bcf-vz6d9
Namespace: default
Priority: 0
Node: node1/192.168.2.10
Start Time: Wed, 23 Sep 2020 17:59:03 +0200
Labels: app=mariadb
pod-template-hash=545fdc7bcf
Annotations:
Normal Scheduled
$ kubectl logs mariadb-545fdc7bcf-vz6d9 2020-09-23 16:01:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.5+maria ~ focal started. 2020-09-23 16:01:25+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2020-09-23 16:01:25+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.5+maria~focal started. 2020-09-23 16:01:25+00:00 [ERROR] [Entrypoint]: Database is uninitialized and password option is not specified You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
$ sudo docker images REPOSITORY TAG IMAGE ID CREATED SIZE
Ah, You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
https://github.com/docker-library/docs/tree/master/mariadb#environment-variables
This variable is mandatory and specifies the password that will be set for the MariaDB root superuser account.
Thanks very much!
first attempt:
apiVersion: apps/v1 kind: Deployment metadata: name: mariadb spec: selector: matchLabels: app: mariadb template: metadata: labels: app: mariadb spec: containers:
second attempt:
with: https://kubernetes.io/docs/concepts/configuration/secret/
Hello,
I am starting with docker/k3s and wanted to run mariadb on Raspi4/Ubuntu 20.04/k3s.
Deploy an image with httpd or nextcloud works, but not with mariadb.