【 使用环境 】测试环境
【 使用版本 】
4.0社区版
【问题现象及影响】
[root@ceph02 bin]# obd cluster list
±-------------------------------------------------+
| Cluster List |
±-----±------------------------±----------------+
| Name | Configuration Path | Status (Cached) |
±-----±------------------------±----------------+
| demo | /root/.obd/cluster/demo | deployed |
±-----±------------------------±----------------+
[root@ceph02 bin]# obclient -h127.0.0.1 -uroot@sys -P2881 -c -A -Doceanbase
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221745414
Server version: OceanBase_CE 4.0.0.0 (r100000272022110114-6af7f9ae79cd0ecbafd4b1b88e2886ccdba0c3be) (Built Nov 1 2022 14:57:18)
Copyright (c) 2000, 2018, OB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]> alter user root identified by ‘abcd!QAZ’;
Query OK, 0 rows affected (0.335 sec)
[root@ceph02 bin]# obclient -h127.0.0.1 -uroot@sys -P2881 -c -A -Doceanbase -p’abcd!QAZ’
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221747664
Server version: OceanBase_CE 4.0.0.0 (r100000272022110114-6af7f9ae79cd0ecbafd4b1b88e2886ccdba0c3be) (Built Nov 1 2022 14:57:18)
Copyright (c) 2000, 2018, OB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]> \q
Bye
[root@ceph02 bin]# obclient -h127.0.0.1 -uroot@sys#demo -P2881 -c -A -Doceanbase -p’abcd!QAZ’
ERROR 1045 (42000): Access denied for user ‘root’@‘xxx.xxx.xxx.xxx’ (using password: YES)
为什么加上#demo集群名称登录就失败了?
原来如此
不过还是发现问题,连接#demo 2883的proxy,为何还报错?
[root@ceph02 bin]# obclient -h127.0.0.1 -uroot@sys#demo -P2883 -c -A -Doceanbase -p’abcd!QAZ’
ERROR 2014 (HY000): Commands out of sync; you can’t run this command now
[root@ceph02 bin]# ps -ef|grep proxy
root 21319 1 0 16:40 pts/2 00:00:00 bash /root/obproxy-ce/obproxyd.sh /root/obproxy-ce 127.0.0.1 2883 daemon
root 23644 1 4 16:49 ? 00:00:00 /root/obproxy-ce/bin/obproxy --listen_port 2883
root 23752 16746 0 16:49 pts/2 00:00:00 grep --color=auto proxy
[root@ceph02 bin]# netstat -tunlp|grep proxy
tcp 0 0 0.0.0.0:2883 0.0.0.0:* LISTEN 23644/obproxy
tcp 0 0 0.0.0.0:2884 0.0.0.0:* LISTEN 23644/obproxy
[root@ceph02 bin]# obclient -h127.0.0.1 -uroot@sys -P2883 -c -A -Doceanbase -p’abcd!QAZ’
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 1
Server version: OceanBase_CE 4.0.0.0 (r100000272022110114-6af7f9ae79cd0ecbafd4b1b88e2886ccdba0c3be) (Built Nov 1 2022 14:57:18)
Copyright (c) 2000, 2018, OB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]> \q
Bye
[root@ceph02 bin]# obclient -h127.0.0.1 -uroot@sys -P2881 -c -A -Doceanbase -p’abcd!QAZ’
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221487628
Server version: OceanBase_CE 4.0.0.0 (r100000272022110114-6af7f9ae79cd0ecbafd4b1b88e2886ccdba0c3be) (Built Nov 1 2022 14:57:18)
Copyright (c) 2000, 2018, OB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
[root@ceph02 ~]# netstat -tunlp|grep LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1831/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2108/master
tcp 0 0 0.0.0.0:2881 0.0.0.0:* LISTEN 20507/observer
tcp 0 0 0.0.0.0:2882 0.0.0.0:* LISTEN 20507/observer
tcp 0 0 0.0.0.0:2883 0.0.0.0:* LISTEN 31277/obproxy
tcp 0 0 0.0.0.0:2884 0.0.0.0:* LISTEN 31277/obproxy
tcp6 0 0 :::22 :::* LISTEN 1831/sshd
tcp6 0 0 :::8088 :::* LISTEN 21129/monagent
tcp6 0 0 ::1:25 :::* LISTEN 2108/master
tcp6 0 0 :::8089 :::* LISTEN 21129/monagent
[root@ceph02 ~]# obclient -h127.0.0.1 -uroot@sys#demo -P2883 -c -A -Doceanbase -p’abcd!QAZ’
ERROR 2002 (HY000): Can’t connect to MySQL server on ‘127.0.0.1’ (115)
[root@ceph02 ~]# obclient -h127.0.0.1 -uroot@sys -P2881 -c -A -Doceanbase -p’abcd!QAZ’
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221487629
Server version: OceanBase_CE 4.0.0.0 (r100000272022110114-6af7f9ae79cd0ecbafd4b1b88e2886ccdba0c3be) (Built Nov 1 2022 14:57:18)
Copyright (c) 2000, 2018, OB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]> \q
Bye
[root@ceph02 ~]# obd cluster list
±-------------------------------------------------+
| Cluster List |
±-----±------------------------±----------------+
| Name | Configuration Path | Status (Cached) |
±-----±------------------------±----------------+
| demo | /root/.obd/cluster/demo | deployed |
±-----±------------------------±----------------+
[root@ceph02 ~]# obd cluster start demo
Get local repositories ok
Search plugins ok
Open ssh connection ok
Load cluster param plugin ok
Check before start observer ok
Check before start obagent ok
Check before start obproxy ok
Check before start prometheus ok
Check before start grafana ok
Start observer ok
observer program health check ok
Connect to observer x
[ERROR] OBD-1006: Failed to connect to oceanbase-ce
See https://www.oceanbase.com/product/ob-deployer/error-codes .
[root@ceph02 ~]# obd cluster display demo
Deploy “demo” is deployed
See https://www.oceanbase.com/product/ob-deployer/error-codes .
[root@ceph02 ~]# obclient -h127.0.0.1 -uroot@sys -P2881 -c -A -Doceanbase -p’abcd!QAZ’
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221487640
Server version: OceanBase_CE 4.0.0.0 (r100000272022110114-6af7f9ae79cd0ecbafd4b1b88e2886ccdba0c3be) (Built Nov 1 2022 14:57:18)
Copyright (c) 2000, 2018, OB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]> \q
Bye
[root@ceph02 ~]# obclient -h127.0.0.1 -uroot@sys -P2883 -c -A -Doceanbase -p’abcd!QAZ’
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 1
Server version: OceanBase_CE 4.0.0.0 (r100000272022110114-6af7f9ae79cd0ecbafd4b1b88e2886ccdba0c3be) (Built Nov 1 2022 14:57:18)
Copyright (c) 2000, 2018, OB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient [oceanbase]> \q
Bye
[root@ceph02 ~]# obclient -h127.0.0.1 -uroot@sys#demo -P2883 -c -A -Doceanbase -p’abcd!QAZ’
ERROR 2013 (HY000): Lost connection to MySQL server at ‘handshake: reading initial communication packet’, system error: 104
[root@ceph02 ~]# netstat -tunlp|grep LISTEN|grep 28
tcp 0 0 0.0.0.0:2881 0.0.0.0:* LISTEN 20507/observer
tcp 0 0 0.0.0.0:2882 0.0.0.0:* LISTEN 20507/observer
[root@ceph02 ~]#
-bash-4.2# obclient -uroot@sys#demo -p -h192.168.20.20 -P2883
Enter password:
ERROR 2014 (HY000): Commands out of sync; you can't run this command now
-bash-4.2# obclient -uroot@sys#obcluster -p -h192.168.20.20 -P2883
Enter password:
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 6
Server version: OceanBase_CE 4.0.0.0 (r100000282022112511-dd289d2407609a88b1fcdf2be9e7c384cb8e19d0) (Built Nov 25 2022 11:58:08)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
obclient [(none)]>