Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nacosdb-mysql does not want to start: Can't change data directory owner to mysql #262

Open
damorosodaragona opened this issue Mar 7, 2023 · 5 comments

Comments

@damorosodaragona
Copy link

I'm not able to deploy the system.
I created a cluaster using minikube, installed correctly openebs but when i try to deploy the system the nacos-mysql pod does not start (CrashLoopBackOff).
Inspecting the log i found this error:

Screenshot 2023-03-07 at 18 19 27

I think that the problem is that the mysql database is listening on the host network and is not accessible from the container.
Infect mysql is on [public_ip]:3306 and not on localhost:3306.
Screenshot 2023-03-07 at 18 20 13

How can i fix this?

@damorosodaragona
Copy link
Author

damorosodaragona commented Mar 11, 2023

I inspected more in detail the issue: the problem is that the mysql container is not able to start due the error: "Can't change data directory owner to mysql".
There was an instance of mysql already running on the server, so i deleted it (with --purge command to delete also all the data), i deleted all the dirs and libs, but i got the same errors.
In /var/lib now there is no mysql data folder.

@damorosodaragona damorosodaragona changed the title nacosdb-mysql does not want to start nacosdb-mysql does not want to start: Can't change data directory owner to mysql Mar 11, 2023
@Deep-Yellow
Copy link

Presumably this problem is caused by minikube, you can verify this by deploying nacos separately before deploying TrainTicket.

Besides, to deploy TrainTicket on single machine is likely to cause insufficient resources, maybe you can try to build cluster with multiple nodes.

@MaartenBaeten1207
Copy link

Have the same issue with using Kind (5 nodes)

@Deep-Yellow
Copy link

Try changing SELINUX=enforcing to SELINUX=disabled .
The complete deployment process can be found at https://ttdoc.oss-cn-hongkong.aliyuncs.com/Steps.pdf

@damorosodaragona
Copy link
Author

damorosodaragona commented Mar 14, 2023

SELINUX is not enabled in my Linux machine.

Yes, I’m following exactly that guide, but seems to be incomplete to me.
For example I tried to use kind instead of minikube, but after the creation of the first 3 pods, the initizialization of the statefulset got an error,because there were 2 different “default” storage, so when I patch the openebs-hostpath to set it as the default one I have also to patch the standard storage to remove the default label from it.
So I stopped the deploy, I reset it, I deleted the cluster, but when I retried again to deploy the system MySQL was not able to start due the aforementioned error.
it is possible that some folders are created somewhere and I have to delete it before retry to start the deploy?
The “/var/lib/mysql”, /“var/log/mysql”, and “/etc/mysql” folder does not exist.
I have to check somewhere else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants