部署oceanbase出错

执行 obd cluster deploy lo -c mini-local-example.yaml

install oceanbase-ce-4.0.0.0 for local ok
±-------------------------------------------------------------------------------------------+
| Packages |
±-------------±--------±-----------------------±-----------------------------------------+
| Repository | Version | Release | Md5 |
±-------------±--------±-----------------------±-----------------------------------------+
| oceanbase-ce | 4.0.0.0 | 103000022023011215.el7 | d0ecd5a759c337e044ec79cab8b52bbf5a918fbb |
±-------------±--------±-----------------------±-----------------------------------------+
Repository integrity check ok
Parameter check ok
Open ssh connection ok
Cluster status check ok
Initializes observer work home ok
Remote oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb repository install ok
Remote oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb repository lib check !!
Try to get lib-repository
install oceanbase-ce-libs-4.0.0.0 for local ok
Remote oceanbase-ce-libs-4.0.0.0-103000022023011215.el7-7b228bdd8126fa326bb7e050f06a2b842da0e63c repository install ok
Remote oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb repository lib check x
[ERROR] Failed to install lib package for cluster servers
See https://www.oceanbase.com/product/ob-deployer/error-codes .

根据日志来看,安装依赖包出错了,麻烦列一下您的系统和版本号

你好,这个问题已经解决了,但是启动又报错了。

系统:
Linux localhost.localdomain 4.19.90-24.4.v2101.ky10.aarch64 #1 SMP Mon May 24 14:45:37 CST 2021 aarch64 aarch64 aarch64 GNU/Linux

[root@localhost bin]# obd cluster start lo -v

  • open /root/.obd/version for a+

  • mkdir /root/.obd/lock/

  • try to get share lock /root/.obd/lock/global

  • share lock /root/.obd/lock/global, count 1

  • cmd: [‘lo’]

  • opts: {‘servers’: None, ‘components’: None, ‘force_delete’: None, ‘strict_check’: None, ‘without_parameter’: None}

  • Get Deploy by name

  • mkdir /root/.obd/cluster/

  • mkdir /root/.obd/config_parser/

  • try to get exclusive lock /root/.obd/lock/deploy_lo

  • exclusive lock /root/.obd/lock/deploy_lo, count 1

  • Deploy status judge
    Get local repositories ok

  • mkdir /root/.obd/repository

  • Get local repository oceanbase-ce-4.0.0.0-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Search repository oceanbase-ce version: 4.0.0.0, tag: d0ecd5a759c337e044ec79cab8b52bbf5a918fbb, release: None, package_hash: None

  • try to get share lock /root/.obd/lock/mirror_and_repo

  • share lock /root/.obd/lock/mirror_and_repo, count 1

  • mkdir /root/.obd/repository/oceanbase-ce

  • Found repository oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Get deploy config
    Search plugins ok

  • Searching start_check plugin for components …

  • Searching start_check plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • mkdir /root/.obd/plugins

  • Found for oceanbase-ce-py_script_start_check-4.0.0.0 for oceanbase-ce-4.0.0.0

  • Searching start plugin for components …

  • Searching start plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Found for oceanbase-ce-py_script_start-4.0.0.0 for oceanbase-ce-4.0.0.0

  • Searching connect plugin for components …

  • Searching connect plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Found for oceanbase-ce-py_script_connect-3.1.0 for oceanbase-ce-4.0.0.0

  • Searching bootstrap plugin for components …

  • Searching bootstrap plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Found for oceanbase-ce-py_script_bootstrap-4.0.0.0 for oceanbase-ce-4.0.0.0

  • Searching display plugin for components …

  • Searching display plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Found for oceanbase-ce-py_script_display-3.1.0 for oceanbase-ce-4.0.0.0

Open ssh connection ok
Load cluster param plugin ok

  • Searching param plugin for components …

  • Search param plugin for oceanbase-ce

  • Found for oceanbase-ce-param-4.0.0.0 for oceanbase-ce-4.0.0.0

  • Applying oceanbase-ce-param-4.0.0.0 for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Call oceanbase-ce-py_script_start_check-4.0.0.0 for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • import start_check

  • add start_check ref count to 1
    Check before start observer x
    – local execute: cat /root/oceanbase/run/observer.pid – exited code 1, error output:
    cat: /root/oceanbase/run/observer.pid: 没有那个文件或目录

– 127.0.0.1 port check
– local execute: bash -c ‘cat /proc/net/{tcp,udp}’ | awk -F’ ’ ‘{print $2,$10}’ | grep ‘00000000:0B41’ | awk -F’ ’ ‘{print $2}’ | uniq – exited code 0
– local execute: bash -c ‘cat /proc/net/{tcp,udp}’ | awk -F’ ’ ‘{print $2,$10}’ | grep ‘00000000:0B42’ | awk -F’ ’ ‘{print $2}’ | uniq – exited code 0
– local execute: ls /root/oceanbase/store/sstable/block_file – exited code 0
– local execute: cat /proc/sys/fs/aio-max-nr /proc/sys/fs/aio-nr – exited code 0
– local execute: ulimit -a – exited code 0
– local execute: cat /proc/meminfo – exited code 0
– local execute: df --block-size=1024 – exited code 1, error output:
df: /run/user/0/gvfs: 传输端点尚未连接

– disk: {’/’: 0}
[ERROR] oceanbase-ce-py_script_start_check-4.0.0.0 RuntimeError: ‘int’ object is not subscriptable
Traceback (most recent call last):
File “core.py”, line 1446, in start_cluster
File “core.py”, line 1508, in _start_cluster
File “_plugin.py”, line 242, in call
File “_plugin.py”, line 216, in _new_func
File “/root/.obd/plugins/oceanbase-ce/4.0.0.0/start_check.py”, line 418, in start_check
_start_check(plugin_context, strict_check)
File “/root/.obd/plugins/oceanbase-ce/4.0.0.0/start_check.py”, line 369, in _start_check
avail = disk[p][‘avail’]
TypeError: ‘int’ object is not subscriptable

  • sub start_check ref count to 0
  • export start_check
    See https://www.oceanbase.com/product/ob-deployer/error-codes .
  • share lock /root/.obd/lock/mirror_and_repo release, count 0
  • unlock /root/.obd/lock/mirror_and_repo
  • exclusive lock /root/.obd/lock/deploy_lo release, count 0
  • unlock /root/.obd/lock/deploy_lo
  • share lock /root/.obd/lock/global release, count 0
  • unlock /root/.obd/lock/global

嗯嗯,那这个安装部署您是怎么解决的呀?可以罗列下你排查的问题和解决方法。
启动报错的日志我帮您看看,排查一下

参考了一下这个帖子:

执行了这个命令,安装了依赖库以后就解决了:
yum -y install flex bison gcc gcc-c++ glibc glibc-devel

缺少这些基本的依赖库,感谢,我反馈一下看看是否能优化OBD的部署

您有改过安装的配置文件吗?麻烦您提供一下配置文件

/root目录存在吗?
另外麻烦执行下df --block-size=1024 看看

[root@localhost bin]# df --block-size=1024
df: /run/user/0/gvfs: 传输端点尚未连接
文件系统 1K-块 已用 可用 已用% 挂载点
devtmpfs 32636224 0 32636224 0% /dev
tmpfs 32662336 338880 32323456 2% /dev/shm
tmpfs 32662336 497664 32164672 2% /run
tmpfs 32662336 0 32662336 0% /sys/fs/cgroup
/dev/mapper/klas-root 380103336 109226316 270877020 29% /
tmpfs 32662336 33536 32628800 1% /tmp
/dev/sda2 1038336 230488 807848 23% /boot
/dev/sda1 613184 6572 606612 2% /boot/efi
tmpfs 6532416 1152 6531264 1% /run/user/0
/dev/sdb1 9687576744 554047556 8645231668 7% /run/media/root/cd31d187-8570-499b-b765-f721d3f7bc42
[root@localhost bin]# cd /root
[root@localhost ~]# ll
总用量 16
drwxr-xr-x 2 root root 6 1月 7 23:10 公共
drwxr-xr-x 2 root root 6 1月 7 23:10 模板
drwxr-xr-x 2 root root 6 1月 7 23:10 视频
drwxr-xr-x 2 root root 6 1月 7 23:10 图片
drwxr-xr-x 2 root root 6 1月 7 23:10 文档
drwxr-xr-x 4 root root 306 2月 28 17:02 下载
drwxr-xr-x 2 root root 6 1月 7 23:10 音乐
drwxr-xr-x 3 root root 153 1月 18 15:09 桌面
-rw-r–r-- 1 root root 139 2月 12 11:24 ab.txt
-rw------- 1 root root 2847 1月 6 15:55 anaconda-ks.cfg
drwxr-xr-x 2 root root 42 3月 7 19:16 build-Test22-Desktop-Debug
-rw-r–r-- 1 root root 3333 1月 7 22:37 initial-setup-ks.cfg
-rwxr-xr-x 1 root root 2013 3月 8 16:03 mini-local-example.yaml
drwxr-xr-x 9 root root 89 3月 7 17:32 observer
drwxr-xr-x 11 root root 113 3月 8 16:15 oceanbase
drwxr-xr-x 2 root root 126 3月 7 19:16 Test22
drwxr-xr-x 2 root root 96 1月 18 15:09 userdata

df: /run/user/0/gvfs: 传输端点尚未连接

这个gvfs能否现在卸载能?

[root@localhost ~]# umount /run/user/0/gvfs

[root@localhost ~]# obd cluster stop lo
Get local repositories ok
Search plugins ok
Open ssh connection ok
Stop observer ok
lo stopped

[root@localhost ~]# obd cluster start lo -v

  • open /root/.obd/version for a+

  • mkdir /root/.obd/lock/

  • try to get share lock /root/.obd/lock/global

  • share lock /root/.obd/lock/global, count 1

  • cmd: [‘lo’]

  • opts: {‘servers’: None, ‘components’: None, ‘force_delete’: None, ‘strict_check’: None, ‘without_parameter’: None}

  • Get Deploy by name

  • mkdir /root/.obd/cluster/

  • mkdir /root/.obd/config_parser/

  • try to get exclusive lock /root/.obd/lock/deploy_lo

  • exclusive lock /root/.obd/lock/deploy_lo, count 1

  • Deploy status judge
    Get local repositories ok

  • mkdir /root/.obd/repository

  • Get local repository oceanbase-ce-4.0.0.0-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Search repository oceanbase-ce version: 4.0.0.0, tag: d0ecd5a759c337e044ec79cab8b52bbf5a918fbb, release: None, package_hash: None

  • try to get share lock /root/.obd/lock/mirror_and_repo

  • share lock /root/.obd/lock/mirror_and_repo, count 1

  • mkdir /root/.obd/repository/oceanbase-ce

  • Found repository oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Get deploy config
    Search plugins ok

  • Searching start_check plugin for components …

  • Searching start_check plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • mkdir /root/.obd/plugins

  • Found for oceanbase-ce-py_script_start_check-4.0.0.0 for oceanbase-ce-4.0.0.0

  • Searching start plugin for components …

  • Searching start plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Found for oceanbase-ce-py_script_start-4.0.0.0 for oceanbase-ce-4.0.0.0

  • Searching connect plugin for components …

  • Searching connect plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Found for oceanbase-ce-py_script_connect-3.1.0 for oceanbase-ce-4.0.0.0

  • Searching bootstrap plugin for components …

  • Searching bootstrap plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Found for oceanbase-ce-py_script_bootstrap-4.0.0.0 for oceanbase-ce-4.0.0.0

  • Searching display plugin for components …

  • Searching display plugin for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Found for oceanbase-ce-py_script_display-3.1.0 for oceanbase-ce-4.0.0.0

Open ssh connection ok
Load cluster param plugin ok

  • Searching param plugin for components …

  • Search param plugin for oceanbase-ce

  • Found for oceanbase-ce-param-4.0.0.0 for oceanbase-ce-4.0.0.0

  • Applying oceanbase-ce-param-4.0.0.0 for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • Call oceanbase-ce-py_script_start_check-4.0.0.0 for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • import start_check

  • add start_check ref count to 1
    Check before start observer ok
    – local execute: cat /root/oceanbase/run/observer.pid – exited code 1, error output:
    cat: /root/oceanbase/run/observer.pid: 没有那个文件或目录

– 127.0.0.1 port check
– local execute: bash -c ‘cat /proc/net/{tcp,udp}’ | awk -F’ ’ ‘{print $2,$10}’ | grep ‘00000000:0B41’ | awk -F’ ’ ‘{print $2}’ | uniq – exited code 0
– local execute: bash -c ‘cat /proc/net/{tcp,udp}’ | awk -F’ ’ ‘{print $2,$10}’ | grep ‘00000000:0B42’ | awk -F’ ’ ‘{print $2}’ | uniq – exited code 0
– local execute: ls /root/oceanbase/store/sstable/block_file – exited code 0
– local execute: cat /proc/sys/fs/aio-max-nr /proc/sys/fs/aio-nr – exited code 0
– local execute: ulimit -a – exited code 0
– local execute: cat /proc/meminfo – exited code 0
– local execute: df --block-size=1024 – exited code 0
– disk: {’/’: {‘total’: 389225816064, ‘avail’: 277386117120, ‘need’: 0}, ‘/dev’: {‘total’: 33419493376, ‘avail’: 33419493376, ‘need’: 0}, ‘/dev/shm’: {‘total’: 33446232064, ‘avail’: 33099218944, ‘need’: 0}, ‘/run’: {‘total’: 33446232064, ‘avail’: 32936624128, ‘need’: 0}, ‘/sys/fs/cgroup’: {‘total’: 33446232064, ‘avail’: 33446232064, ‘need’: 0}, ‘/tmp’: {‘total’: 33446232064, ‘avail’: 33373945856, ‘need’: 0}, ‘/boot’: {‘total’: 1063256064, ‘avail’: 827236352, ‘need’: 0}, ‘/boot/efi’: {‘total’: 627900416, ‘avail’: 621170688, ‘need’: 0}, ‘/run/user/0’: {‘total’: 6689193984, ‘avail’: 6688079872, ‘need’: 0}, ‘/run/media/root/cd31d187-8570-499b-b765-f721d3f7bc42’: {‘total’: 9920078585856, ‘avail’: 8852717228032, ‘need’: 0}}
– local execute: date +%s%N – exited code 0
– 127.0.0.1 time delta -0.393310546875

  • sub start_check ref count to 0
  • export start_check
  • Call oceanbase-ce-py_script_start-4.0.0.0 for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb
  • import start
  • add start ref count to 1
    Start observer ok
    – local execute: cat /root/oceanbase/run/observer.pid – exited code 1, error output:
    cat: /root/oceanbase/run/observer.pid: 没有那个文件或目录

– 127.0.0.1 start command construction
– starting 127.0.0.1 observer
root@127.0.0.1 set env LD_LIBRARY_PATH to ‘/root/oceanbase/lib:’
– local execute: cd /root/oceanbase; /root/oceanbase/bin/observer -r ‘127.0.0.1:2882:2881’ -p 2881 -P 2882 -z ‘zone1’ -c 1 -d ‘/root/oceanbase/store’ -i ‘lo’ -l ‘INFO’ -o __min_full_resource_pool_memory=2147483648,memory_limit=‘8G’,system_memory=‘4G’,datafile_size=‘10G’,log_disk_size=‘12G’,cpu_count=16,enable_syslog_wf=False,enable_syslog_recycle=True,max_syslog_file_count=4 – exited code 0
root@127.0.0.1 set env LD_LIBRARY_PATH to ‘/tmp/_MEII7Nvvz’

observer program health check ok
– 127.0.0.1 program health check
– local execute: cat /root/oceanbase/run/observer.pid – exited code 0
– local execute: ls /proc/776199 – exited code 0
– 127.0.0.1 observer[pid: 776199] started

  • sub start ref count to 0

  • export start

  • Call oceanbase-ce-py_script_connect-3.1.0 for oceanbase-ce-4.0.0.0-103000022023011215.el7-d0ecd5a759c337e044ec79cab8b52bbf5a918fbb

  • import connect
    [ERROR] import connect failed
    Traceback (most recent call last):
    File “core.py”, line 1446, in start_cluster
    File “core.py”, line 1541, in _start_cluster
    File “_plugin.py”, line 242, in call
    File “_plugin.py”, line 210, in _new_func
    File “_plugin.py”, line 196, in before_do
    File “_plugin.py”, line 249, in _import
    File “tool.py”, line 168, in import_module
    File “/root/.obd/plugins/oceanbase-ce/3.1.0/connect.py”, line 28, in
    import pymysql as mysql
    ModuleNotFoundError: No module named ‘pymysql’

  • sys.path: [’/root/.obd/plugins/oceanbase-ce/3.1.0’, ‘/tmp/_MEII7Nvvz/base_library.zip’, ‘/tmp/_MEII7Nvvz/lib-dynload’, ‘/tmp/_MEII7Nvvz’, ‘/usr/obd/lib/site-packages’]
    See https://www.oceanbase.com/product/ob-deployer/error-codes .

  • share lock /root/.obd/lock/mirror_and_repo release, count 0

  • unlock /root/.obd/lock/mirror_and_repo

  • exclusive lock /root/.obd/lock/deploy_lo release, count 0

  • unlock /root/.obd/lock/deploy_lo

  • share lock /root/.obd/lock/global release, count 0

  • unlock /root/.obd/lock/global

[root@localhost ~]# pip install pymysql
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at Release process - pip documentation v23.1.dev0 pip 21.0 will remove support for this functionality.
Requirement already satisfied: pymysql in /usr/lib/python2.7/site-packages (0.10.1)

看上文,你用视乎不是兼容性声明中的ob?Compile_CN · oceanbase/oceanbase Wiki · GitHub
这是OB社区版的兼容性声明。

现在OB应该是已经启动了,但OBD在这个环境下无法正确的找到自身的依赖库,导致无法连接到OB。
现在我们可以手动执行bootstrap。步骤是:
1.使用obclient -h127.1 -uroot@sys -P2881 登录到ob
2.执行 alter system bootstrap ZONE ‘zone1’ SERVER ‘127.0.0.1:2882’; 完成boostrap

1 个赞

非常感谢 :grinning:,问题应该是解决了,只是每次启动的时候这个错误无视掉就可以了吧?

请问这个咋解决的啊?

有新的问题需要请到问答区发帖提问,已经有解决方案的问答结贴了,不会再有同学跟进