Do You PHP はてブロ

Do You PHPはてなからはてブロに移動しました

ndb_mgmでnot connectedが出る

こっそりMySQL始めてます :-)
http://journal.mycom.co.jp/special/2004/mysql/を参考に(あくまで参考)しながら、

  • node1
    • CentOS4.4 on VMware Player(172.16.1.9/16)
    • MySQL-Max-4.1.21(glibc23)
    • MGM+DB+API
  • node2
    • CentOS4.4 on VMware Player(172.16.1.20/16)
    • MySQL-Max-4.1.21(glibc23)
    • DB

この構成でMySQL Clusterを構成中、node2のndbdからnode1のndb_mgmdに接続できない現象が出た。ndbdを起動しても

# ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 172.16.1.9:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @172.16.1.9  (Version: 4.1.21, starting, Nodegroup: 0, Master)
id=3 (not connected, accepting connect from node2)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @node1  (Version: 4.1.21)

[mysqld(API)]   1 node(s)
id=5 (not connected, accepting connect from node1)

ndb_mgm>

のような感じ。
何でかな〜と思っていたら、node1のiptabelsで引っかかっていた模様。。。orz
ポート1186は開けておいたが、2202が閉じていたので/etc/sysconfig/iptablesを修正、iptablesを再起動。その後、node2のndbdを再起動すると、

# ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 172.16.1.9:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @172.16.1.9  (Version: 4.1.21, Nodegroup: 0, Master)
id=3    @172.16.1.20  (Version: 4.1.21, starting, Nodegroup: 0, Master)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @172.16.1.9  (Version: 4.1.21)

[mysqld(API)]   1 node(s)
id=5 (not connected, accepting connect from node1)

ndb_mgm>

となり、無事接続できた模様。。。やれやれ。