跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • Debian 上学习着搭建 MySQL 集群报 The hostname this node should have according to …… 的错误, why?
未分類
6 11 月 2020

Debian 上学习着搭建 MySQL 集群报 The hostname this node should have according to …… 的错误, why?

Debian 上学习着搭建 MySQL 集群报 The hostname this node should have according to …… 的错误, why?

資深大佬 : Newyorkcity 4

开门见山地放一下错误信息:

2020-11-07 16:35:20 [MgmtSrvr] ERROR — The hostname this node should have according to the configuration does not match a local interface. Attempt to bind ’42.a1.b1.c1′ failed with error: 99 ‘Cannot assign requested

Host1:

ip: 42.a1.b1.c1

这台主机上安装了 mysql-cluster-community-server, mysql-cluster-community-management-server and mysql-cluster-community-data-node 这三个软件,也就是说我希望它同时担当管理节点,SQL 节点和数据节点。

Host2:

ip: 119.a2.b2.c2

这台主机上同时安装了 mysql-cluster-community-server and mysql-cluster-community-data-node 这两个软件,即同时担当 SQL 节点和数据节点。

这样同时担当不可行嘛?一个主机只能担任一种节点?

一台早就买了的学生机,一台最近双 11 刚入的云服务器,可以看到它们两个 IP 差距很大。再多云服务器买不起了,所以希望一台主机多个角色。

软件仅仅只是安装,在下面的任何操作前,没有任何软件被启动。安装的方式来自这篇官方文档。

在 host1 上执行 cat /var/lib/mysql-cluster/config.ini,产生如下输出:

[ndbd default] # Options affecting ndbd processes on all data nodes: NoOfReplicas=1    # Number of fragment 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.                   # NOTE: IndexMemory is deprecated in NDB 7.6 and later; in                   # these versions, resources for all data and indexes are                   # allocated by DataMemory and any that are set for IndexMemory                   # are added to the DataMemory resource pool 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=42.a1.b1.c1           # Hostname or IP address of management node DataDir=/var/lib/mysql-cluster  # Directory for management node log files  #[ndbd] #Options for data node "A":                                 # (one [ndbd] section per data node) #HostName=42.a1.b1.c1           # 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  [ndbd] #Options for data node "B":  HostName=119.a2.b2.c2         # 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  [mysqld] #SQL node options: HostName=119.a2.b2.c2           # Hostname or IP address                                 # (additional mysqld connections can be                                 # specified for this node for various                                 # purposes such as running ndb_restore)  

在 host1 上执行 ndb_mgmd -f /var/lib/mysql-cluster/config.ini --ndb-nodeid=1,报错信息如下:

MySQL Cluster Management Server mysql-5.7.32 ndb-7.6.16 2020-11-07 16:35:20 [MgmtSrvr] WARNING  -- at line 5: [DB] IndexMemory is deprecated, will use Number bytes on each ndbd(DB) node allocated for storing indexes instead 2020-11-07 16:35:20 [MgmtSrvr] ERROR    -- The hostname this node should have according to the configuration does not match a local interface. Attempt to bind '42.a1.b1.c1' failed with error: 99 'Cannot assign requested address' 

这里的 The hostname this node should have according to the configuration does not match a local interface. Attempt to bind ’42.a1.b1.c1′ failed with error: 99 ‘Cannot assign requested 是什么情况啊,如何解决?

感谢!

大佬有話說 (0)

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具