ODC连接报错:unexpected end of stream, read 0 bytes from 4 (socket was closed by server)

【产品名称】ODC

【产品版本】客户端版本3.3.1 (3.3.1)

【问题描述】

执行 SQL 失败,错误详情:Could not connect to address=(host=10.186.17.104)(port=22881)(type=master) : Could not connect to 10.186.17.104:22881 : unexpected end of stream, read 0 bytes from 4 (socket was closed by server)

客户端可以直接连接

您好,请问使用ODC连接Oceanbase mysql模式是否为通过obproxy,如果是的话,请在黑屏连接下检查以下参数

-- 查看当前配置
show proxyconfig like 'client_sock_option_flag_out';
show proxyconfig like 'client_tcp%';


需要确保

client_tcp_user_timeout > client_tcp_keepintvl


 同时关于proxy推荐以下配置

alter proxyconfig set client_sock_option_flag_out=2
alter proxyconfig set client_tcp_keepidle=5
alter proxyconfig set client_tcp_keepintvl=5
alter proxyconfig set client_tcp_keepcnt=5
alter proxyconfig set client_tcp_user_timeout=0

直连的observer,没有部署obproxy