【 使用环境 】 测试环境
【 使用版本 】4.2.1
【问题描述】从官网下载了rpm文件安装后,/obproxy -p 2883 -r’192.168.2.151:2881;192.168.2.152:2881;192.168.2.153:2881’ -n test -o enable_cluster_checkout=false,syslog_level=INFO 发命令后,进程没有,也没有log产生
可以参考这个文档重新操作下,看你启动的命令缺少-c参数,再检查是否有遗漏的地方。
https://www.oceanbase.com/docs/community-odp-cn-1000000000079256
./obproxy -p 2883 -r 192.168.2.151:2881;192.168.2.152:2881;192.168.2.153:2881 -c myoceanbase -o enable_strict_kernel_release=false,work_thread_num=8 用这个后,进程有了,telnet端口也通,但是用obclient连不上,提示:#obclient -h192.168.2.153 -P2883 -uroot -p’N@n2236607’
ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading authorization packet’, system error: 11
./bin/obproxy -p 2883 -r’10.10.10.1:2881;10.10.10.2:2881;10.10.10.3:2881’ -o observer_sys_password=$sha1_value,obproxy_sys_password=$sha1_value,enable_cluster_checkout=false -n test -c mycluster
observer_sys_password=$sha1_value,obproxy_sys_password=$sha1_value缺少这部分吧
修改 OBProxy 管理员(root@proxysys)的密码
alter proxyconfig set obproxy_sys_password=‘N@n2236607’;
alter proxyconfig set observer_sys_password=‘N@n2236607’;
./bin/obproxy -p 2883 -r ‘192.168.2.151:2881;192.168.2.152:2881;192.168.2.153:2881’ -o observer_sys_password=‘N@n2236607’,obproxy_sys_password=‘N@n2236607’,enable_cluster_checkout=false -n testoceanbase -c myoceanbase
连接后提示:#mysql -h192.168.2.153 -P2883 -uroot@sys -pN@n2236607 -A -c
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading authorization packet’, system error: 0
没有创建proxy租户,目前系统只有sys和ocp这2个租户。您给的链接我看过了,还是连不上
试过了也不行,telnet localhost 2883
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
J
5.6.25aaaaaaaa 端口看上去是通的,就是连不上,密码也改成一样的了。
启动命令是:bin/obproxy -p2883 -c obcluster -r “192.168.2.151:2881” -o “enable_cluster_checkout=false,enable_strict_kernel_release=false,enable_metadb_used=false” -c myoceanbase
进程显示 :
ps -ef | grep obproxy
admin 31648 1 2 09:15 ? 00:00:00 bin/obproxy -p2883 -c obcluster -r 192.168.2.151:2881 -o enable_cluster_checkout=false,enable_strict_kernel_release=false,enable_metadb_used=false -c myoceanbase
admin 31668 31540 0 09:15 pts/0 00:00:00 grep --color=auto obproxy
不折腾了,还是安装个通用的代理简单。docker run -p 7432:7432 -d --name haproxy -v /data/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg --privileged=true haproxy