oceanbase / obproxy

A proxy server for OceanBase Database.

Home Page:https://open.oceanbase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

obproxy didn't bind to listen_port

stutiredboy opened this issue · comments

for example:

bin/obproxy -o enable_strict_kernel_release=False,enable_cluster_checkout=False,syslog_level=DEBUG --listen_port 3306 --prometheus_listen_port 22884 --rs_list "192.168.1.243:3306;192.168.1.244:3306;192.168.1.245:3306"

obproxy.log showed obproxy init succ with port 3306:

[2021-06-21 17:38:05.419882] INFO  [PROXY] ob_proxy_config.cpp:46 [7932][Y0-0] [lt=3] [dc=0] | listen_port                          = 3306
[2021-06-21 17:38:05.422586] INFO  [PROXY] ob_mysql_proxy_server_main.cpp:232 [7932][Y0-0] [lt=6] [dc=0] succ init mysql proxy port by config(proxy_port={10.90.71.13:0}, port=3306})

but actually, it didn't bind to the listen_port, instead it used a random port(after reboot obproxy, the port will change)

image

This bug may caused by these commits:

image

commits before de1c5e3 is ok.

5d57e2a

commit in src/obproxy/iocore/net/ob_inet.h may be the root cause of this sistuation.

fixed