MySQL Cluster中使用的AWS EC2的问题

时间:2014-02-08 23:00:52

标签: mysql amazon-web-services amazon-ec2 mysql-cluster

在使用AWS配置并尝试运行4节点/ 4主机MySQL群集时,我在尝试向Manager注册第一个数据节点时遇到了障碍。

数据节点(DN)的公共IP与其eth0(我称之为私有IP)相关联的IP不同,这似乎是一个问题。因此,集群管理器似乎从DN接收来自NodeID的传入请求:11,但源IP地址与config.ini中指定的IP不匹配。

以下是我在尝试连接时遇到的错误:

2014-02-08 22:12:45 [ndbd] INFO     -- Angel connected to '<mg_public_ip>:1186'
2014-02-08 22:12:48 [ndbd] INFO     -- Angel allocated nodeid: 11
2014-02-08 22:12:49 [ndbd] ERROR    -- Could not fetch configuration/invalid configuration, error: 'The hostname this node should have according to the configuration does not match a local interface. Attempt to bind '<dn_public_ip>' failed with error: 99 'Cannot assign requested address''

强调'此节点根据配置应具有的主机名本地接口

我花了2天的时间在线寻找解决方案!运气。有一个问题的海报建议创建一个网络别名, eth0:0 设置为DN的公共IP。产生以下日志:(此解决方案还需要配置路由器的NAT)。

Unable to connect with connect string: nodeid=11,<mg_public_ip>:1186

我认为这是一个网络配置问题, MySQL AWS 可能提供解决方法,但我还没有找到它。任何见解将不胜感激!

详细说明:

DN Public IP == <dn_public_ip>
DN Private IP == <dn_private_ip>

经理(MG)也有公共和私人IP:

Manager Public IP == <mg_public_ip>
Manager Private IP == <mg_private_ip>

管理器配置了以下 config.ini

[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 Cluster setup.

[tcp default]
# TCP/IP options:
# portnumber=2202   # This the default; however, you can use any
                  # port that is free for all the hosts in the cluster
                  # Note: It is recommended that you do not specify the port
                  # number at all and simply allow the default value to be used
                  # instead

[ndb_mgmd]
# Management process options:
hostname = <mg_private_ip>      # Private IP address of MGM node
datadir=/var/lib/mysql-cluster  # Directory for MGM node log files

[ndbd]
# Options for data node "A":
hostname=<dn_public_ip>         # Public address of data node A
datadir=/usr/local/mysql/data   # Directory for this data node's data files
NodeId=11

[ndbd]
# Options for data node "B":
hostname=***                    # Hostname or IP address
datadir=/usr/local/mysql/data   # Directory for this data node's data files
NodeId=12

[mysqld]
# SQL node options:
hostname=****                   # Hostname or IP address
                                # (additional mysqld connections can be
                                # specified for this node for various
                                # purposes such as running ndb_restore)
NodeId=21
数据节点A上的

ifconfig:

eth0      Link encap:Ethernet  HWaddr 22:00:0A:FE:87:82  
          inet <addr:dn_private_ip>  Bcast:*.*.*.*  Mask:255.255.255.192
          inet6 addr: ***** Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9321 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7950 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:739918 (722.5 KiB)  TX bytes:1194550 (1.1 MiB)
          Interrupt:25 
经理上的

_ndb_1_cluster.log:_

[MgmtSrvr] WARNING  -- Found timedout nodeid reservation for 11, releasing it
[MgmtSrvr] INFO     -- Nodeid 11 allocated for NDB at <dn_public_ip>

0 个答案:

没有答案