Bug #24290 Management client CONNECT command nonfunctional for remote MGM servers
Submitted: 14 Nov 2006 9:10 Modified: 15 Feb 2007 15:00
Reporter: Jon Stephens Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1.12-BK OS:Linux (Linux 32 Bit)
Assigned to: CPU Architecture:Any
Tags: cluster, connect, connectstring, NDB_MGM

[14 Nov 2006 9:10] Jon Stephens
Description:
The CONNECT command in the ndb_mgm client appears to ignore the connectstring, which renders it nonfunctional for connecting to a remote management server.

How to repeat:
Management server running on 192.168.0.179, using client on 192.168.0.176.

Invoke the management client with no connectstring, then try to issue a command:

jon@gigan:/usr/local/mysql/bin> ./ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Unable to connect with connect string: nodeid=0,localhost:1186
Retrying every 5 seconds. Attempts left: 2 1, failed.

Try to connect to the management server using CONNECT:

ndb_mgm> CONNECT 192.168.0.179
SocketClient::connect() faile�!@0.179 1186
Unable to connect with connect string: nodeid=�!@0.179:1186
Retrying every 5 seconds. Attempts left: 2
SocketClient::connect() faile�!@0.179 1186
 1
SocketClient::connect() faile�!@0.179 1186
, failed.
ndb_mgm>
ndb_mgm>
ndb_mgm> CONNECT nodeid=7,192.168.0.179
Unable to connect with connect string: nodeid=0,localhost:1186
Retrying every 5 seconds. Attempts left: 2 1, failed.
ndb_mgm> CONNECT nodeid=7,192.168.0.179:1186
Unable to connect with connect string: nodeid=0,localhost:1186
Retrying every 5 seconds. Attempts left: 2 1, failed.
ndb_mgm> CONNECT -c "nodeid=7,192.168.0.179:1186"
Unable to connect with connect string: nodeid=0,localhost:1186
Retrying every 5 seconds. Attempts left: 2 1, failed.
ndb_mgm> CONNECT "nodeid=7,192.168.0.179:1186"
Unable to connect with connect string: nodeid=0,localhost:1186
Retrying every 5 seconds. Attempts left: 2 1, failed.
ndb_mgm> exit
jon@gigan:/usr/local/mysql/bin> ./ndb_mgm -c 192.168.0.179
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 192.168.0.179:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     4 node(s)
id=1    @192.168.0.193  (Version: 5.1.12, Nodegroup: 0)
id=2    @192.168.0.112  (Version: 5.1.12, Nodegroup: 0)
id=3    @192.168.0.176  (Version: 5.1.12, Nodegroup: 1)
id=4    @192.168.0.112  (Version: 5.1.12, Nodegroup: 1, Master)

[ndb_mgmd(MGM)] 1 node(s)
id=5    @192.168.0.179  (Version: 5.1.12)

[mysqld(API)]   4 node(s)
id=6    @192.168.0.176  (Version: 5.1.12)
id=7 (not connected, accepting connect from any host)
id=8 (not connected, accepting connect from any host)
id=9    @192.168.0.179  (Version: 5.1.12)

ndb_mgm>  

Suggested fix:
Fix the command to work as shown in the output of ndb_mgm -e HELP:

CONNECT [<connectstring>] Connect to management server (reconnect if already connected)

Or fix the HELP output so that it displays the correct syntax clearly, if that's the problem.
[16 Nov 2006 15:19] Roland Bouman
More oddities with CONNECT:

Cluster is up and running:
ndb_mgm> show                    
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @127.0.0.1  (Version: 5.1.14, Nodegroup: 0, Master)
id=3    @127.0.0.1  (Version: 5.1.14, Nodegroup: 0)

[ndb_mgmd(MGM)] 2 node(s)
id=1    @127.0.0.1  (Version: 5.1.14)
id=9    @127.0.0.1  (Version: 5.1.14)

[mysqld(API)]   2 node(s)
id=4 (not connected, accepting connect from 127.0.0.1)
id=5 (not connected, accepting connect from 127.0.0.1)

node 1 is on port 1186, node 9 is on port 1187

ndb_mgm> connect 9,127.0.0.1:1187
Connected to Management Server at: 127.0.0.1:1187
ndb_mgm> connect 1,127.0.0.1:1187
Connected to Management Server at: 127.0.0.1:1187

as expected, but now:

ndb_mgm> connect 0,127.0.0.1:1187
Connected to Management Server at: 0:1186

(ignores specified port)

ndb_mgm> connect nodeid=2,127.0.0.1
Connected to Management Server at: 127.0.0.1:1186

(ignores specified nodeid)
[16 Nov 2006 22:16] Hartmut Holzgraefe
can't reproduce with latest 5.1 main tree or 5.1.12 release
[30 Dec 2006 9:27] Valeriy Kravchuk
Please, try to repeat with a newer version, 5.1.14, and inform about the results.
[31 Jan 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[15 Feb 2007 15:00] Jon Stephens
CONNECT is now working fine in 5.1.16-bk, so this appears to be no longer an issue.