手动部署configserver后,启动obproxy无法正确连接

【 使用环境 】
测试环境

【 组件 】
config server tool
obproxy

【 使用版本 】
config server-master-8585d2d869bf46b504c4f1600c54ab1ebd4d6e9b
obproxy-3.2.3.5

【诉求】

  1. 自己编译运行config server并注册启动的方式是否可行?
  2. 如果可行的话想请教一下为何proxy无法正常连接observer?

【问题描述】
使用config server的形式启动obproxy后,无法进行连接。报错提示找不到集群。
通过报错看到时curl出错了(直接在这台主机上运行curl命令请求接口是有数据返回的)

bash-4.2$ cat log/obproxy.log|grep "WARN"
[2022-12-05 16:35:25.347930] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [23261][Y0-0] [lt=22] [dc=0] curl easy perform failed(cc=1)
[2022-12-05 16:35:25.347961] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [23261][Y0-0] [lt=31] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster'&VersionOnly=true")
[2022-12-05 16:35:25.348006] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [23261][Y0-0] [lt=7] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster'&VersionOnly=true", is_inited_=false, ret=-4216)
[2022-12-05 16:35:25.348104] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [23261][Y0-0] [lt=13] [dc=0] curl easy perform failed(cc=1)
[2022-12-05 16:35:25.348120] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [23261][Y0-0] [lt=15] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster'&VersionOnly=true")
[2022-12-05 16:35:25.348167] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [23261][Y0-0] [lt=11] [dc=0] fail to fetch json info(try attempts:=1, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster'&VersionOnly=true", is_inited_=false, ret=-4216)
[2022-12-05 16:35:25.348283] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [23261][Y0-0] [lt=24] [dc=0] curl easy perform failed(cc=1)
[2022-12-05 16:35:25.348300] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [23261][Y0-0] [lt=16] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster'&VersionOnly=true")
[2022-12-05 16:35:25.348343] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [23261][Y0-0] [lt=8] [dc=0] fail to fetch json info(try attempts:=2, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster'&VersionOnly=true", is_inited_=false, ret=-4216)
[2022-12-05 16:35:25.348359] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [23261][Y0-0] [lt=14] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-05 16:35:25.348372] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [23261][Y0-0] [lt=9] [dc=0] fail to get json config version(ret=-4216)
[2022-12-05 16:35:25.348377] WARN  [PROXY] init (ob_config_server_processor.cpp:156) [23261][Y0-0] [lt=4] [dc=0] fail to get json config info from remote config server, try load local file and schedule a timer task to update later(ret=-4216)
[2022-12-05 16:35:31.208070] WARN  [PROXY] get_cluster_info (ob_config_server_processor.cpp:675) [23261][Y0-7F98658BE4E0] [lt=22] [dc=0] cluster_name do not exists in current proxy(cluster_name=obcluster, ret=-4018)
[2022-12-05 16:35:31.208107] WARN  [PROXY.SM] setup_get_cluster_resource (ob_mysql_sm.cpp:1467) [23261][Y0-7F98658BE4E0] [lt=28] [dc=0] cluster does not exist, this connection will disconnect(sm_id=1, is_clustername_from_default=false, cluster_name=obcluster, ret=-4669)
[2022-12-05 16:35:31.208171] WARN  [PROXY.TXN] handle_error_jump (ob_mysql_transact.cpp:65) [23261][Y0-7F98658BE4E0] [lt=16] [dc=0] [ObMysqlTransact::handle_error_jump]

OB server的集群名

obclient [oceanbase]> select * from v$ob_cluster;
+------------+--------------+----------------------------+--------------+----------------+-------------+-------------------+-----------------+------------------+----------------------------+--------------------+---------------------+---------------------+------------------------+
| cluster_id | cluster_name | created                    | cluster_role | cluster_status | switchover# | switchover_status | switchover_info | current_scn      | standby_became_primary_scn | primary_cluster_id | protection_mode     | protection_level    | redo_transport_options |
+------------+--------------+----------------------------+--------------+----------------+-------------+-------------------+-----------------+------------------+----------------------------+--------------------+---------------------+---------------------+------------------------+
|          1 | obcluster    | 2022-12-01 18:38:37.429949 | PRIMARY      | VALID          |           0 | NOT ALLOWED       |                 | 1670225703806837 |                          0 |               NULL | MAXIMUM PERFORMANCE | MAXIMUM PERFORMANCE |                        |
+------------+--------------+----------------------------+--------------+----------------+-------------+-------------------+-----------------+------------------+----------------------------+--------------------+---------------------+---------------------+------------------------+
1 row in set (0.018 sec)

OBproxy启动命令

./bin/obproxy -p 2883 -n mycluster -o "prometheus_sync_interval=1s,obproxy_config_server_url='http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster',prometheus_listen_port=2884,enable_metadb_used=false,skip_proxy_sys_private_check=true,log_dir_size_threshold=10G,proxy_mem_limited=2G,enable_proxy_scramble=true,enable_strict_kernel_release=false"

config server API返回结果(在proxy的主机上执行)

bash-4.2$ curl http://192.168.2.42:8088/services?Action=GetObProxyConfig
{"Code":200,"Message":"successful","Success":true,"Data":{"ObProxyBinUrl":"http://192.168.2.42:8088/client?Action=GetObProxy","ObProxyDatabaseInfo":{"DataBase":"***","MetaDataBase":"http://192.168.2.42:8088/services?Action=ObRootServiceInfo&User_ID=alibaba&UID=admin&ObRegion=obdv1","Password":"***","User":"***"},"ObRootServiceInfoUrlList":[{"ObRegion":"obcluster","ObRootServiceInfoUrl":"http://192.168.2.42:8088/services?Action=ObRootServiceInfo&ObCluster=obcluster"}],"Version":"5d8e7d10c75b4ee7408fe0347f5037aa"},"Trace":"80fd00d77529c3f2","Server":"192.168.2.42","Cost":7}

【复现路径】

  1. 拉取https://github.com/oceanbase/oceanbase/tree/master/tools/ob-configserver仓库,编译并运行config server

  2. 注册OBserver集群

POST 127.0.0.1:8088/services?Action=ObRootServiceInfo&ObCluster=obcluster&ObRegion=obcluster
Request body:
{
	"ObClusterId": 1,
	"ObCluster": "obcluster",
	"ObRegion": "sys_region",
	"ReadonlyRsList": [],
	"RsList": [{
		"address": "172.20.134.1:2882",
		"role": "LEADER",
		"sql_port": 2881
	},{
		"address": "172.20.134.2:2882",
		"role": "FOLLOWER",
		"sql_port": 2881
	}],
	"Type": "PRIMARY"
}

Response body:
{"Code":200,"Message":"successful","Success":true,"Data":"successful","Trace":"5428b3e69924dee2","Server":"192.168.2.42","Cost":23}
  1. 启动obproxy
./bin/obproxy -p 2883 -n mycluster -o "prometheus_sync_interval=1s,obproxy_config_server_url='http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster',prometheus_listen_port=2884,enable_metadb_used=false,skip_proxy_sys_private_check=true,log_dir_size_threshold=10G,proxy_mem_limited=2G,enable_proxy_scramble=true,enable_strict_kernel_release=false"
  1. 通过proxy连接observer,连接失败
1 个赞

注册ob集群的信息是通过手动调用的POST请求吗,可以在OB集群内设置obconfig_url这个参数,然后rs切主一次,(alter system switch rootservice leader server ‘1.1.1.1:2882’ ), 会触发自动汇报rs信息到configserver

好的我试试,感谢!

OBserver设置config server URL并切换leader

obclient [oceanbase]> alter system set obconfig_url = 'http://192.168.2.42:8088/services?Action=ObRootServiceInfo&ObCluster=obcluster';
Query OK, 0 rows affected (0.078 sec)

obclient [oceanbase]> ALTER SYSTEM SWITCH ROOTSERVICE LEADER server '172.20.134.2:2882';
Query OK, 0 rows affected (0.004 sec)

查看config server的日志,发现一些HTTP 500的错误:

2022-12-05T18:28:21.66393+08:00 INFO [30918,0553a5542a956d18] caller=server/handler.go:61:func1: response: {"Code":500,"Message":"got internal error: get all rootservice info for cluster obcluster:0: query ob clusters from db: dial tcp 10.186.65.53:25690: connect: operation timed out","Success":false,"Data":null,"Trace":"0553a5542a956d18","Server":"192.168.2.42","Cost":15093}
2022-12-05T18:28:22.05926+08:00 INFO [30918,a0903dbc546f2452] caller=server/handler.go:61:func1: response: {"Code":500,"Message":"got internal error: get all rootservice info for cluster obcluster:0: query ob clusters from db: dial tcp 10.186.65.53:25690: connect: operation timed out","Success":false,"Data":null,"Trace":"a0903dbc546f2452","Server":"192.168.2.42","Cost":15095}
2022-12-05T18:28:22.43934+08:00 INFO [30918,9cce63231d3881e1] caller=server/handler.go:61:func1: response: {"Code":500,"Message":"got internal error: get all rootservice info for cluster obcluster:0: query ob clusters from db: dial tcp 10.186.65.53:25690: connect: operation timed out","Success":false,"Data":null,"Trace":"9cce63231d3881e1","Server":"192.168.2.42","Cost":15098}
2022-12-05T18:28:22.74174+08:00 INFO [30918,5c9e78b33650623f] caller=server/handler.go:61:func1: response: {"Code":500,"Message":"got internal error: get all rootservice info for cluster obcluster:0: query ob clusters from db: dial tcp 10.186.65.53:25690: connect: operation timed out","Success":false,"Data":null,"Trace":"5c9e78b33650623f","Server":"192.168.2.42","Cost":15097}
2022-12-05T18:28:27.94285+08:00 INFO [30918,f5e2e0117d59c94c] caller=server/observer_handler.go:232:getObRootServiceInfo: return primary ob cluster
2022-12-05T18:28:27.94601+08:00 INFO [30918,f5e2e0117d59c94c] caller=server/handler.go:61:func1: response: {"Code":200,"Message":"successful","Success":true,"Data":{"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.2:2882","role":"LEADER","sql_port":2881},{"address":"172.20.134.1:2882","role":"FOLLOWER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670236080485826},"Trace":"f5e2e0117d59c94c","Server":"192.168.2.42","Cost":22045}
2022-12-05T18:28:33.19167+08:00 INFO [30918,0d5906e11651d9cd] caller=server/handler.go:50:func1: handle request: POST /services?Action=ObRootServiceInfo&ObCluster=obcluster&version=2&ObClusterId=1
2022-12-05T18:28:33.19245+08:00 INFO [30918,0d5906e11651d9cd] caller=server/observer_handler.go:268:createOrUpdateObRootServiceInfo: store rootservice info {"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.1:2882","role":"LEADER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670236112205227}
2022-12-05T18:28:33.20923+08:00 INFO [30918,0d5906e11651d9cd] caller=server/handler.go:61:func1: response: {"Code":200,"Message":"successful","Success":true,"Data":"successful","Trace":"0d5906e11651d9cd","Server":"192.168.2.42","Cost":12}
2022-12-05T18:28:33.30808+08:00 INFO [30918,bcf7e3b7b77fccd8] caller=server/handler.go:50:func1: handle request: POST /services?Action=ObRootServiceInfo&ObCluster=obcluster&version=2&ObClusterId=1
2022-12-05T18:28:33.30872+08:00 INFO [30918,bcf7e3b7b77fccd8] caller=server/observer_handler.go:268:createOrUpdateObRootServiceInfo: store rootservice info {"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.1:2882","role":"LEADER","sql_port":2881},{"address":"172.20.134.2:2882","role":"FOLLOWER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670236113333913}
2022-12-05T18:28:33.32437+08:00 INFO [30918,bcf7e3b7b77fccd8] caller=server/handler.go:61:func1: response: {"Code":200,"Message":"successful","Success":true,"Data":"successful","Trace":"bcf7e3b7b77fccd8","Server":"192.168.2.42","Cost":14}
2022-12-05T18:28:33.34805+08:00 INFO [30918,0dc81f4701f814b3] caller=server/handler.go:50:func1: handle request: POST /services?Action=ObRootServiceInfo&ObCluster=obcluster&version=2&ObClusterId=1
2022-12-05T18:28:33.34852+08:00 INFO [30918,0dc81f4701f814b3] caller=server/observer_handler.go:268:createOrUpdateObRootServiceInfo: store rootservice info {"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.1:2882","role":"LEADER","sql_port":2881},{"address":"172.20.134.2:2882","role":"FOLLOWER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670236113375348}
2022-12-05T18:28:33.34877+08:00 INFO [30918,e468e65e1acb550b] caller=server/handler.go:50:func1: handle request: POST /services?Action=ObRootServiceInfo&ObCluster=obcluster&version=2&ObClusterId=1
2022-12-05T18:28:33.34913+08:00 INFO [30918,e468e65e1acb550b] caller=server/observer_handler.go:268:createOrUpdateObRootServiceInfo: store rootservice info {"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.1:2882","role":"LEADER","sql_port":2881},{"address":"172.20.134.2:2882","role":"FOLLOWER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670236113376231}
2022-12-05T18:28:33.36037+08:00 INFO [30918,0dc81f4701f814b3] caller=server/handler.go:61:func1: response: {"Code":200,"Message":"successful","Success":true,"Data":"successful","Trace":"0dc81f4701f814b3","Server":"192.168.2.42","Cost":12}
2022-12-05T18:28:33.37602+08:00 INFO [30918,e468e65e1acb550b] caller=server/handler.go:61:func1: response: {"Code":200,"Message":"successful","Success":true,"Data":"successful","Trace":"e468e65e1acb550b","Server":"192.168.2.42","Cost":26}
2022-12-05T18:28:38.95697+08:00 INFO [30918,a719f6c94e680ab7] caller=server/observer_handler.go:232:getObRootServiceInfo: return primary ob cluster
2022-12-05T18:28:38.95881+08:00 INFO [30918,a719f6c94e680ab7] caller=server/handler.go:61:func1: response: {"Code":200,"Message":"successful","Success":true,"Data":{"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.1:2882","role":"LEADER","sql_port":2881},{"address":"172.20.134.2:2882","role":"FOLLOWER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670236113376231},"Trace":"a719f6c94e680ab7","Server":"192.168.2.42","Cost":34128}
2022-12-05T18:28:43.78593+08:00 INFO [30918,1623e0b2bc45ea17] caller=server/handler.go:50:func1: handle request: GET /services?Action=ObRootServiceInfo&ObCluster=obcluster
2022-12-05T18:28:43.7863+08:00 INFO [30918,1623e0b2bc45ea17] caller=server/observer_handler.go:195:getRootServiceInfoList: query ob clusters with obcluster obcluster
2022-12-05T18:28:43.79423+08:00 INFO [30918,1623e0b2bc45ea17] caller=server/observer_handler.go:232:getObRootServiceInfo: return primary ob cluster
2022-12-05T18:28:43.80019+08:00 INFO [30918,1623e0b2bc45ea17] caller=server/handler.go:61:func1: response: {"Code":200,"Message":"successful","Success":true,"Data":{"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.1:2882","role":"LEADER","sql_port":2881},{"address":"172.20.134.2:2882","role":"FOLLOWER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670236113376231},"Trace":"1623e0b2bc45ea17","Server":"192.168.2.42","Cost":8}
2022-12-05T18:30:47.75877+08:00 INFO [30918,605cd2bfff11bfd7] caller=server/handler.go:50:func1: handle request: GET /services?Action=ObRootServiceInfo&ObCluster=obcluster
2022-12-05T18:30:47.76057+08:00 INFO [30918,605cd2bfff11bfd7] caller=server/observer_handler.go:195:getRootServiceInfoList: query ob clusters with obcluster obcluster
2022-12-05T18:30:47.77004+08:00 INFO [30918,605cd2bfff11bfd7] caller=server/observer_handler.go:232:getObRootServiceInfo: return primary ob cluster
2022-12-05T18:30:47.77449+08:00 INFO [30918,605cd2bfff11bfd7] caller=server/handler.go:61:func1: response: {"Code":200,"Message":"successful","Success":true,"Data":{"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.1:2882","role":"LEADER","sql_port":2881},{"address":"172.20.134.2:2882","role":"FOLLOWER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670236113376231},"Trace":"605cd2bfff11bfd7","Server":"192.168.2.42","Cost":12}
2022-12-05T18:34:33.81298+08:00 INFO [30918,297ca02009e87aec] caller=server/handler.go:50:func1: handle request: GET /services?Action=ObRootServiceInfo&ObCluster=obcluster&version=2
2022-12-05T18:34:33.81399+08:00 INFO [30918,297ca02009e87aec] caller=server/observer_handler.go:195:getRootServiceInfoList: query ob clusters with obcluster obcluster
2022-12-05T18:34:33.82823+08:00 INFO [30918,297ca02009e87aec] caller=server/observer_handler.go:235:getObRootServiceInfo: return all ob clusters
2022-12-05T18:34:33.82907+08:00 INFO [30918,297ca02009e87aec] caller=server/handler.go:61:func1: response: {"Code":200,"Message":"successful","Success":true,"Data":[{"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.1:2882","role":"LEADER","sql_port":2881},{"address":"172.20.134.2:2882","role":"FOLLOWER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670236113376231}],"Trace":"297ca02009e87aec","Server":"192.168.2.42","Cost":15}

尝试使用proxy访问OBserver,报错还是之前那样

sh-4.2# obclient -h172.20.134.1 -P2883 -uroot@sys#obcluster -p -c -A oceanbase
Enter password:
ERROR 4669 (HY000): cluster not exist
[2022-12-05 18:29:42.544340] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [23299][Y0-7F9870AACD30] [lt=60] [dc=0] fail to do repeat task(this={this:0x131f94c0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:31167866, timeout_action:null, pending_action:0x7f9865aa7e60, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-05 18:30:10.704978] WARN  [PROXY] get_cluster_info (ob_config_server_processor.cpp:675) [23261][Y0-7F98654BE4E0] [lt=43] [dc=0] cluster_name do not exists in current proxy(cluster_name=obcluster, ret=-4018)
[2022-12-05 18:30:10.705053] WARN  [PROXY.SM] setup_get_cluster_resource (ob_mysql_sm.cpp:1467) [23261][Y0-7F98654BE4E0] [lt=65] [dc=0] cluster does not exist, this connection will disconnect(sm_id=2, is_clustername_from_default=false, cluster_name=obcluster, ret=-4669)
[2022-12-05 18:30:10.705192] WARN  [PROXY.TXN] handle_error_jump (ob_mysql_transact.cpp:65) [23261][Y0-7F98654BE4E0] [lt=25] [dc=0] [ObMysqlTransact::handle_error_jump]
[2022-12-05 18:30:13.712011] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [23299][Y0-7F9870AACD30] [lt=63] [dc=0] curl easy perform failed(cc=1)
[2022-12-05 18:30:13.712072] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [23299][Y0-7F9870AACD30] [lt=61] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster'&VersionOnly=true")
[2022-12-05 18:30:13.712211] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [23299][Y0-7F9870AACD30] [lt=37] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=mycluster'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-05 18:30:13.712244] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [23299][Y0-7F9870AACD30] [lt=32] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-05 18:30:13.712306] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [23299][Y0-7F9870AACD30] [lt=49] [dc=0] fail to get json config version(ret=-4216)
[2022-12-05 18:30:13.712366] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [23299][Y0-7F9870AACD30] [lt=57] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-05 18:30:13.712398] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [23299][Y0-7F9870AACD30] [lt=31] [dc=0] fail to do repeat task(this={this:0x131f94c0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:31167866, timeout_action:null, pending_action:0x7f9865aa7f20, cb_cont:null, submit_thread:NULL}, ret=-4216)
1 个赞


观察发现obproxy启动并尝试连接后configserver并没有打印任何请求信息

1 个赞

登录obproxy的 root@proxysys 下查看一下:
mysql -h${obproxy_ip} -P${obproxy_port} -uroot@proxysys -pxxx
show proxyconfig like ‘enable_cluster_checkout’;
看看当前该配置项如果是false的话,登录的时候就不能加上“#集群名”了。

1 个赞

确认了下,值为True

sh-4.2# obclient -h172.20.134.1 -P2883 -uroot@proxysys -p -c -A oceanbase
Enter password:
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 5
Server version: 5.6.25

Copyright (c) 2000, 2022, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

obclient [oceanbase]> show proxyconfig like ‘enable_cluster_checkout’;
+-------------------------+-------+----------------------------------------------------------------------------------------------+-------------+---------------+
| name                    | value | info                                                                                         | need_reboot | visible_level |
+-------------------------+-------+----------------------------------------------------------------------------------------------+-------------+---------------+
| enable_cluster_checkout | True  | if enable cluster checkout, proxy will send cluster name when login and server will check it | false       | USER          |
+-------------------------+-------+----------------------------------------------------------------------------------------------+-------------+---------------+
1 row in set (0.003 sec)
1 个赞

curl 一下obconfig_url设置的那个url地址,能正确的返回rs信息了吗

1 个赞

可以正确返回的,这是在部署proxy的机器上执行的CURL

sh-4.2# curl "http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy"
{"Code":200,"Message":"successful","Success":true,"Data":{"ObProxyBinUrl":"http://192.168.2.42:8088/client?Action=GetObProxy","ObProxyDatabaseInfo":{"DataBase":"***","MetaDataBase":"http://192.168.2.42:8088/services?Action=ObRootServiceInfo&User_ID=alibaba&UID=admin&ObRegion=obdv1","Password":"***","User":"***"},"ObRootServiceInfoUrlList":[{"ObRegion":"obcluster","ObRootServiceInfoUrl":"http://192.168.2.42:8088/services?Action=ObRootServiceInfo&ObCluster=obcluster"}],"Version":"5d8e7d10c75b4ee7408fe0347f5037aa"},"Trace":"6a2ad408b7ac8b62","Server":"192.168.2.42","Cost":19}
sh-4.2# curl "http://192.168.2.42:8088/services?Action=ObRootServiceInfo&ObCluster=obcluster"
{"Code":200,"Message":"successful","Success":true,"Data":{"ObClusterId":1,"ObRegionId":1,"ObCluster":"obcluster","ObRegion":"obcluster","ReadonlyRsList":[],"RsList":[{"address":"172.20.134.1:2882","role":"LEADER","sql_port":2881},{"address":"172.20.134.2:2882","role":"FOLLOWER","sql_port":2881}],"Type":"PRIMARY","timestamp":1670404032594817},"Trace":"2cfb5cb5455aa792","Server":"192.168.2.42","Cost":18}
sh-4.2#
1 个赞

obproxy 中是否一直在刷请求configserver的日志呢,现在configserver的日志中有看到调用
curl “http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy
这个接口的吗,如果没有访问成功configserver,应该是没办法获取到rs_list

1 个赞

是的没错,一直在刷,但是都没有成功:

[2022-12-08 09:49:25.224913] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=4] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138e60, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:50:19.708462] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=8] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:50:19.708653] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=184] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:50:19.708798] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=74] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:50:19.708858] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=51] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:50:19.708912] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=45] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:50:19.708951] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=30] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:50:19.709012] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=41] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138f80, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:51:14.190423] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=68] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:51:14.190469] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=46] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:51:14.190532] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=14] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:51:14.190541] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=8] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:51:14.190550] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=6] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:51:14.190574] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=22] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:51:14.190586] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=11] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138e60, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:52:08.671437] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=4] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:52:08.671462] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=24] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:52:08.671508] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=6] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:52:08.671519] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=10] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:52:08.671530] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=8] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:52:08.671535] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=3] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:52:08.671540] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=4] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138ec0, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:53:03.152345] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=13] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:53:03.152393] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=46] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:53:03.152455] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=13] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:53:03.152478] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=23] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:53:03.152485] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=5] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:53:03.152490] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=4] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:53:03.152501] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=10] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138e60, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:53:57.634103] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=6] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:53:57.634118] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=15] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:53:57.634186] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=18] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:53:57.634195] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=8] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:53:57.634204] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=7] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:53:57.634225] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=20] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:53:57.634232] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=7] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138ec0, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:54:52.114461] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=14] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:54:52.114542] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=80] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:54:52.114605] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=13] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:54:52.114619] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=13] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:54:52.114687] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=64] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:54:52.114694] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=5] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:54:52.114701] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=6] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138f80, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:55:46.598474] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=6] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:55:46.598644] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=162] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:55:46.598810] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=76] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:55:46.598896] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=79] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:55:46.598969] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=61] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:55:46.599025] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=48] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:55:46.599092] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=49] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138ec0, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:56:41.078634] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=89] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:56:41.078679] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=44] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:56:41.078744] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=17] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:56:41.078758] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=13] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:56:41.078767] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=5] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:56:41.078778] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=8] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:56:41.078789] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=10] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138f80, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:57:35.563232] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=4] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:57:35.563257] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=24] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:57:35.563302] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=9] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:57:35.563313] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=11] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:57:35.563326] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=10] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:57:35.563336] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=8] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:57:35.563341] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=5] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138e00, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:58:30.045422] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=14] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:58:30.045474] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=51] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:58:30.045786] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=23] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:58:30.045826] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=39] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:58:30.045848] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=19] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:58:30.045857] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=7] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:58:30.045872] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=14] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138ec0, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 09:59:24.527434] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=7] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 09:59:24.527450] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=15] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 09:59:24.527513] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=19] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 09:59:24.527526] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=13] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 09:59:24.527533] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=5] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 09:59:24.527542] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=8] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 09:59:24.527551] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=8] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138e60, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 10:00:19.008799] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=9] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 10:00:19.008852] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=52] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 10:00:19.008919] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=27] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 10:00:19.008936] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=16] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 10:00:19.008947] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=9] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 10:00:19.008956] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=8] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 10:00:19.008961] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=4] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138ec0, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 10:01:13.492892] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=7] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 10:01:13.493016] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=119] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 10:01:13.493110] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=44] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 10:01:13.493141] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=27] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 10:01:13.493176] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=27] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 10:01:13.493201] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=20] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 10:01:13.493240] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=25] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138e00, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 10:02:07.979423] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=70] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 10:02:07.979473] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=48] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 10:02:07.979542] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=21] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 10:02:07.979554] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=12] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 10:02:07.979572] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=15] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 10:02:07.979609] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=35] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 10:02:07.979621] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=7] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138f80, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 10:03:02.460546] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=7] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 10:03:02.460581] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=34] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 10:03:02.460626] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=8] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 10:03:02.460638] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=12] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 10:03:02.460649] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=9] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 10:03:02.460654] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=4] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 10:03:02.460664] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=9] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138e00, cb_cont:null, submit_thread:NULL}, ret=-4216)
[2022-12-08 10:03:56.941579] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2178) [1926][Y0-7F397313DD30] [lt=14] [dc=0] curl easy perform failed(cc=1)
[2022-12-08 10:03:56.941630] WARN  [PROXY] fetch_by_curl (ob_config_server_processor.cpp:2195) [1926][Y0-7F397313DD30] [lt=50] [dc=0] curl error(curl_error_code=1, curl_error_message="Error", ret=-4216, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true")
[2022-12-08 10:03:56.941713] WARN  [PROXY] do_fetch_json_info (ob_config_server_processor.cpp:2026) [1926][Y0-7F397313DD30] [lt=30] [dc=0] fail to fetch json info(try attempts:=0, url="'http://192.168.2.42:8088/services?Action=GetObProxyConfig&ObproxyClusterName=myproxy'&VersionOnly=true", is_inited_=true, ret=-4216)
[2022-12-08 10:03:56.941735] WARN  [PROXY] get_json_config_info (ob_config_server_processor.cpp:1826) [1926][Y0-7F397313DD30] [lt=21] [dc=0] fail to fetch json info(try_attempts=0, buf_count=1, ret=-4216)
[2022-12-08 10:03:56.941746] WARN  [PROXY] refresh_json_config_info (ob_config_server_processor.cpp:1757) [1926][Y0-7F397313DD30] [lt=7] [dc=0] fail to get json config version(ret=-4216)
[2022-12-08 10:03:56.941763] WARN  [PROXY] refresh_config_server (ob_config_server_processor.cpp:2377) [1926][Y0-7F397313DD30] [lt=15] [dc=0] fail to do refresh json config info(force_refresh=false, ret=-4216)
[2022-12-08 10:03:56.941777] WARN  [PROXY] handle_repeat_task (ob_async_common_task.cpp:284) [1926][Y0-7F397313DD30] [lt=12] [dc=0] fail to do repeat task(this={this:0x11d094a0, task_name:"config_server_refresh_task", terminate:false, need_callback:false, is_repeat:false, is_stop:false, interval_us:54481408, timeout_action:null, pending_action:0x7f3968138e60, cb_cont:null, submit_thread:NULL}, ret=-4216)

而且ob server这边的ob-configserver.log并没有发现有对应时间点的GET请求进来

那应该是一直没有收到请求,ps -ef|grep obproxy看一下这个进程的启动命令
还有看一下obproxy安装目录下etc目录里面的obproxy.config.bin
可以用这个命令查看里面的内容
strings obproxy_config.bin

1 个赞

找到问题了,麻烦老师了,补充一下结论:
第一次启动proxy使用的是RSlist的形式,此时可以连接成功。
第二次启动为configserver URL的形式,通过strings obproxy_config.bin看到RSlist与configserver URL同时存在于配置文件内

解决方法:
删除proxy后重启安装,采用configserver URL的形式启动,连接成功

:+1: :+1: :+1: :+1: :+1: