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

startnode主动结束进程之后,再想连接admin会显示refuse #6

Closed
PROBIOTICS4 opened this issue Oct 27, 2020 · 3 comments
Closed
Labels
done Function added enhancement New feature or request

Comments

@PROBIOTICS4
Copy link

PROBIOTICS4 commented Oct 27, 2020

startnode主动结束agent进程之后,再想连接admin会显示refuse,只能通过结束admin进程重新开启新的监听再次连接

agent端:
C:\Users\xxx\Desktop>windows_x64_agent.exe -c xx:7000
2020/10/27 16:24:01 Node starting......
[Ctrl+C]
C:\Users\xxx\Desktop>windows_x64_agent.exe -c xx:7000
2020/10/27 16:24:11 Node starting......
2020/10/27 16:24:21 [*]Connection refused!

admin端:
C:\Users\xxx\Desktop>windows_x64_admin.exe -l 7000
(admin) >> 2020/10/27 16:24:00 [*]StartNode connected from xxxxx:53019!

(admin) >> tree
StartNode[1]'s child nodes:
There is no child node for this one.
agent结束进程后
(admin) >> 2020/10/27 16:24:09 [*]StartNode seems offline
再次尝试连接
(admin) >> tree
(admin) >>
(admin) >> tree
(admin) >>

注:admin端的7000端口检测是开放的,但是就是连不了,貌似port在被连接一次后即使开放也无法使用

@ph4ntonn
Copy link
Owner

startnode主动结束agent进程之后,再想连接admin会显示refuse,只能通过结束admin进程重新开启新的监听再次连接

agent端:
C:\Users\xxx\Desktop>windows_x64_agent.exe -c xx:7000
2020/10/27 16:24:01 Node starting......
[Ctrl+C]
C:\Users\xxx\Desktop>windows_x64_agent.exe -c xx:7000
2020/10/27 16:24:11 Node starting......
2020/10/27 16:24:21 [*]Connection refused!

admin端:
C:\Users\xxx\Desktop>windows_x64_admin.exe -l 7000
(admin) >> 2020/10/27 16:24:00 [*]StartNode connected from xxxxx:53019!

(admin) >> tree
StartNode[1]'s child nodes:
There is no child node for this one.
agent结束进程后
(admin) >> 2020/10/27 16:24:09 [*]StartNode seems offline
再次尝试连接
(admin) >> tree
(admin) >>
(admin) >> tree
(admin) >>

注:admin端的7000端口检测是开放的,但是就是连不了,貌似port在被连接一次后即使开放也无法使用

啊,不好意思,这么久才看到你的issue,十分抱歉~
这里是我的失误,没有讲明白
admin端我默认是只能连接一次的
当时是想着防止admin长时间不用,导致startnode与admin不断重连并频繁成功建立连接
所以就要求admin需要再次使用时,需要重启admin
这时如果startnode设置了重连,那么admin最长只需等待你设置的重连时间即可收到startnode的重连请求,重新建立连接
如果觉得不方便,那么可以在admin.go的第80行将return删除,这样就可以让admin端口持续接受startnode的请求
另外,端口开放是我忘记把listener给close了。。,有时间我会更新代码以及release
感谢你的issue~ 欢迎提出更多的问题~

@ph4ntonn ph4ntonn added the enhancement New feature or request label Oct 29, 2020
@ph4ntonn
Copy link
Owner

已更新代码及release,现在admin会持续接受startnode的连接了~

@ph4ntonn ph4ntonn added the done Function added label Oct 29, 2020
@PROBIOTICS4
Copy link
Author

startnode主动结束agent进程之后,再想连接admin会显示refuse,只能通过结束admin进程重新开启新的监听再次连接
agent端:
C:\Users\xxx\Desktop>windows_x64_agent.exe -c xx:7000
2020/10/27 16:24:01 Node starting......
[Ctrl+C]
C:\Users\xxx\Desktop>windows_x64_agent.exe -c xx:7000
2020/10/27 16:24:11 Node starting......
2020/10/27 16:24:21 []Connection refused!
admin端:
C:\Users\xxx\Desktop>windows_x64_admin.exe -l 7000
(admin) >> 2020/10/27 16:24:00 [
]StartNode connected from xxxxx:53019!
(admin) >> tree
StartNode[1]'s child nodes:
There is no child node for this one.
agent结束进程后
(admin) >> 2020/10/27 16:24:09 [*]StartNode seems offline
再次尝试连接
(admin) >> tree
(admin) >>
(admin) >> tree
(admin) >>
注:admin端的7000端口检测是开放的,但是就是连不了,貌似port在被连接一次后即使开放也无法使用

啊,不好意思,这么久才看到你的issue,十分抱歉~
这里是我的失误,没有讲明白
admin端我默认是只能连接一次的
当时是想着防止admin长时间不用,导致startnode与admin不断重连并频繁成功建立连接
所以就要求admin需要再次使用时,需要重启admin
这时如果startnode设置了重连,那么admin最长只需等待你设置的重连时间即可收到startnode的重连请求,重新建立连接
如果觉得不方便,那么可以在admin.go的第80行将return删除,这样就可以让admin端口持续接受startnode的请求
另外,端口开放是我忘记把listener给close了。。,有时间我会更新代码以及release
感谢你的issue~ 欢迎提出更多的问题~

感谢大佬的付出以及耐心对待每个问题,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Function added enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants