Bug #10842 Mysqld_multi hangs on start if my.cnf includes ndbcluster options
Submitted: 24 May 2005 21:58 Modified: 13 Jul 2005 23:30
Reporter: Jonathan Miller Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0 OS:Linux (Linux)
Assigned to: Petr Chardin CPU Architecture:Any

[24 May 2005 21:58] Jonathan Miller
Description:
Using mysqld_multi to start 2 mysqld process using ndb-cluster options hangs after the first mysqld starts.

mysqld_multi --config-file=/etc/my.cnf --no-log start 2,3
mysqld_multi log file version 2.2; run: Tue May 24 22:27:00 2005

Starting MySQL servers
[ndbdev@ndb10 bin]$ Starting mysqld daemon with databases from /home/ndbdev/jmiller/builds/var/c1

The process tree show that the first mysqld has started using mysqld_safe, but mysqld_multi hangs and never start the second process.

If you use the mysqld_safe feeding in the configuration settings both will start without issue:

./mysqld --server-id=2 --log-bin=/home/ndbdev/jmiller/builds/var/c2/master2 --log=/home/ndbdev/jmiller/builds/var/c2/master2.log --log-error=/home/ndbdev/jmiller/builds/var/c1/master2.err --socket=/tmp/mysql.sock2 --port=3307 --pid-file=/home/ndbdev/jmiller/builds/var/c2/hostname.pid2 --datadir=/home/ndbdev/jmiller/builds/var/c2 --language=/home/ndbdev/jmiller/builds/share/mysql/english --user=root --ndbcluster --ndb-connectstring=ndb08:14000
&

./mysqld_safe --server-id=1 --log-bin=/home/ndbdev/jmiller/builds/var/c1/master1 --log=/home/ndbdev/jmiller/builds/var/c1/master1.log --log-error=/home/ndbdev/jmiller/builds/var/c1/master1.err --socket=/tmp/mysql.sock1 --port=3308 --pid-file=/home/ndbdev/jmiller/builds/var/c1/hostname.pid1 --datadir=/home/ndbdev/jmiller/builds/var/c1 --language=/home/ndbdev/jmiller/builds/share/mysql/english --user=root --ndbcluster --ndb-connectstring=ndb08:14000 &

If you comment out the ndbcluster and the ndb-connectstring out of the my.cnf mysqld_multi will start and stop both mysqld processes without issue.

[ndbdev@ndb10 bin]$ mysqld_multi --config-file=/etc/my.cnf --no-log start 2,3
mysqld_multi log file version 2.2; run: Tue May 24 22:27:00 2005

Starting MySQL servers
Starting mysqld daemon with databases from /home/ndbdev/jmiller/builds/var/c1
Starting mysqld daemon with databases from /home/ndbdev/jmiller/builds/var/c2

11115 pts/1    00:00:00 mysqld_safe
11119 pts/1    00:00:00 mysqld_safe
11190 pts/1    00:00:00 mysqld
11194 pts/1    00:00:00 mysqld

 mysqld_multi stop 2,3

STOPPING server from pid file /home/ndbdev/jmiller/builds/var/c1/hostname.pid1
050524 22:27:44  mysqld ended

STOPPING server from pid file /home/ndbdev/jmiller/builds/var/c2/hostname.pid2
050524 22:27:44  mysqld ended

my.cnf:
[mysqld_multi]
mysqld     = /home/ndbdev/jmiller/builds/bin/mysqld_safe
mysqladmin = /home/ndbdev/jmiller/builds/bin/mysqladmin
user       = root

[mysqld2]
server-id=1
log-bin    = /home/ndbdev/jmiller/builds/var/c1/master1
log        = /home/ndbdev/jmiller/builds/var/c1/master1.log
log-error  = /home/ndbdev/jmiller/builds/var/c1/master1.err
socket     = /tmp/mysql.sock1
port       = 3307
pid-file   = /home/ndbdev/jmiller/builds/var/c1/hostname.pid1
datadir    = /home/ndbdev/jmiller/builds/var/c1
language   = /home/ndbdev/jmiller/builds/share/mysql/english
#user      = root
ndbcluster                      # run NDB engine
ndb-connectstring=ndb08:14000  # location of MGM node

[mysqld3]
server-id=2
log-bin    = /home/ndbdev/jmiller/builds/var/c2/master2
log        = /home/ndbdev/jmiller/builds/var/c2/master2.log
log-error  = /home/ndbdev/jmiller/builds/var/c2/master2.err
socket     = /tmp/mysql.sock2
port       = 3308
pid-file   = /home/ndbdev/jmiller/builds/var/c2/hostname.pid2
datadir    = /home/ndbdev/jmiller/builds/var/c2
language   = /home/ndbdev/jmiller/builds/share/mysql/english
#user      = root
ndbcluster                      # run NDB engine
ndb-connectstring=ndb08:14000  # location of MGM node

How to repeat:
Setup a ndb cluster for use with at leat 2 mysqld processes. Create a my.cnf for mutlipal mysqld processes that includes the ndb configuration options. Try to start using the mysqld_multi.
[26 May 2005 16:02] Brian Aker
This is going away in 5.0 and is being replaced by the instance manager.
[13 Jul 2005 23:30] Petr Chardin
Tried to repoduce with 4.1 and 5.0. No result. Servers start up like a charm.