-
Notifications
You must be signed in to change notification settings - Fork 442
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
cannot create directory when starting container (docker swarm with infinit) #146
Comments
Does |
It is a directory and it is empty
|
That's definitely strange -- I can't reproduce: 😕 $ mkdir test
$ docker run -it --rm -v "$PWD/test":/var/lib/mysql --name mariadb -e MYSQL_ROOT_PASSWORD=xxxxxxxxx mariadb:10.3
Unable to find image 'mariadb:10.3' locally
10.3: Pulling from library/mariadb
f49cf87b52c1: Already exists
78032de49d65: Already exists
84229c396ea3: Already exists
c992bbf20f4e: Already exists
380e932be3aa: Already exists
8003c6d68fcd: Already exists
603f60c36160: Already exists
d5ed6a0d4e40: Pull complete
c4dbcc87cd0d: Pull complete
d1fa9c901568: Pull complete
e857d9abcbb9: Pull complete
Digest: sha256:5feb530514e4cfd0d3a9a8e4623b198f0d5569d11fb974631c50d94157073ea0
Status: Downloaded newer image for mariadb:10.3
Initializing database
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 http://mariadb.com/kb or the
MySQL manual for more instructions.
Please report any problems at http://mariadb.org/jira
The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
Database initialized
MySQL init process in progress...
2018-01-04 0:44:01 0 [Note] mysqld (mysqld 10.3.3-MariaDB-10.3.3+maria~jessie) starting as process 101 ...
2018-01-04 0:44:01 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-01-04 0:44:01 0 [Note] InnoDB: Uses event mutexes
2018-01-04 0:44:01 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-01-04 0:44:01 0 [Note] InnoDB: Using Linux native AIO
2018-01-04 0:44:01 0 [Note] InnoDB: Number of pools: 1
2018-01-04 0:44:01 0 [Note] InnoDB: Using SSE2 crc32 instructions
2018-01-04 0:44:01 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2018-01-04 0:44:01 0 [Note] InnoDB: Completed initialization of buffer pool
2018-01-04 0:44:01 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-01-04 0:44:01 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-01-04 0:44:01 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-01-04 0:44:01 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-01-04 0:44:01 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-01-04 0:44:01 0 [Note] InnoDB: Waiting for purge to start
2018-01-04 0:44:02 0 [Note] InnoDB: 5.7.20 started; log sequence number 1622809
2018-01-04 0:44:02 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-01-04 0:44:02 0 [Note] Plugin 'FEEDBACK' is disabled.
2018-01-04 0:44:02 0 [Note] InnoDB: Buffer pool(s) load completed at 180104 0:44:02
2018-01-04 0:44:02 0 [Warning] 'user' entry 'root@4b72b94c1e2f' ignored in --skip-name-resolve mode.
2018-01-04 0:44:02 0 [Warning] 'proxies_priv' entry '@% root@4b72b94c1e2f' ignored in --skip-name-resolve mode.
2018-01-04 0:44:02 0 [Note] Reading of all Master_info entries succeded
2018-01-04 0:44:02 0 [Note] Added new Master_info '' to hash table
2018-01-04 0:44:02 0 [Note] mysqld: ready for connections.
Version: '10.3.3-MariaDB-10.3.3+maria~jessie' socket: '/var/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
2018-01-04 0:44:03 10 [Warning] 'proxies_priv' entry '@% root@4b72b94c1e2f' ignored in --skip-name-resolve mode.
2018-01-04 0:44:03 0 [Note] mysqld (unknown): Normal shutdown
2018-01-04 0:44:03 0 [Note] Event Scheduler: Purging the queue. 0 events
2018-01-04 0:44:03 0 [Note] InnoDB: FTS optimize thread exiting.
2018-01-04 0:44:03 0 [Note] InnoDB: Starting shutdown...
2018-01-04 0:44:03 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2018-01-04 0:44:03 0 [Note] InnoDB: Buffer pool(s) dump completed at 180104 0:44:03
2018-01-04 0:44:04 0 [Note] InnoDB: Shutdown completed; log sequence number 1622828
2018-01-04 0:44:04 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-01-04 0:44:04 0 [Note] mysqld: Shutdown complete
MySQL init process done. Ready for start up.
2018-01-04 0:44:04 0 [Note] mysqld (mysqld 10.3.3-MariaDB-10.3.3+maria~jessie) starting as process 1 ...
2018-01-04 0:44:04 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-01-04 0:44:04 0 [Note] InnoDB: Uses event mutexes
2018-01-04 0:44:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-01-04 0:44:04 0 [Note] InnoDB: Using Linux native AIO
2018-01-04 0:44:04 0 [Note] InnoDB: Number of pools: 1
2018-01-04 0:44:04 0 [Note] InnoDB: Using SSE2 crc32 instructions
2018-01-04 0:44:04 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2018-01-04 0:44:04 0 [Note] InnoDB: Completed initialization of buffer pool
2018-01-04 0:44:04 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-01-04 0:44:04 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-01-04 0:44:04 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-01-04 0:44:04 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-01-04 0:44:04 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-01-04 0:44:04 0 [Note] InnoDB: 5.7.20 started; log sequence number 1622828
2018-01-04 0:44:04 0 [Note] Plugin 'FEEDBACK' is disabled.
2018-01-04 0:44:04 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-01-04 0:44:04 0 [Note] InnoDB: Buffer pool(s) load completed at 180104 0:44:04
2018-01-04 0:44:04 0 [Note] Server socket created on IP: '::'.
2018-01-04 0:44:04 0 [Warning] 'proxies_priv' entry '@% root@4b72b94c1e2f' ignored in --skip-name-resolve mode.
2018-01-04 0:44:04 0 [Note] Reading of all Master_info entries succeded
2018-01-04 0:44:04 0 [Note] Added new Master_info '' to hash table
2018-01-04 0:44:04 0 [Note] mysqld: ready for connections.
Version: '10.3.3-MariaDB-10.3.3+maria~jessie' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution |
repeated what you did:
|
Ok, what type of filesystem is running on Where'd you get your Docker install from? Any AppArmor or SELinux installed on your host? |
(Also, the amount of people seeing your request for help would probably be higher if this were posted in the Docker Community Forums, the Docker Community Slack, or Stack Overflow instead.) |
This is a infinit storage cluster using FUSE:
running on Ubuntu 16.04. i don't know if there is any apparmor or selinux on it by default. i have not installed it |
Oh, then I imagine this is probably a quirk of their FUSE implementation, and I'd recommend taking this up with the infinit folks to see if they can help figure out what's going on. Sorry! (Closing, since I can't reproduce, so I don't think this is a problem with the image.) |
I have found the issue. it is because FUSE don't allow to set different user for filesystem (chown). Is there any way to run mariadb container with different user (root)? |
Yep, see #59. To run as |
thx, I have managed to get arround this with using this infinit command option when mounting the FUSE volume: |
Hi,
when i want to run with host volume mounted i get this error message:
mariadb.1.5gzuua4no8v6@cl01-n03 | mkdir: cannot create directory '/var/lib/mysql/': File exists
any idea what may be the issue? After this error the container crashes directly.
Running service with:
docker service create \ --mount type=bind,source=/storage/docker1/mariadb/mariadbdata,target=/var/lib/mysql \ --name mariadb \ --network internal \ --replicas 1 \ -e MYSQL_ROOT_PASSWORD=xxxxxxxxx \ mariadb:10.3.2
The text was updated successfully, but these errors were encountered: