Coder Social home page Coder Social logo

mattlord / docker-innodb-cluster Goto Github PK

View Code? Open in Web Editor NEW
58.0 58.0 34.0 99 KB

This is an unofficial container for testing InnoDB clusters. This is for experimental and testing purposes only!

License: GNU General Public License v2.0

Shell 93.23% Batchfile 6.77%

docker-innodb-cluster's People

Contributors

datacharmer avatar denismakogon avatar mattlord avatar philip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-innodb-cluster's Issues

Make GROUP_NAME validation more strict

Following command would not fail

docker run --name=mysqlgr1 --hostname=mysqlgr1 --network=grnet -e MYSQL_ROOT_PASSWORD=root -e BOOTSTRAP=1 -e GROUP_NAME="test" -itd mattalord/innodb-cluster

But GROUP_NAME must be UUID4 only. Non-empty string doesn't fail boostrap, but should be.

Cluster fails to start normally after shutdown

docker-compose file for cluster:

version: '3'
services:

  mysql-initiator:
    image: "mattalord/innodb-cluster"
    restart: always
    environment:
      - "MYSQL_DATABASE=funcs"
      - "MYSQL_ROOT_PASSWORD=root"
      - "GROUP_NAME=C55153C1-1574-4972-BF06-7332D6AD46A7"
      - "BOOTSTRAP=1"
    volumes:
      - ./data/mysql-initiator:/var/lib/mysql
  mysql-2:
    image: "mattalord/innodb-cluster"
    restart: always
    environment:
      - "MYSQL_DATABASE=funcs"
      - "MYSQL_ROOT_PASSWORD=root"
      - "GROUP_NAME=C55153C1-1574-4972-BF06-7332D6AD46A7"
      - "GROUP_SEEDS=mysql-initiator:6606"
    volumes:
      - ./data/mysql-member-2:/var/lib/mysql
    depends_on:
      - mysql-initiator
  mysql-3:
    image: "mattalord/innodb-cluster"
    restart: always
    environment:
      - "MYSQL_DATABASE=funcs"
      - "MYSQL_ROOT_PASSWORD=root"
      - "GROUP_NAME=C55153C1-1574-4972-BF06-7332D6AD46A7"
      - "GROUP_SEEDS=mysql-initiator:6606"
    volumes:
      - ./data/mysql-member-3:/var/lib/mysql
    depends_on:
      - mysql-initiator
  router:
    image: "mattalord/innodb-cluster"
    restart: always
    ports:
      - "3306:3306"
      - "6446-6447:6446-6447"
      - "6606:6606"
      - "33060:33060"
    volumes:
      - ./data/mysql-router:/var/lib/mysqlrouter
      - ./data/mysql-router-data:/var/lib/mysql
    depends_on:
      - mysql-initiator
      - mysql-2
      - mysql-3
    environment:
      - "NODE_TYPE=router"
      - "MYSQL_ROOT_PASSWORD=root"
      - "MYSQL_HOST=mysql-initiator"

Initial provisioning works fine, but when deployment gets suspended or restarted. Cluster provisioning fails.

child node not joining the cluster

After running compose file child nodes are not joining the cluster. child nodes are staying in starting stage for long time and restarting.

Log showing:

inno_mysql-2.1.u9eabv1l8sqm@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606,mysql-2:6606,mysql-3:6606 as seeds
inno_mysql-2.1.u9eabv1l8sqm@node2 | Initializing database
inno_mysql-2.1.u9eabv1l8sqm@node2 | Database initialized
inno_mysql-2.1.u9eabv1l8sqm@node2 | MySQL init process in progress...
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Note (Code 1008): Can't drop database 'test'; database doesn't exist
inno_mysql-2.1.u9eabv1l8sqm@node2 |
inno_mysql-2.1.u9eabv1l8sqm@node2 | /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
inno_mysql-2.1.u9eabv1l8sqm@node2 |
inno_mysql-2.1.u9eabv1l8sqm@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.u9eabv1l8sqm@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Note (Code 1759): Sending passwords in plain text without SSL/TLS is extremely insecure.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Note (Code 1760): Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
inno_mysql-2.1.u9eabv1l8sqm@node2 |
inno_mysql-2.1.u9eabv1l8sqm@node2 | MySQL init process done. Ready for start up.
inno_mysql-2.1.u9eabv1l8sqm@node2 |
inno_mysql-2.1.vt7ebm1wknni@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606 as seeds
inno_mysql-2.1.vt7ebm1wknni@node2 | Initializing database
inno_mysql-2.1.vt7ebm1wknni@node2 | Database initialized
inno_mysql-2.1.vt7ebm1wknni@node2 | MySQL init process in progress...
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Note (Code 1008): Can't drop database 'test'; database doesn't exist
inno_mysql-2.1.vt7ebm1wknni@node2 |
inno_mysql-2.1.vt7ebm1wknni@node2 | /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
inno_mysql-2.1.vt7ebm1wknni@node2 |
inno_mysql-2.1.vt7ebm1wknni@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.vt7ebm1wknni@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.vt7ebm1wknni@node2 | Note (Code 1759): Sending passwords in plain text without SSL/TLS is extremely insecure.
inno_mysql-2.1.vt7ebm1wknni@node2 | Note (Code 1760): Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
inno_mysql-2.1.vt7ebm1wknni@node2 |
inno_mysql-2.1.vt7ebm1wknni@node2 | MySQL init process done. Ready for start up.
inno_mysql-2.1.vt7ebm1wknni@node2 |
inno_mysql-2.1.3cpv7igk0vnk@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606,mysql-2:6606,mysql-3:6606 as seeds
inno_mysql-2.1.3cpv7igk0vnk@node2 | Initializing database
inno_mysql-2.1.3cpv7igk0vnk@node2 | Database initialized
inno_mysql-2.1.3cpv7igk0vnk@node2 | MySQL init process in progress...
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Note (Code 1008): Can't drop database 'test'; database doesn't exist
inno_mysql-2.1.3cpv7igk0vnk@node2 |
inno_mysql-2.1.3cpv7igk0vnk@node2 | /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
inno_mysql-2.1.3cpv7igk0vnk@node2 |
inno_mysql-2.1.3cpv7igk0vnk@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.3cpv7igk0vnk@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Note (Code 1759): Sending passwords in plain text without SSL/TLS is extremely insecure.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Note (Code 1760): Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
inno_mysql-2.1.3cpv7igk0vnk@node2 |
inno_mysql-2.1.3cpv7igk0vnk@node2 | MySQL init process done. Ready for start up.
inno_mysql-2.1.3cpv7igk0vnk@node2 |
inno_mysql-2.1.ub63qcvutmo3@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606,mysql-2:6606,mysql-3:6606 as seeds
inno_mysql-2.1.ub63qcvutmo3@node2 | Initializing database
inno_mysql-2.1.7qd7vz1mrj8q@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606 as seeds
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Initializing database
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Database initialized
inno_mysql-2.1.7qd7vz1mrj8q@node2 | MySQL init process in progress...
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Note (Code 1008): Can't drop database 'test'; database doesn't exist
inno_mysql-2.1.7qd7vz1mrj8q@node2 |
inno_mysql-2.1.7qd7vz1mrj8q@node2 | /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
inno_mysql-2.1.7qd7vz1mrj8q@node2 |
inno_mysql-2.1.7qd7vz1mrj8q@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Note (Code 1759): Sending passwords in plain text without SSL/TLS is extremely insecure.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Note (Code 1760): Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
inno_mysql-2.1.7qd7vz1mrj8q@node2 |
inno_mysql-2.1.7qd7vz1mrj8q@node2 | MySQL init process done. Ready for start up.
inno_mysql-2.1.7qd7vz1mrj8q@node2 |

after few minutes we losing connection

all is in the title i don't understand i have no log in my container

this is what i seen in my pma

mysqli::real_connect(): (HY000/2003): Can't connect to remote MySQL server for client '0.0.0.0:6446'

Small bug in setup_cluster.bat file, with port mapping

Hi Mattlord,

In the file setup_cluster.bat when you run the containers you are mapping the external port 339X (where X = 1, 2 and 3) to the same number, when it should be mapped to port 3306 inside the container.

For example, in line 7 we can see:
docker run --rm --name=mysqlgr1 --hostname=mysqlgr1 --network=grnet -p 3391:3391 -e MYSQL_ROOT_PASSWORD=root -e BOOTSTRAP=1 -e GROUP_NAME="92bb4382-3bd1-11e7-a919-92ebcb67fe33" -itd mattalord/innodb-cluster

i.e.
-p 3391:3391

where it should be
-p 3391:3306

to my humble opinion.

The same would apply to lines 11 and 15.

Not sure if this small mistake happened also in other files, as I am testing it just on windows.

Thank you for this great bed to test and play with innoDB cluster.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.