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

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

Open
KeithTt opened this issue Aug 14, 2023 · 4 comments
Open

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

KeithTt opened this issue Aug 14, 2023 · 4 comments
Assignees
Labels

Comments

@KeithTt
Copy link

KeithTt commented Aug 14, 2023

版本 3.2

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

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

图片

@githubname1024
Copy link
Collaborator

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

@githubname1024 githubname1024 self-assigned this Aug 15, 2023
@KeithTt
Copy link
Author

KeithTt commented Aug 17, 2023

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

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

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

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

@githubname1024
Copy link
Collaborator

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

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

@KeithTt
Copy link
Author

KeithTt commented Aug 22, 2023

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

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

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

No branches or pull requests

2 participants