【江湖救命】ob + oblogproxy + flinkcdc 报错:LogProxy refused handshake request: code: 1 message: "Failed to create oblogreader"

【 使用环境 】测试环境
【 OB or 其他组件 】ob + oblogproxy + flinkcdc
【 使用版本 】ob:3.2.4 oblogproxy:2.0.0 flinkcdc:2.3.0
flink版本:1.14.4 (flink on yarn模式)
flink-sql-connector-oceanbase-cdc-2.3.0.jar
【问题描述】
使用flink-sql-connector-oceanbase-cdc-2.3.0.jar,在flink客户端创建虚拟表关联oceanbase表,查询失败
【复现路径】
1.部署新的ob(3.2.4)集群,创建了新库新表,使用租户sys,创建了用户wzs
2.部署oblogproxy(2.0.0),启动正常,日志正常,部署节点:192.168.17.1
3.flink-sql启动脚本:sql-client.sh
执行sql如下:
SET ‘execution.checkpointing.interval’ = ‘3s’;
SET table.local-time-zone = Asia/Shanghai;
CREATE TABLE person (
id INT,
name STRING
) WITH (
‘connector’ = ‘oceanbase-cdc’,
‘scan.startup.mode’ = ‘initial’,
‘username’ = ‘wzs@sys’,
‘password’ = ‘wzs’,
‘tenant-name’ = ‘sys’,
‘database-name’ = ‘cdc_test’,
‘table-name’ = ‘person’,
‘hostname’ = ‘192.168.17.1’,
‘port’ = ‘2881’,
‘rootserver-list’ = ‘192.168.17.1:2882:2881;192.168.17.2:2882:2881;192.168.17.3:2882:2881’,
‘logproxy.host’ = ‘192.168.17.1’,
‘logproxy.port’ = ‘2983’,
‘working-mode’ = ‘memory’
);
4. 查看flink页面,发现报错如下:
2023-12-21 18:54:38,927 ERROR com.oceanbase.clogproxy.client.connection.ClientHandler [] - LogProxy refused handshake request: code: 1
message: “Failed to create oblogreader”

2023-12-21 18:54:38,927 ERROR com.oceanbase.clogproxy.client.connection.ClientHandler [] - Exception occurred ClientId: 192.168.17.4_21197_1703155900_1_sys: rootserver_list=192.168.17.1:2882:2881;192.168.17.2:2882:2881;192.168.17.3:2882:2881, cluster_user=wzs@sys, cluster_password=******, tb_white_list=sys.cdc_test.person|sys.cdc_test.person2, tb_black_list=|, start_timestamp=0, timezone=+00:00, working_mode=memory, with LogProxy: 192.168.17.1:2983
com.oceanbase.clogproxy.client.exception.LogProxyClientException: LogProxy refused handshake request: code: 1
message: “Failed to create oblogreader”

at com.oceanbase.clogproxy.client.connection.ClientHandler.handleErrorResponse(ClientHandler.java:217) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at com.oceanbase.clogproxy.client.connection.ClientHandler.channelRead(ClientHandler.java:147) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_181]

2023-12-21 18:54:38,928 INFO com.oceanbase.clogproxy.client.connection.ClientStream [] - Try to stop this client
2023-12-21 18:54:40,565 INFO com.oceanbase.clogproxy.client.connection.ClientStream [] - Client process thread exit
2023-12-21 18:54:40,565 INFO com.oceanbase.clogproxy.client.connection.ClientStream [] - Client stopped successfully
2023-12-21 18:54:40,566 INFO com.oceanbase.clogproxy.client.connection.ClientHandler [] - Channel closed with ClientId: 192.168.17.4_21197_1703155900_1_sys, LogProxy: 192.168.17.1:2983
2023-12-21 18:54:40,566 ERROR com.ververica.cdc.connectors.oceanbase.source.OceanBaseRichSourceFunction [] - LogProxyClient exception
com.oceanbase.clogproxy.client.exception.LogProxyClientException: LogProxy refused handshake request: code: 1
message: “Failed to create oblogreader”

at com.oceanbase.clogproxy.client.connection.ClientHandler.handleErrorResponse(ClientHandler.java:217) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at com.oceanbase.clogproxy.client.connection.ClientHandler.channelRead(ClientHandler.java:147) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[flink-sql-connector-oceanbase-cdc-2.3.0.jar:2.3.0]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_181]
          5. flink客户端报错:
              [ERROR] Could not execute SQL statement. Reason:

java.util.concurrent.TimeoutException: Timeout to receive messages in RecordListener

可以用这个 demo 包先验证下部署环境是不是正常 FAQ_ZH · oceanbase/oblogproxy Wiki · GitHub

另外看 observer 的版本是企业版的,社区版的 oblogproxy 是不适配的,要用企业版。

好,我试一下
是企业版的,我在本地做适配

你好,我这边oblogproxy是社区版的,企业版的在哪里下载呢

demo的报错如下:ERROR 21460 — [ Thread-5] com.oceanbase.oblogclient.Client : LogProxy refused handshake request: code: 1
message: “Failed to create oblogreader”

和客户端错误一致

切换ob版本至3.1.5(社区版本)后,问题解决,应该就是我使用了ob3.2.4版本后,使用社区的oblogproxy,导致版本不适配;demo测试环境也正常了

还有个问题,企业版本的oblogproxy我没找到下载,在哪里找呢(我自己本地做适配,不上生产)

商业版使用问题可以联系公司/项目对接OceanBase客户代表通过标准售后渠道获取支持。

好的