安装社区版单机环境,启动集群报[ERROR] IP no such net interface:

【问题描述】

obd cluster start c1:

Get local repositories and plugins ok

Open ssh connection ok

Cluster param config check ok

Check before start observer x

[ERROR] 192.168.10.104 No such net interface:ens192

obd cluster edit-config c1 

查看集群配置文件。看里面的  devname: 

这个后面要写 配置文件里的 servers  对应的 那个网卡名称。

网卡名称:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

  inet 127.0.0.1/8 scope host lo

    validlft forever preferredlft forever

  inet6 ::1/128 scope host

    validlft forever preferredlft forever

2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000

  link/ether 00:50:56:ab:11:f0 brd ff:ff:ff:ff:ff:ff

  inet 192.168.10.104/24 brd 192.168.10.255 scope global noprefixroute ens192

配置文件:

oceanbase-ce:

 servers:

  # Please don't use hostname, only IP can be supported

  • 192.168.10.104

 global:

  # The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.

  home_path: /root/observer

  # The directory for data storage. The default value is $home_path/store.

  # data_dir: /data

  # The directory for clog, ilog, and slog. The default value is the same as the data_dir value.

  # redo_dir: /redo

  # Please set devname as the network adaptor's name whose ip is in the setting of severs.

  # if set severs as "127.0.0.1", please set devname as "lo"

  # if current ip is 192.168.1.10, and the ip's network adaptor's name is "eth0", please use "eth0"

  devname: ens192

  mysql_port: 2881 # External port for OceanBase Database. The default value is 2881.

  rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882.

  zone: zone1

  cluster_id: 1



另外,这个单机环境安装的场景是中控服务器与目标服务器不是同一台,先前安装的在同一台上是可以成功的,不在同一台就报网卡识别不了。

这是一个已知BUG导致的。参考https://github.com/oceanbase/obdeploy/issues/37。可以根据https://github.com/oceanbase/obdeploy/commit/b037c96b1a78397688f040a490dc495d805b65a7修改~/.obd/plugins/oceanbase/3.1.0/start_check.py.