Open tomas-pritrsky opened 2 years ago
/retitle Problem following tutorial Run a Replicated Stateful Application
@tomaspritrsky Could you please share error logs you are getting in init containers
I encountered the same issue following the tutorial. Here is my output for kubectl logs pod/mysql-1 clone-mysql
+ [[ -d /var/lib/mysql/mysql ]]
++ hostname
+ [[ mysql-1 =~ -([0-9]+)$ ]]
+ ordinal=1
+ [[ 1 -eq 0 ]]
+ ncat --recv-only mysql-0.mysql 3307
+ xbstream -x -C /var/lib/mysql
+ xtrabackup --prepare --target-dir=/var/lib/mysql
xtrabackup version 2.4.4 based on MySQL server 5.7.13 Linux (x86_64) (revision id: df58cf2)
xtrabackup: cd to /var/lib/mysql
xtrabackup: Error: cannot open ./xtrabackup_checkpoints
xtrabackup: error: xtrabackup_read_metadata()
xtrabackup: This target seems not to have correct metadata...
InnoDB: Number of pools: 1
InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: Warning: cannot open ./xtrabackup_logfile. will try to find.
InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: Fatal error: cannot find ./xtrabackup_logfile.
xtrabackup: Error: xtrabackup_init_temp_log() failed.
kubectl logs pod/mysql-1 init-mysql
shows the following.
++ hostname
+ [[ mysql-1 =~ -([0-9]+)$ ]]
+ ordinal=1
+ echo '[mysqld]'
+ echo server-id=101
+ [[ 1 -eq 0 ]]
+ cp /mnt/config-map/replica.cnf /mnt/conf.d/
yes, I have the same error as @LukasBommes
Hi Team, I could also confirm that I have the same error while following the tutorial, seems the doc needs some update.
I had the same problem too, but I modified 'mysql-configmap.yaml` file below and solved it. @LukasBommes @tomaspritrsky
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql
labels:
app: mysql
data:
primary.cnf: |
# Apply this config only on the primary.
[mysqld]
log-bin
# datadir=/var/lib/mysql/mysql
replica.cnf: |
# Apply this config only on replicas.
[mysqld]
super-read-only
# datadir=/var/lib/mysql/mysql
Thanks @tomaspritrsky @ProtoSeo
/triage accepted /kind bug /priority important-longterm
Priority because a bug in this page blocks people learning about using Kubernetes to persist data, and that's a key thing for folks to want to learn.
/assign
/unassign
I'm having a same issue on this part of the tutorial. xtrabackup: Error: xtrabackup_init_temp_log() failed.
I thought the problem was that mysql
and gcr.io/google-samples/xtrabackup:1.0
were not compatible anymore, so the commands were not executable.
I tried image version change & command change but I'm getting different errors :(
Any help??
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
Following this https://v1-24.docs.kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/#simulate-pod-and-node-downtime example and the readiness probe fails but the pod keeps running. Can anyone fix the doc or suggest a work-around?
Update - Changing the command for introducing failure as below worked for me.
Change kubectl exec mysql-2 -c mysql -- mv /usr/bin/mysql /usr/bin/mysql.off
to kubectl -n workshop exec mysql-2 -c mysql -- sh -c 'echo "#!/bin/sh" >> /mysql;echo "exit 1" >> /mysql;chmod +x /mysql;cp /usr/bin/mysql /usr/bin/mysql.off;cp /mysql /usr/bin/mysql;'
Thanks.
/remove-lifecycle stale
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
/triage accepted
(org members only)/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
This tutorial is wrong, the replicas fail on Error. Applying the mysql-statefulset.yaml I see only mysql-0 running - mysql-1 fails on Init:Error
I have the same issue , please did you resolve the issue ?
This tutorial is wrong, the replicas fail on Error. Applying the mysql-statefulset.yaml I see only mysql-0 running - mysql-1 fails on Init:Error
fails here : https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/#:~:text=kubectl%20apply%20%2Df%20https%3A//k8s.io/examples/application/mysql/mysql%2Dstatefulset.yaml