adfinis / mariadb-galera-chart

Helm chart for deploying MariaDB Galera Cluster on Kubernetes
GNU General Public License v3.0
23 stars 11 forks source link

ERROR #2

Open ajinkyaingole30 opened 4 years ago

ajinkyaingole30 commented 4 years ago

@tongpu @meabolex adfinis-sygroup/mariadb-galera-chart everything was working fine but suddenly few days later when i run the same mariadb-galera pods where stuck showing this ERROR Warning Unhealthy pod/test-mdb-ga-0 Readiness probe failed: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")

[root@kubem01 ~]# helm install test mariadb-galera-chart --set mysqlRootPassword=mypassword,persistence.storageClass=managed-nfs-storage NAME: test LAST DEPLOYED: Wed Sep 16 03:01:02 2020 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: MariaDB can be accessed via port 3306 on the following DNS name from within your cluster: test-mdb-ga.default.svc.cluster.local

To connect to your database:

  1. Run a pod that you can use as a client:

    kubectl run test-mdb-ga-client --rm --tty -i --image mariadb --command -- bash

  2. Connect using the mysql cli, then provide your password: $ mysql -h test-mdb-ga -p mypassword [root@kubem01 ~]# [root@kubem01 ~]#

[root@kubem01 ~]# kubectl get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE datadir-test-mdb-ga-0 Bound pvc-edaf1e77-9c24-4efb-aeb5-db68d80fd7c8 8Gi RWO managed-nfs-storage 9s [root@kubem01 ~]# [root@kubem01 ~]#

[root@kubem01 ~]# kubectl get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-edaf1e77-9c24-4efb-aeb5-db68d80fd7c8 8Gi RWO Delete Bound default/datadir-test-mdb-ga-0 managed-nfs-storage 16s [root@kubem01 ~]# [root@kubem01 ~]# kubectl get pods NAME READY STATUS RESTARTS AGE nfs-client-provisioner-6d79f78967-67j5h 1/1 Running 0 24h test-mdb-ga-0 [root@kubem01 ~]# kubectl get events LAST SEEN TYPE REASON OBJECT MESSAGE 2m1s Normal ExternalProvisioning persistentvolumeclaim/datadir-test-mdb-ga-0 waiting for a volume to be created, either by external provisioner "example.com/nfs" or manually created by system administrator 2m1s Normal Provisioning persistentvolumeclaim/datadir-test-mdb-ga-0 External provisioner is provisioning volume for claim "default/datadir-test-mdb-ga-0" 2m1s Normal ProvisioningSucceeded persistentvolumeclaim/datadir-test-mdb-ga-0 Successfully provisioned volume pvc-edaf1e77-9c24-4efb-aeb5-db68d80fd7c8

Warning FailedScheduling pod/test-mdb-ga-0 running "VolumeBinding" filter plugin for pod "test-mdb-ga-0": pod has unbound immediate PersistentVolumeClaims Warning FailedScheduling pod/test-mdb-ga-0 running "VolumeBinding" filter plugin for pod "test-mdb-ga-0": pod has unbound immediate PersistentVolumeClaims Normal Scheduled pod/test-mdb-ga-0 Successfully assigned default/test-mdb-ga-0 to kubem01 118s Normal Pulling pod/test-mdb-ga-0 Pulling image "busybox" 113s Normal Pulled pod/test-mdb-ga-0 Successfully pulled image "busybox" 113s Normal Created pod/test-mdb-ga-0 Created container mariadb-galera-prepare 112s Normal Started pod/test-mdb-ga-0 Started container mariadb-galera-prepare 111s Normal Pulled pod/test-mdb-ga-0 Container image "adfinissygroup/k8s-mariadb-galera-centos:v002" already present on machine 111s Normal Created pod/test-mdb-ga-0 Created container test-mdb-ga 111s Normal Started pod/test-mdb-ga-0 Started container test-mdb-ga 0s Warning Unhealthy pod/test-mdb-ga-0 Readiness probe failed: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory") 2m1s Normal SuccessfulCreate statefulset/test-mdb-ga create Claim datadir-test-mdb-ga-0 Pod test-mdb-ga-0 in StatefulSet test-mdb-ga success 2m1s Normal SuccessfulCreate statefulset/test-mdb-ga create Pod test-mdb-ga-0 in StatefulSet test-mdb-ga successful
tongpu commented 4 years ago

Two comments regarding that:

  1. This repository is not maintained anymore, because the container images that it is based on are no longer maintained, see adfinis-sygroup/openshift-mariadb-galera
  2. I guess the issue you're facing right now is that the socket can't be created, because your storage is on NFS and no socket files can be created there.