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

基于ssh的端口转发容易出现卡死现象 #608

Open
imyhxy opened this issue Nov 14, 2024 · 1 comment
Open

基于ssh的端口转发容易出现卡死现象 #608

imyhxy opened this issue Nov 14, 2024 · 1 comment

Comments

@imyhxy
Copy link

imyhxy commented Nov 14, 2024

系统环境:ubuntu 24.04.1 x86

使用gost部署多个基于ssh的远程端口转发、本地端口转发服务后,后台运行一段时间后(几天左右)容易出现卡死现象,表现为端口访问不了,使用SIGTERM也无法停止停止gost程序,需要kill掉重启。

部分日志,使用journalctl -f gost -r打印,在kill之前为卡死状态

Nov 14 11:29:13 G3 gost3[1326594]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:54040 <> 127.0.0.1:8081","remote":"127.0.0.1:54040","service":"pcToStWandb","time":"2024-11-14T11:29:13.469+08:00"}
Nov 14 11:29:10 G3 gost3[1326594]: {"dst":"127.0.0.1:8081/tcp","handler":"tcp","host":":0","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:54036 <-> 127.0.0.1:8081","node":"stWandb","remote":"127.0.0.1:54036","service":"pcToStWandb","time":>
Nov 14 11:29:10 G3 gost3[1326594]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:54036 <> 127.0.0.1:8081","remote":"127.0.0.1:54036","service":"pcToStWandb","time":"2024-11-14T11:29:10.715+08:00"}
Nov 14 11:29:10 G3 gost3[1326594]: {"dst":"127.0.0.1:8081/tcp","handler":"tcp","host":":0","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:54024 <-> 127.0.0.1:8081","node":"stWandb","remote":"127.0.0.1:54024","service":"pcToStWandb","time":>
Nov 14 11:29:10 G3 gost3[1326594]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:54024 <> 127.0.0.1:8081","remote":"127.0.0.1:54024","service":"pcToStWandb","time":"2024-11-14T11:29:10.664+08:00"}
Nov 14 11:29:09 G3 gost3[1326594]: {"handler":"rtcp","kind":"service","level":"info","listener":"rtcp","msg":"listening on 127.0.0.1:2220/tcp","service":"stToPcSsh","time":"2024-11-14T11:29:09.716+08:00"}
Nov 14 11:29:09 G3 gost3[1326594]: {"handler":"tcp","kind":"service","level":"info","listener":"tcp","msg":"listening on 127.0.0.1:8083/tcp","service":"pcToStNni","time":"2024-11-14T11:29:09.716+08:00"}
Nov 14 11:29:09 G3 gost3[1326594]: {"handler":"tcp","kind":"service","level":"info","listener":"tcp","msg":"listening on 127.0.0.1:8082/tcp","service":"pcToStVisualdl","time":"2024-11-14T11:29:09.716+08:00"}
Nov 14 11:29:09 G3 gost3[1326594]: {"handler":"tcp","kind":"service","level":"info","listener":"tcp","msg":"listening on 127.0.0.1:8081/tcp","service":"pcToStWandb","time":"2024-11-14T11:29:09.716+08:00"}
Nov 14 11:29:09 G3 gost3[1326594]: {"handler":"rtcp","kind":"service","level":"info","listener":"rtcp","msg":"listening on 127.0.0.1:7890/tcp","service":"stToComProxy","time":"2024-11-14T11:29:09.716+08:00"}
Nov 14 11:29:09 G3 gost3[1326594]: {"handler":"auto","kind":"service","level":"info","listener":"tcp","msg":"listening on [::]:8087/tcp","service":"pcProxy","time":"2024-11-14T11:29:09.716+08:00"}

# 这里重启了

Nov 14 11:29:09 G3 systemd[1]: Started gost.service - Gost Service.
Nov 14 11:29:09 G3 systemd[1]: gost.service: Consumed 7.808s CPU time.
Nov 14 11:29:09 G3 systemd[1]: Stopped gost.service - Gost Service.
Nov 14 11:29:09 G3 systemd[1]: gost.service: Failed with result 'signal'.
Nov 14 11:29:09 G3 systemd[1]: gost.service: Main process exited, code=killed, status=9/KILL
Nov 14 11:29:09 G3 systemd[1]: Stopping gost.service - Gost Service...

# 往下为卡死状态

Nov 14 11:26:36 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:57520 <> 127.0.0.1:8081","remote":"127.0.0.1:57520","service":"pcToStWandb","time":"2024-11-14T11:26:36.780+08:00"}
Nov 14 11:26:28 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:57504 <> 127.0.0.1:8081","remote":"127.0.0.1:57504","service":"pcToStWandb","time":"2024-11-14T11:26:28.960+08:00"}
Nov 14 11:26:28 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:57496 <> 127.0.0.1:8081","remote":"127.0.0.1:57496","service":"pcToStWandb","time":"2024-11-14T11:26:28.799+08:00"}
Nov 14 11:26:28 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:40124 <> 127.0.0.1:8081","remote":"127.0.0.1:40124","service":"pcToStWandb","time":"2024-11-14T11:26:28.620+08:00"}
Nov 14 11:26:28 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:40108 <> 127.0.0.1:8081","remote":"127.0.0.1:40108","service":"pcToStWandb","time":"2024-11-14T11:26:28.115+08:00"}
Nov 14 11:26:27 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:40098 <> 127.0.0.1:8081","remote":"127.0.0.1:40098","service":"pcToStWandb","time":"2024-11-14T11:26:27.958+08:00"}
Nov 14 11:26:27 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:40096 <> 127.0.0.1:8081","remote":"127.0.0.1:40096","service":"pcToStWandb","time":"2024-11-14T11:26:27.839+08:00"}
Nov 14 11:25:32 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:51930 <> 127.0.0.1:8081","remote":"127.0.0.1:51930","service":"pcToStWandb","time":"2024-11-14T11:25:32.401+08:00"}
Nov 14 11:25:26 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:39910 <> 127.0.0.1:8081","remote":"127.0.0.1:39910","service":"pcToStWandb","time":"2024-11-14T11:25:26.966+08:00"}
Nov 14 11:25:26 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:39918 <> 127.0.0.1:8081","remote":"127.0.0.1:39918","service":"pcToStWandb","time":"2024-11-14T11:25:26.966+08:00"}
Nov 14 11:12:50 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 1s","service":"stToComProxy","time":"2024-11-14T11:12:50.304+08:00"}
Nov 14 11:12:50 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 5s","service":"stToPcSsh","time":"2024-11-14T11:12:50.304+08:00"}
Nov 14 11:02:20 G3 gost3[534560]: {"dst":"127.0.0.1:7890/tcp","duration":90347585556,"handler":"rtcp","host":"","kind":"handler","level":"info","listener":"rtcp","local":"127.0.0.1:7890","msg":"172.17.0.2:51604 >< 127.0.0.1:7890","node":"comProxy","remote":"172.17.0.2:51604","servic>
Nov 14 11:02:20 G3 gost3[534560]: {"dst":"127.0.0.1:7890/tcp","duration":90347311686,"handler":"rtcp","host":"","kind":"handler","level":"info","listener":"rtcp","local":"127.0.0.1:7890","msg":"172.17.0.2:51604 >-< 127.0.0.1:7890","node":"comProxy","remote":"172.17.0.2:51604","servi>
Nov 14 11:00:50 G3 gost3[534560]: {"dst":"127.0.0.1:7890/tcp","handler":"rtcp","host":"","kind":"handler","level":"info","listener":"rtcp","local":"127.0.0.1:7890","msg":"172.17.0.2:51604 <-> 127.0.0.1:7890","node":"comProxy","remote":"172.17.0.2:51604","service":"stToComProxy","tim>
Nov 14 11:00:50 G3 gost3[534560]: {"handler":"rtcp","kind":"handler","level":"info","listener":"rtcp","local":"127.0.0.1:7890","msg":"172.17.0.2:51604 <> 127.0.0.1:7890","remote":"172.17.0.2:51604","service":"stToComProxy","time":"2024-11-14T11:00:50.137+08:00"}
Nov 14 10:55:20 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 5s","service":"stToComProxy","time":"2024-11-14T10:55:20.703+08:00"}
Nov 14 10:55:20 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 5s","service":"stToPcSsh","time":"2024-11-14T10:55:20.703+08:00"}
Nov 14 10:44:46 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 4s","service":"stToComProxy","time":"2024-11-14T10:44:46.333+08:00"}
Nov 14 10:44:46 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 5s","service":"stToPcSsh","time":"2024-11-14T10:44:46.333+08:00"}
Nov 14 10:31:38 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 5s","service":"stToPcSsh","time":"2024-11-14T10:31:38.368+08:00"}
Nov 14 10:31:38 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 2s","service":"stToComProxy","time":"2024-11-14T10:31:38.368+08:00"}
Nov 14 10:21:04 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 1s","service":"stToComProxy","time":"2024-11-14T10:21:04.000+08:00"}
Nov 14 10:21:04 G3 gost3[534560]: {"handler":"rtcp","kind":"service","level":"warning","listener":"rtcp","msg":"accept: EOF, retrying in 5s","service":"stToPcSsh","time":"2024-11-14T10:21:04.000+08:00"}
Nov 14 10:10:34 G3 gost3[534560]: {"dst":"127.0.0.1:8081/tcp","duration":11084143203,"handler":"tcp","host":":0","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:36868 >< 127.0.0.1:8081","node":"stWandb","remote":"127.0.0.1:36868","service":>
Nov 14 10:10:34 G3 gost3[534560]: {"dst":"127.0.0.1:8081/tcp","duration":11080109882,"handler":"tcp","host":":0","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:36868 >-< 127.0.0.1:8081","node":"stWandb","remote":"127.0.0.1:36868","service">
Nov 14 10:10:23 G3 gost3[534560]: {"dst":"127.0.0.1:8081/tcp","handler":"tcp","host":":0","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:36868 <-> 127.0.0.1:8081","node":"stWandb","remote":"127.0.0.1:36868","service":"pcToStWandb","time":">
Nov 14 10:10:23 G3 gost3[534560]: {"handler":"tcp","kind":"handler","level":"info","listener":"tcp","local":"127.0.0.1:8081","msg":"127.0.0.1:36868 <> 127.0.0.1:8081","remote":"127.0.0.1:36868","service":"pcToStWandb","time":"2024-11-14T10:10:23.187+08:00"}
@ginuerzh
Copy link
Member

具体的配置?

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

No branches or pull requests

2 participants