Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

MariaDB doesn't start #4

Closed
migoth opened this issue Jan 22, 2018 · 19 comments
Closed

MariaDB doesn't start #4

migoth opened this issue Jan 22, 2018 · 19 comments

Comments

@migoth
Copy link

migoth commented Jan 22, 2018

I tried to start the container via docker toolbox for windows.
However, I get the following error with MariaDB:

180122 7:41:23 [Note] mysqld (mysqld 10.0.33-MariaDB-1~jessie) starting as process 1 ...
180122 7:41:23 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
180122 7:41:23 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180122 7:41:23 [Note] InnoDB: The InnoDB memory heap is disabled
180122 7:41:23 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
180122 7:41:23 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
180122 7:41:23 [Note] InnoDB: Compressed tables use zlib 1.2.8
180122 7:41:23 [Note] InnoDB: Using Linux native AIO
180122 7:41:23 [Note] InnoDB: Using CPU crc32 instructions
180122 7:41:23 [Note] InnoDB: Initializing buffer pool, size = 256.0M
180122 7:41:23 [Note] InnoDB: Completed initialization of buffer pool
180122 7:41:23 [Warning] InnoDB: Failed to set O_DIRECT on file ./ibdata1: OPEN: Invalid argument, continuing anyway. O_DIRECT is known to result in 'Invalid argument' on Linux on tmpfs, see MySQL Bug#26662.
180122 7:41:23 [Note] InnoDB: Restoring page 0 of tablespace 0
180122 7:41:23 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
180122 7:41:23 [ERROR] InnoDB: space header page consists of zero bytes in data file ./ibdata1
180122 7:41:23 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
180122 7:41:23 [ERROR] Plugin 'InnoDB' init function returned error.
180122 7:41:23 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
180122 7:41:23 [Note] Plugin 'FEEDBACK' is disabled.
180122 7:41:23 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
180122 7:41:23 [ERROR] Unknown/unsupported storage engine: InnoDB
180122 7:41:23 [ERROR] Aborting
2018-01-22T07:41:23.558629686Z
180122 7:41:23 [Note] mysqld: Shutdown complete
2018-01-22T07:41:23.564745201Z

@migoth migoth changed the title MariaDB doesnt start MariaDB doesn't start Jan 22, 2018
@akhomy
Copy link
Owner

akhomy commented Jan 22, 2018

@migoth I'm not sure about Docker Toolkit for Windows, I tested it via Docker Toolbox and I recommend this in README, besides I could check this on the Docker Toolkit, but it will be near next 5-7 days.

@migoth
Copy link
Author

migoth commented Jan 22, 2018

@A-Kom Sry, i meant Docker Toolbox. And I proceeded to the README.

@akhomy
Copy link
Owner

akhomy commented Jan 22, 2018

@migoth, okay, I'll double check this today, could you add more info? Did you use last release of Docker Compose LAMP? Could you provide list of steps to reproduce issue?

@migoth
Copy link
Author

migoth commented Jan 22, 2018

@A-Kom I just downloaded the last release of docker-compose-lamp and proceeded to the README.
Im using Windows 10 Pro.

@akhomy
Copy link
Owner

akhomy commented Jan 22, 2018

@migoth, okay, will check this today in 6 hours, seems this error isn't related to Docker Compose LAMP, besides as a fast solution you could change image: mariadb:10.0 to image: mysql inside docker-compose.yml.

@migoth
Copy link
Author

migoth commented Jan 22, 2018

When I change the image to mysql I get the following error:

Initializing database
2018-01-22T11:05:08.370341Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-01-22T11:05:08.396820Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2018-01-22T11:05:09.385622Z 0 [ERROR] InnoDB: Operating system error number 22 in a file operation.
2018-01-22T11:05:09.385751Z 0 [ERROR] InnoDB: Error number 22 means 'Invalid argument'
2018-01-22T11:05:09.385802Z 0 [ERROR] InnoDB: File ./ib_logfile101: 'aio write' returned OS error 122. Cannot continue operation
2018-01-22T11:05:09.385832Z 0 [ERROR] InnoDB: Cannot continue operation.

@akhomy
Copy link
Owner

akhomy commented Jan 22, 2018

@migoth, so this apply after you run docker-compose up -d?

@migoth
Copy link
Author

migoth commented Jan 22, 2018

Yes. Or docker-compose up -d --force-recreate

@akhomy
Copy link
Owner

akhomy commented Jan 22, 2018

@migoth, pls run:

  1. docker-compose stop && docker-compose rm -f
  2. Remove folder docker/runtime/mysql
  3. Run docker-compose up -d
    I'm not sure if this help in this case, but you'll recreate from scratch and run on clean docker containers.
    Also, I'll check this on Windows today later.

@migoth
Copy link
Author

migoth commented Jan 22, 2018

@A-Kom Unfortunately, I have already tried that. Does not bring anything

@akhomy
Copy link
Owner

akhomy commented Jan 22, 2018

@migoth, currently, I checked this on Linux and all works fine. Wait for my reply today about Windows.

@migoth
Copy link
Author

migoth commented Jan 22, 2018

Yes, everything is running in Linux. Unfortunately not on Windows.

@akhomy akhomy self-assigned this Jan 22, 2018
@migoth
Copy link
Author

migoth commented Jan 22, 2018

I got a db server up and running.
I downloaded mysql:8.0.

My changes in docker-compose.yml

mysql:
build: docker/images/mysql/
#image: mysql
volumes:
- "./.data/db:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: simplitec
MYSQL_PASSWORD: 123
MYSQL_DATABASE: simplitec
# command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci # The simple way to override the mariadb config.
networks:
- internal

and i added innodb_use_native_aio=0 to the docker.cnf of mysql.

@akhomy
Copy link
Owner

akhomy commented Jan 22, 2018

@migoth, could you provide the original docker-compose.yml file that use and that caused the issue? I want to clarify it and check in case to reproduce and understand issue.

@migoth
Copy link
Author

migoth commented Jan 22, 2018

docker-compose.txt

@akhomy
Copy link
Owner

akhomy commented Jan 22, 2018

@migoth, thank you.

@akhomy
Copy link
Owner

akhomy commented Jan 22, 2018

@migoth I'm not sure about the problem, I'll try to check it on the Virtual Box with the fresh install, but on my home Windows (Windows 10 PRO) it works fine, I installed successfully the last version of Drupal. Seems, it is related to your system or installation of the Docker Toolbox.

@akhomy
Copy link
Owner

akhomy commented Apr 5, 2018

@migoth, could you provide the example of the docker build file for mysql?

@akhomy akhomy reopened this Apr 5, 2018
@akhomy
Copy link
Owner

akhomy commented Apr 5, 2018

After all. If you want to archive your project on Linux and extract to use on Windows with Docker Toolbox just remove ibdata and ib_logfile* files in your MySQL data directory. Uncomment in docker-compose.yml section # build: docker/images/mysql/. and remove section image: mysql. Then run a command:
docker-compose stop && docker-compose rm -f && docker-compose up --build -d
To verify MySQL container work run a command:
docker-compose ps.

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

No branches or pull requests

2 participants