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

Mariadb doesn't start the mysql server in docker #433

Closed
DARKBOW923 opened this issue May 21, 2022 · 5 comments
Closed

Mariadb doesn't start the mysql server in docker #433

DARKBOW923 opened this issue May 21, 2022 · 5 comments
Labels
need feedback Need feedback from user.

Comments

@DARKBOW923
Copy link

Hello guys,

Basically i made a docker-compose.yml:

`version: "3.9"
services:
mariadb:
image: mariadb:latest
deploy:
placement:
constraints: [node.role == worker]
replicas: 1
tty: true
ports:
- 3333:3306
networks:
- red_mariadb
volumes:
- volumen1234:/var/lib/mysql/
environment:
- MARIADB_ROOT_PASSWORD=smx
- MARIADB_USER=smx

volumes:
volumen1234:
driver: local
driver_opts:
type: "nfs"
o: "addr=192.168.56.25,rw,vers=3"
device: ":/export/mariadb"

networks:
red_mariadb:
external: true`
As you can see, the docker is correct, however when i try to enter mysql it says the following error:

ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)

And if i look at the logs, i see this error:

2022-05-21 17:44:53 0 [ERROR] mariadbd: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 37. Will retry for 30 seconds

Any help? I'm using mariadb official image for docker.

@grooverdan
Copy link
Member

this error, almost always, is another mariadb container running on the same volume.

@DARKBOW923
Copy link
Author

this error, almost always, is another mariadb container running on the same volume.

Its not, i just have only a mariadb container.

@grooverdan
Copy link
Member

$ podman run --rm mariadb perror 37
OS error code  37:  No locks available

So its looking more like your nfs storage doesn't have a locking service running or its somehow disabled. There's currently no mariadb option to skip the locking on Aria control files.

@grooverdan grooverdan added the need feedback Need feedback from user. label May 31, 2022
@masiton
Copy link

masiton commented Feb 18, 2023

Why is this closed? I'm encountering the same thing, there is no workaround?

@grooverdan
Copy link
Member

please provide details of a the environment which it occurs along with container logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need feedback Need feedback from user.
Development

No branches or pull requests

3 participants