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

docker container aborts after creation #386

Closed
devfever opened this issue Feb 28, 2018 · 3 comments
Closed

docker container aborts after creation #386

devfever opened this issue Feb 28, 2018 · 3 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@devfever
Copy link

I am using this command to run docker container
docker container run -d -p 3306:3306 --name db -e MYSQL_RANDOM_ROOT_PASSWORD=yes mysql

Initializing database
2018-02-28T17:19:05.141541Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2018-02-28T17:19:05.141735Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2018-02-28T17:19:05.142179Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-02-28T17:19:05.147596Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2018-02-28T17:19:05.147677Z 0 [ERROR] Aborting
@yosifkit
Copy link
Member

I am unable to reproduce. Perhaps the warnings about max_open_files or table_open_cache are important? What are you running this on? (docker info, docker version) The curious part to me is that it is fails on the database directory being non-empty, but there is no volume specified so it has to be empty.

$ docker container run -d -p 3306:3306 --name db -e MYSQL_RANDOM_ROOT_PASSWORD=yes mysql
a23d248cf9151f1c73a471091f33b242a7b1fcc5510d56095d0f357e46abf6a3
$ docker logs --follow db
Initializing database
2018-02-28T19:04:35.290495Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-02-28T19:04:35.607238Z 0 [Warning] InnoDB: New log files created, LSN=45790
2018-02-28T19:04:35.676993Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2018-02-28T19:04:35.684060Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 379583b8-1cba-11e8-82f3-0242ac110002.
2018-02-28T19:04:35.684944Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-02-28T19:04:35.685346Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2018-02-28T19:04:36.048296Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2018-02-28T19:04:36.048311Z 1 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-02-28T19:04:36.048315Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-02-28T19:04:36.048321Z 1 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-02-28T19:04:36.048323Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-02-28T19:04:36.048328Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2018-02-28T19:04:36.048343Z 1 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-02-28T19:04:36.048348Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
Database initialized
...

@theterran
Copy link

@devfever This looks like the same error I encountered ([ERROR] --initialize specified but the data directory has files in it. Aborting.). Check the container path specified for your volume. See my comment on #69 for details.

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Apr 25, 2018
@wglambert
Copy link

Since this issue appears to be environmental and not an issue in the image I'm going to close

If any further developments would show some issue with the image I'll re-open the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

4 participants