sohutv / cachecloud

搜狐视频(sohu tv)Redis私有云平台 :支持Redis多种架构(Standalone、Sentinel、Cluster)高效管理、有效降低大规模redis运维成本,提升资源管控能力和利用率。平台提供快速搭建/迁移,运维管理,弹性伸缩,统计监控,客户端整合接入等功能。(CacheCloud is a Redis cloud management platform. It supports Standalone, Sentinel, and Cluster architectures for Redis, effectively reducing large-scale Redis operation and maintenance costs, and improving resource management and utilization. The platform provides rapid construction/migration, operation and maintenance management, elastic scaling, statistical monitoring, client integration and access and other functions)
http://cachecloud.github.io/
Apache License 2.0
8.76k stars 2.04k forks source link

Cannot open session, you need to establish a connection first. #311

Open KeithTt opened 1 year ago

KeithTt commented 1 year ago

版本 3.2

打包方式是手动编译的 mvn clean package

SSH 端口不是默认 22,已在页面上改为自定义端口。页面上操作看着一切正常,但是日志却一直在抛连接异常,看起来还有地方在使用 22 端口建连。

图片

githubname1024 commented 1 year ago

排查了一下,确实存在继续访问22端口的情况。 可以自行修改一下SSHTemplate中的默认端口,将于后期版本完善修复。 图片

KeithTt commented 1 year ago

1、如果就当前状态继续使用的话,会有什么影响吗?可不可以不更新?

2、需要修改源码修复那岂不是意味着要重新打包部署,如果已经投入使用要怎么在影响最小的情况下更新呢?

3、如果在源码中将 DEFAULT_SSH_PORT_DEFAULT 这个变量的默认值修改成自定义的值,那岂不是写死了吗,为什么页面上设置的值没有完全生效?

抱歉,不太会 java,所以多问了几句.. @githubname1024

githubname1024 commented 1 year ago

@KeithTt 首先这个bug,仅在修改SSH 端口时会触发。如果使用默认端口不会有问题。 如果投入使用的话,且修改了ssh端口的话,具体影响范围:主要会影响与机器或pod通过ssh执行命令的功能。按理来说,加入机器和在机器上部署redis应该都不会成功。

最后一个问题,cachecloud内部有系统配置的更新机制,DEFAULT_SSH_PORT_DEFAULT 是常量 22, 而我截图的是SSH_PORT_DEFAULT为读取的系统变量。

KeithTt commented 1 year ago

@githubname1024 实际情况是,可以正常添加主机,也可以正常部署 redis 集群,所以我不太确定还有什么地方在不断地使用22端口建连。

SSH_PORT_DEFAULT 这个端口是什么时候读取的,我是不是可以在每个节点上加上这个变量,然后重启服务就行?