MgmtSrvr错误 - 无法确定要用于此节点的nodeid。在命令行上使用--ndb-nodeid = <nodeid>指定它

时间:2018-03-09 15:29:15

标签: mysql mysql-cluster

我尝试用命令启动mysql-cluster-manager: ndb_mgmd -f /var/lib/mysql-cluster/config.ini --configdir = / var / lib / mysql-cluster

但返回此错误:

  

[MgmtSrvr]错误 - 无法确定要用于哪个nodeid   这个节点。使用--ndb-nodeid =在命令行

指定它

我的配置文件是:

[ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=2    # Number of replicas
DataMemory=80M    # How much memory to allocate for data storage
IndexMemory=18M   # How much memory to allocate for index storage
                  # For DataMemory and IndexMemory, we have used the
                  # default values. Since the "world" database takes up
                  # only about 500KB, this should be more than enough for
                  # this example NDB Cluster setup.
ServerPort=2202   # This the default value; however, you can use any
                  # port that is free for all the hosts in the cluster
                  # Note1: It is recommended that you do not specify the port
                  # number at all and simply allow the default value to be used
                  # instead
                  # Note2: The port was formerly specified using the PortNumber
                  # TCP parameter; this parameter is no longer available in NDB
                  # Cluster 7.5.

[ndb_mgmd]
# Management process options:
HostName=192.168.0.40          # Hostname or IP address of MGM node
DataDir=/var/lib/mysql-cluster  # Directory for MGM node log files

[ndbd]
# Options for data node "A":
                                # (one [ndbd] section per data node)
HostName=192.168.0.41          # Hostname or IP address
NodeId=2                        # Node ID for this data node
DataDir=/usr/local/mysql/data   # Directory for this data node's data files
#Id=2

[ndbd]
# Options for data node "B":
HostName=192.168.0.42           # Hostname or IP address
NodeId=3                        # Node ID for this data node
DataDir=/usr/local/mysql/data   # Directory for this data node's data files
#Id=3

[mysqld]
# SQL node options:
HostName=192.168.0.43          # Hostname or IP address
                                # (additional mysqld connections can be

我使用的是Ubuntu Server 16.04 拜托,任何人帮助我

1 个答案:

答案 0 :(得分:0)

我建议你按照错误中的建议。 我建议你也在MGM服务器上添加NodeId config.ini并在启动时设置--ndb-nodeid MGM服务器。

我不能100%确定你何时可以遵守的规则 跳过此节点ID,但我的建议是始终设置 所有MGM服务器和数据节点上的config中的节点ID 并且在启动时也是如此。

我视图中唯一没有节点的用例 指定的节点标识供NDB工具使用 API节点。