paulczar / docker-percona_galera

replicating mysql docker image
https://registry.hub.docker.com/u/paulczar/percona-galera/
Other
87 stars 30 forks source link

Stuck at elections #7

Open EtienneBruines opened 9 years ago

EtienneBruines commented 9 years ago

Hi,

First-off: the dockerfile looks very promising, thank you for your effort.

Now, when using this command (below) to start the image at three servers (5-10 seconds apart), The elections don't go as planned.

docker run -d --name mysql -e HOST=$COREOS_PRIVATE_IPV4 -e MYSQL_USER=admin -e MYSQL_PASS=admin -e CLUSTER=galera -P paulczar/percona-galera

The first server:

2015-06-24T17:31:44Z 85c0976bdbfc confd[72]: ERROR exit status 1
echo ==> database: waiting for confd to write initial templates...
==> An empty or uninitialized database is detected in /var/lib/mysql
-----> Creating database...
-----> Done!
==> starting mysql in order to set up passwords
-----> sleeping for 20 seconds, then testing if DB is up
150624 17:31:58 mysqld_safe Logging to '/var/log/mysql/error.log'.
150624 17:31:58 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150624 17:31:58 mysqld_safe Skipping wsrep-recover for empty datadir: /var/lib/mysql
150624 17:31:58 mysqld_safe Assigning 00000000-0000-0000-0000-000000000000:-1 to wsrep_start_position
==> stopping mysql after setting up passwords
150624 17:32:21 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Starting MySQL for reals
==> Performing Election...
-----> Hurruh I win!
==> sleeping for 20 seconds, then testing if DB is up.
150624 17:32:23 mysqld_safe Logging to '/var/log/mysql/error.log'.
150624 17:32:23 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150624 17:32:23 mysqld_safe Skipping wsrep-recover for ea8c9e41-1a96-11e5-9660-4283726c59af:0 pair
150624 17:32:23 mysqld_safe Assigning ea8c9e41-1a96-11e5-9660-4283726c59af:0 to wsrep_start_position
==> database running...
2015-06-24 17:32:23 2061 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.20-68.0-56-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Percona XtraDB Cluster (GPL), Release 25.7, wsrep_25.7.r4126
2015-06-24 17:32:23 2061 [Note] WSREP: inited wsrep sidno 2
2015-06-24 17:32:23 2061 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2015-06-24 17:32:23 2061 [Note] WSREP: REPL Protocols: 6 (3, 2)
2015-06-24 17:32:23 2061 [Note] WSREP: Service thread queue flushed.
2015-06-24 17:32:23 2061 [Note] WSREP: Assign initial position for certification: 0, protocol version: 3
2015-06-24 17:32:23 2061 [Note] WSREP: Service thread queue flushed.
2015-06-24 17:32:23 2061 [Note] WSREP: Synchronized with group, ready for connections
2015-06-24 17:32:23 2061 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.

Nothing out of the ordinary.

But the second and third server:

2015-06-24T17:32:01Z ee8e3ca31f90 confd[73]: ERROR exit status 1
echo ==> database: waiting for confd to write initial templates...
==> An empty or uninitialized database is detected in /var/lib/mysql
-----> Creating database...
-----> Done!
==> starting mysql in order to set up passwords
-----> sleeping for 20 seconds, then testing if DB is up
150624 17:32:15 mysqld_safe Logging to '/var/log/mysql/error.log'.
150624 17:32:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150624 17:32:15 mysqld_safe Skipping wsrep-recover for empty datadir: /var/lib/mysql
150624 17:32:15 mysqld_safe Assigning 00000000-0000-0000-0000-000000000000:-1 to wsrep_start_position
==> stopping mysql after setting up passwords
150624 17:32:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Starting MySQL for reals
==> Performing Election...

Shouldn't they join the already existing cluster? I can also wait a few minutes before starting the second/third server, but the effect is the same.

fernandoneto commented 8 years ago

@EtienneBruines did you solve your problem?

EtienneBruines commented 8 years ago

I am afraid not. At the end I just gave up, let it rest for a while. Now stopped testing it due to budget cuts. Sorry.

paulczar commented 8 years ago

I haven't played with this in a while... not sure why it would stop working, I'll try and find some time to play with it sometime over the next week or so.

fernandoneto commented 8 years ago

@paulczar i think maybe something is wrong at @EtienneBruines configuration. im testisng this side and everything is running perfect.