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

mysql not running #164

Closed
asimzeeshan opened this issue Oct 14, 2018 · 3 comments
Closed

mysql not running #164

asimzeeshan opened this issue Oct 14, 2018 · 3 comments

Comments

@asimzeeshan
Copy link

After running docker-compose, mysql isn't working

root@surveil:/home/icinga2# docker-compose ps
      Name                    Command             State                                            Ports                                          
-------------------------------------------------------------------------------------------------------------------------------------------------
graphite            /sbin/my_init                 Up       2003/tcp, 2004/tcp, 2023/tcp, 2024/tcp, 80/tcp, 8080/tcp, 8125/tcp, 8125/udp, 8126/tcp 
icinga2_icinga2_1   /opt/run                      Up       0.0.0.0:443->443/tcp, 0.0.0.0:5665->5665/tcp, 0.0.0.0:80->80/tcp                       
icinga2_mysql_1     docker-entrypoint.sh mysqld   Exit 1

The logs show this

root@surveil:/home/icinga2# docker-compose logs mysql
Attaching to icinga2_mysql_1
mysql_1     | Initializing database
mysql_1     | 2018-10-14 20:59:55 140128509851648 [Note] /usr/sbin/mysqld (mysqld 10.1.36-MariaDB-1~bionic) starting as process 62 ...
mysql_1     | 2018-10-14 20:59:55 140128509851648 [Note] InnoDB: Using mutexes to ref count buffer pool pages
mysql_1     | 2018-10-14 20:59:55 140128509851648 [Note] InnoDB: The InnoDB memory heap is disabled
mysql_1     | 2018-10-14 20:59:55 140128509851648 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1     | 2018-10-14 20:59:55 140128509851648 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1     | 2018-10-14 20:59:55 140128509851648 [Note] InnoDB: Compressed tables use zlib 1.2.11
mysql_1     | 2018-10-14 20:59:55 140128509851648 [Note] InnoDB: Using Linux native AIO
mysql_1     | 2018-10-14 20:59:55 140128509851648 [Note] InnoDB: Using SSE crc32 instructions
mysql_1     | 2018-10-14 20:59:55 140128509851648 [Note] InnoDB: Initializing buffer pool, size = 256.0M
mysql_1     | InnoDB: mmap(281149440 bytes) failed; errno 12
mysql_1     | 2018-10-14 20:59:55 140128509851648 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
mysql_1     | 2018-10-14 20:59:55 140128509851648 [ERROR] Plugin 'InnoDB' init function returned error.
mysql_1     | 2018-10-14 20:59:55 140128509851648 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
mysql_1     | 2018-10-14 20:59:55 140128509851648 [ERROR] Unknown/unsupported storage engine: InnoDB
mysql_1     | 2018-10-14 20:59:55 140128509851648 [ERROR] Aborting
mysql_1     | 
mysql_1     | 
mysql_1     | Installation of system tables failed!  Examine the logs in
mysql_1     | /var/lib/mysql/ for more information.
mysql_1     | 
mysql_1     | The problem could be conflicting information in an external
mysql_1     | my.cnf files. You can ignore these by doing:
mysql_1     | 
mysql_1     |     shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
mysql_1     | 
mysql_1     | You can also try to start the mysqld daemon with:
mysql_1     | 
mysql_1     |     shell> /usr/sbin/mysqld --skip-grant-tables --general-log &
mysql_1     | 
mysql_1     | and use the command line tool /usr/bin/mysql
mysql_1     | to connect to the mysql database and look at the grant tables:
mysql_1     | 
mysql_1     |     shell> /usr/bin/mysql -u root mysql
mysql_1     |     mysql> show tables;
mysql_1     | 
mysql_1     | Try 'mysqld --help' if you have problems with paths.  Using
mysql_1     | --general-log gives you a log in /var/lib/mysql/ that may be helpful.
mysql_1     | 
mysql_1     | The latest information about mysql_install_db is available at
mysql_1     | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
mysql_1     | You can find the latest source at https://downloads.mariadb.org and
mysql_1     | the maria-discuss email list at https://launchpad.net/~maria-discuss
mysql_1     | 
mysql_1     | Please check all of the above before submitting a bug report
mysql_1     | at http://mariadb.org/jira
mysql_1     |

I can't login to the mysql container since its not up

root@surveil:/home/icinga2# docker exec -it icinga2_mysql_1 bash
Error response from daemon: Container c3fcd9fc43e6798a17f90bb885922e473247865b9e56cb265d090964c296a02f is not running

Can you help me here?

@bebehei
Copy link
Contributor

bebehei commented Oct 14, 2018

Sorry, no. I'm not willing to debug your MariaDB problems. I neither know the cause of the problem. You have to understand this by yourself.

@asimzeeshan
Copy link
Author

Thanks @bebehei for the reply

Unfortunately, I just cloned the repo and did a docker-compose up -d and this came up and I have no clue what went wrong

@asimzeeshan
Copy link
Author

Got it working, just replaced the mariadb:10.1 with mariadb (to pull latest image) and added a restart: always tag.

  mysql:
    image: mariadb
    restart: always

Working now

@bebehei bebehei closed this as completed Oct 16, 2018
jjethwa added a commit that referenced this issue Dec 6, 2019
Fix #164 (mysql initialization error)
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

2 participants