Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded isn't start , please check #4930

Closed
lemon-arrebol opened this issue Nov 1, 2023 · 3 comments

Comments

@lemon-arrebol
Copy link

版本信息:
Canal-admin 版本:1.1.7
Canal-deployer 版本:1.1.7,单机部署模式,在Canal-admin创建节点进行管理

错误信息:
Canal-admin Server管理进行<停止>操作提示失败,Canal-deployer日志如下:
2023-11-01 14:50:01.666 [New I/O server worker #2-5] INFO com.alibaba.otter.canal.deployer.CanalController - ## stop the canal server[10.19.208.150(127.0.0.1):11111]
2023-11-01 14:50:01.675 [New I/O server worker #2-5] ERROR c.a.otter.canal.deployer.admin.CanalAdminController - com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded isn't start , please check
com.alibaba.otter.canal.common.CanalException: com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded isn't start , please check

CanalServerWithEmbedded使用:
1、CanalController 构造函数初始化embeddedCanalServer如下
embeddedCanalServer = CanalServerWithEmbedded.instance();
canalServer = CanalServerWithNetty.instance();

2、CanalServerWithNetty 构造函数
private CanalServerWithNetty(){
this.embeddedServer = CanalServerWithEmbedded.instance();
this.childGroups = new DefaultChannelGroup();
}

从上面可知:CanalController.canalServer 和 CanalController.embeddedCanalServer 持有的CanalServerWithEmbedded 其实是同一个

Canal-admin对Canal-server发起关闭请求操作:
com.alibaba.otter.canal.admin.handler.SessionHandler#messageReceived
com.alibaba.otter.canal.deployer.admin.CanalAdminController#stop
com.alibaba.otter.canal.deployer.CanalStarter#stop(boolean)
com.alibaba.otter.canal.deployer.CanalController#stop 执行关闭操作如下:
(1)CanalServerWithNetty#stop 在这里会执行 embeddedServer.stop(); 方法
......
(2)CanalController.embeddedCanalServer.stop(); 执行到这里时其实已经是【停止】状态了,导致在这里执行抛异常。这里是不是要判断下【启动】状态才需要关闭?

@D5ZangJie
Copy link

@agapple 这代码fix 了 是在哪个分支上?有没有发Releases

zoemak pushed a commit to zoemak/canal that referenced this issue Jan 30, 2024
@zhaobingshuang
Copy link

@agapple 你好,我也遇到相同的问题的,有什么临时解决方案吗

@zhaobingshuang
Copy link

@agapple 你好,我也遇到相同的问题的,有什么临时解决方案吗

使用 1.1.8-alpha 解决了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants