Fork me on GitHub
Suzf  Blog

[faq] Couchbase cant start because of the ip addr nightmare

License: Attribution-NonCommercial-ShareAlike 4.0 International

本文出自 Suzf Blog。 如未注明,均为 SUZF.NET 原创。


许久之前,再次打开在本地 VM 创建的 Couchbase 有些异常 服务无法正常运行 查看日志,如下:
# /opt/couchbase/var/lib/couchbase/logs/info.log
[ns_server:warn,2016-08-15T13:47:59.536+08:00,nonode@nohost:dist_manager<0.129.0>:dist_manager:wait_for_address:121]Cannot listen on address ``: eaddrnotavail
[ns_server:info,2016-08-15T13:47:59.536+08:00,nonode@nohost:dist_manager<0.129.0>:dist_manager:wait_for_address:125]Configured address `` seems to be invalid. Giving OS a chance to bring it up.
[ns_server:error,2016-08-15T13:48:00.537+08:00,nonode@nohost:dist_manager<0.129.0>:dist_manager:init:178]Configured address `` seems to be invalid. Will refuse to start for safety reasons.
看起来是说主机名称  无效,以至于服务 无法正常启动。 O 想起来了, 曾经修改过 /etc/hosts 记录
#grep cb /etc/hosts
#ifconfig eth1|grep 'inet addr'
          inet addr:  Bcast:  Mask:
下面来更正 hosts 记录
#grep cb /etc/hosts
It worked.

There are several ways you can provide hostnames:

  • When installing a Couchbase Server on a machine.
  • When adding a node to an existing cluster for an online upgrade.
  • Using a REST API call.

Hostname Errors

Provide the hostname and port for the node and administrative credentials for the cluster. The value you provide for hostname must be a valid hostname for the node. Possible errors that can occur:

  • Could not resolve the host name. The host name you provide as a parameter does not resolve to a IP address.
  • Could not listen. The host name resolves to an IP address, but no network connection exists for the address.
  • Could not rename the node because name was fixed at server start-up.
  • Could not save address after rename.
  • Requested name host name is not allowed. Invalid host name provided.
  • Renaming is disallowed for nodes that are already part of a cluster.

「一键投喂 软糖/蛋糕/布丁/牛奶/冰阔乐!」

Suzf Blog

(๑>ڡ<)☆ 谢谢 ~