{"id":188341,"date":"2020-11-06T18:58:54","date_gmt":"2020-11-06T10:58:54","guid":{"rendered":"http:\/\/4563.org\/?p=188341"},"modified":"2020-11-06T18:58:54","modified_gmt":"2020-11-06T10:58:54","slug":"debian-%e4%b8%8a%e5%ad%a6%e4%b9%a0%e7%9d%80%e6%90%ad%e5%bb%ba-mysql-%e9%9b%86%e7%be%a4%e6%8a%a5-the-hostname-this-node-should-have-according-to-%e7%9a%84%e9%94%99%e8%af%af%ef%bc%8c","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=188341","title":{"rendered":"Debian \u4e0a\u5b66\u4e60\u7740\u642d\u5efa MySQL \u96c6\u7fa4\u62a5 The hostname this node should have according to \u2026\u2026 \u7684\u9519\u8bef\uff0c why\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Debian \u4e0a\u5b66\u4e60\u7740\u642d\u5efa MySQL \u96c6\u7fa4\u62a5 The hostname this node should have according to \u2026\u2026 \u7684\u9519\u8bef\uff0c why\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Newyorkcity <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5f00\u95e8\u89c1\u5c71\u5730\u653e\u4e00\u4e0b\u9519\u8bef\u4fe1\u606f\uff1a<\/p>\n<p>2020-11-07 16:35:20 [MgmtSrvr] ERROR &#8212; The hostname this node should have according to the configuration does not match a local interface. Attempt to bind &#8217;42.a1.b1.c1&#8242; failed with error: 99 &#8216;Cannot assign requested<\/p>\n<p>Host1:<\/p>\n<p>ip: 42.a1.b1.c1<\/p>\n<p>\u8fd9\u53f0\u4e3b\u673a\u4e0a\u5b89\u88c5\u4e86 mysql-cluster-community-server, mysql-cluster-community-management-server and mysql-cluster-community-data-node \u8fd9\u4e09\u4e2a\u8f6f\u4ef6\uff0c\u4e5f\u5c31\u662f\u8bf4\u6211\u5e0c\u671b\u5b83\u540c\u65f6\u62c5\u5f53\u7ba1\u7406\u8282\u70b9\uff0cSQL \u8282\u70b9\u548c\u6570\u636e\u8282\u70b9\u3002<\/p>\n<p>Host2:<\/p>\n<p>ip: 119.a2.b2.c2<\/p>\n<p>\u8fd9\u53f0\u4e3b\u673a\u4e0a\u540c\u65f6\u5b89\u88c5\u4e86 mysql-cluster-community-server and mysql-cluster-community-data-node \u8fd9\u4e24\u4e2a\u8f6f\u4ef6\uff0c\u5373\u540c\u65f6\u62c5\u5f53 SQL \u8282\u70b9\u548c\u6570\u636e\u8282\u70b9\u3002<\/p>\n<p>\u8fd9\u6837\u540c\u65f6\u62c5\u5f53\u4e0d\u53ef\u884c\u561b\uff1f\u4e00\u4e2a\u4e3b\u673a\u53ea\u80fd\u62c5\u4efb\u4e00\u79cd\u8282\u70b9\uff1f<\/p>\n<p>\u4e00\u53f0\u65e9\u5c31\u4e70\u4e86\u7684\u5b66\u751f\u673a\uff0c\u4e00\u53f0\u6700\u8fd1\u53cc 11 \u521a\u5165\u7684\u4e91\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u770b\u5230\u5b83\u4eec\u4e24\u4e2a IP \u5dee\u8ddd\u5f88\u5927\u3002\u518d\u591a\u4e91\u670d\u52a1\u5668\u4e70\u4e0d\u8d77\u4e86\uff0c\u6240\u4ee5\u5e0c\u671b\u4e00\u53f0\u4e3b\u673a\u591a\u4e2a\u89d2\u8272\u3002<\/p>\n<p>\u8f6f\u4ef6\u4ec5\u4ec5\u53ea\u662f\u5b89\u88c5\uff0c\u5728\u4e0b\u9762\u7684\u4efb\u4f55\u64cd\u4f5c\u524d\uff0c\u6ca1\u6709\u4efb\u4f55\u8f6f\u4ef6\u88ab\u542f\u52a8\u3002\u5b89\u88c5\u7684\u65b9\u5f0f\u6765\u81ea\u8fd9\u7bc7\u5b98\u65b9\u6587\u6863\u3002<\/p>\n<p>\u5728 host1 \u4e0a\u6267\u884c <code>cat \/var\/lib\/mysql-cluster\/config.ini<\/code>\uff0c\u4ea7\u751f\u5982\u4e0b\u8f93\u51fa\uff1a<\/p>\n<pre><code>[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)  <\/code><\/pre>\n<p>\u5728 host1 \u4e0a\u6267\u884c <code>ndb_mgmd -f \/var\/lib\/mysql-cluster\/config.ini --ndb-nodeid=1<\/code>\uff0c\u62a5\u9519\u4fe1\u606f\u5982\u4e0b\uff1a<\/p>\n<pre><code>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' <\/code><\/pre>\n<p>\u8fd9\u91cc\u7684 The hostname this node should have according to the configuration does not match a local interface. Attempt to bind &#8217;42.a1.b1.c1&#8242; failed with error: 99 &#8216;Cannot assign requested \u662f\u4ec0\u4e48\u60c5\u51b5\u554a\uff0c\u5982\u4f55\u89e3\u51b3\uff1f<\/p>\n<p>\u611f\u8c22\uff01<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Debian \u4e0a\u5b66\u4e60\u7740\u642d\u5efa MyS&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/188341"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=188341"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/188341\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=188341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=188341"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=188341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}