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

arm64 的图形界面版容器支持 #128

Closed
rea1shane opened this issue Mar 17, 2022 · 68 comments · Fixed by #263
Closed

arm64 的图形界面版容器支持 #128

rea1shane opened this issue Mar 17, 2022 · 68 comments · Fixed by #263
Labels
enhancement New feature or request

Comments

@rea1shane
Copy link

使用命令

docker run --device /dev/net/tun --cap-add NET_ADMIN -ti -p 127.0.0.1:1080:1080 -p 127.0.0.1:8888:8888 -e EC_VER=7.6.3 -e CLI_OPTS="-d vpnaddress -u username -p password" hagb/docker-easyconnect:cli

日志

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in manual mode
update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in manual mode
Cannot talk to rtnetlink: Operation not supported
Cannot send dump request: Operation not supported
Can't find available method to automatically set route for opening ports (refer to https://github.com/Hagb/docker-easyconnect/tree/master/doc/route.md)
Cannot talk to rtnetlink: Operation not supported
WARNING: logging deactivated (can't log to stdout when daemonized)
iptables v1.8.2 (legacy): can't initialize iptables table `nat': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.8.2 (legacy): can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.8.2 (legacy): can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
auto login is disabled
Rand Code is enabled, we don't support it in terminal version!
login failed!
svpn stop!
auto login is disabled
Rand Code is enabled, we don't support it in terminal version!
login failed!
svpn stop!
auto login is disabled
Rand Code is enabled, we don't support it in terminal version!
login failed!
svpn stop!

尝试了另外几个版本也是相同的日志输出,请问如何解决?

系统 12.2.1 (21D62)

@rea1shane rea1shane changed the title m1 pro mac 使用命令行启动无法正产创建路由 m1 pro mac 使用命令行启动无法正常创建路由 Mar 17, 2022
@Hagb Hagb added the enhancement New feature or request label Mar 17, 2022
@Hagb
Copy link
Collaborator

Hagb commented Mar 17, 2022

看起来与 #123 (comment) 的问题相同。
另外验证码登陆需要图形界面版,但非 amd64 的图形界面版我还没弄…

@rea1shane
Copy link
Author

图形版的我也没成功,日志回复在了 #9 (comment)

难顶,项目紧急,我还是向深信服屈服了,安装了 Mac 版

Hagb added a commit that referenced this issue Mar 20, 2022
@Hagb
Copy link
Collaborator

Hagb commented Mar 20, 2022

写了非 x64 的图形界面版支持,可以从最新的 develop 分支进行构建:

docker image build -f Dockerfile.fake-hwaddr -t fake-hwaddr .
EC_VER=7.6.3  # 此变量填写 ec 版本,`7.6.3`或`7.6.7`
docker image build --build-arg EC_URL=$(cat ec_urls/${EC_VER}.txt) --tag hagb/docker-easyconnect -f Dockerfile .

之后启动容器的操作和原本 amd64 下的一样。
方便试一下么?

@rea1shane
Copy link
Author

测试成功,太给力了,稳定性等还需进一步观察。

是否有完全干净卸载 Mac 版本 easy-connect 的文档呢?

@rea1shane
Copy link
Author

目前观察到的一个现象,docker desktop 的 stats 显示该容器使用的内存每秒都在上升,刚启动时占用了 400+ mb,启动了半个小时上升到了 600+ mb,这正常么?

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

目前观察到的一个现象,docker desktop 的 stats 显示该容器使用的内存每秒都在上升,刚启动时占用了 400+ mb,启动了半个小时上升到了 600+ mb,这正常么?

看起来不太正常… 能在容器中运行 busybox ps 然后按 M 看看内存占用情况么?

@rea1shane
Copy link
Author

rea1shane commented Mar 21, 2022

看起来不太正常… 能在容器中运行 busybox ps 然后按 M 看看内存占用情况么?

这个命令能展示你想要的信息么?

# busybox ps -o pid,user,vsz,rss,comm,args
PID   USER     VSZ  RSS  COMMAND          COMMAND
    1 root     3740 2780 start-sangfor.s  {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
   30 root     3740 1572 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   32 root     3740 1900 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   36 daemon   3184 2508 tinyproxy        tinyproxy -c /etc/tinyproxy.conf
   51 root      15m  10m tigervncserver   {tigervncserver} /usr/bin/perl /usr/bin/tigervncserver :1 -geometry 800x600 -localhost no -passwd /root/.vnc/passwd -xstartup flwm
   52 root     237m  94m Xtigervnc        /usr/bin/Xtigervnc :1 -localhost=0 -desktop d89743a4a72d:1 (root) -rfbport 5901 -PasswordFile /root/.vnc/passwd -SecurityTypes VncAut
   55 root      12m 7248 flwm             flwm
   58 root     5256 1696 xclip            xclip -selection c
   61 root     246m  21m EasyMonitor      /usr/local/libexec/qemu-hack/EasyMonitor /usr/share/sangfor/EasyConnect/resources/bin/EasyMonitor-origin
  173 root     2.9g 148m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --enable-transparent-visuals --disable-gpu
  184 root     157m  29m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=zygote --no-sandbox
  271 root     1.8g  86m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=C2E394138D1C75D4D73BA01C674ADEC4 --la
 9305 root     1.4g 229m ECAgent          /usr/local/libexec/qemu-hack/ECAgent /usr/share/sangfor/EasyConnect/resources/bin/ECAgent-origin --resume
 9418 root     1.9g 114m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=44D273D5BA22F008A4047048DABC9D47 --la
 9788 root     1.5g  39m CSClient         /usr/local/libexec/qemu-hack/CSClient /usr/share/sangfor/EasyConnect/resources/bin/CSClient-origin
 9823 root     1.5g  81m svpnservice      /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpnservice-origin -h /usr/share/sangfor/EasyCo
 9839 root     315m  12m svpnservice      /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpnservice-origin -h /usr/share/sangfor/EasyCo
 9844 root     1.7g  87m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=BDDA94C967985D5CAC00BEAC8A122894 --la
 9923 root     1.4g  95m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=1261B4D58973477C31B38A0D86EE7EFA --la
10435 root     7260 3180 su               su daemon -s /usr/sbin/danted -f /run/danted.conf
10436 daemon    28m 3960 danted           danted -f /run/danted.conf
10442 daemon    27m 1980 danted           danted: monitor-child
10447 daemon    27m 1864 danted           danted: request-child: 0/
10448 daemon    27m 1864 danted           danted: request-child: 0/
10449 daemon    27m 1864 danted           danted: request-child: 0/
10450 daemon    27m 1864 danted           danted: request-child: 0/
10451 daemon    27m 1864 danted           danted: request-child: 0/
10452 daemon    27m 1864 danted           danted: request-child: 0/
10453 daemon    27m 1864 danted           danted: request-child: 0/
10454 daemon    27m 1864 danted           danted: request-child: 0/
10455 daemon    27m 1864 danted           danted: request-child: 0/
10456 daemon    27m 1864 danted           danted: request-child: 0/
10457 daemon    27m 1864 danted           danted: request-child: 0/
10458 daemon    27m 1864 danted           danted: request-child: 0/
10459 daemon    27m 1864 danted           danted: request-child: 0/
10495 daemon    28m 2032 danted           danted: request-child: 0/
14001 daemon    28m 2196 danted           danted: request-child: 0/
14002 daemon    29m 4004 danted           danted: io-child: 1/32 (0
15059 daemon    28m 2376 danted           danted: negotiate-child:
15068 root     2104  652 sh               /bin/sh
16099 daemon    28m 2196 danted           danted: request-child: 0/
16100 daemon    29m 2896 danted           danted: io-child: 0/32 (0
16275 root     3012 1952 busybox          busybox ps -o pid,user,vsz,rss,comm,args

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

看起来不太正常… 能在容器中运行 busybox ps 然后按 M 看看内存占用情况么?

这个命令能展示你想要的信息么?

# busybox ps -o pid,user,vsz,rss,comm,args
PID   USER     VSZ  RSS  COMMAND          COMMAND
    1 root     3740 2780 start-sangfor.s  {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
   30 root     3740 1572 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   32 root     3740 1900 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   36 daemon   3184 2508 tinyproxy        tinyproxy -c /etc/tinyproxy.conf
   51 root      15m  10m tigervncserver   {tigervncserver} /usr/bin/perl /usr/bin/tigervncserver :1 -geometry 800x600 -localhost no -passwd /root/.vnc/passwd -xstartup flwm
   52 root     237m  94m Xtigervnc        /usr/bin/Xtigervnc :1 -localhost=0 -desktop d89743a4a72d:1 (root) -rfbport 5901 -PasswordFile /root/.vnc/passwd -SecurityTypes VncAut
   55 root      12m 7248 flwm             flwm
   58 root     5256 1696 xclip            xclip -selection c
   61 root     246m  21m EasyMonitor      /usr/local/libexec/qemu-hack/EasyMonitor /usr/share/sangfor/EasyConnect/resources/bin/EasyMonitor-origin
  173 root     2.9g 148m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --enable-transparent-visuals --disable-gpu
  184 root     157m  29m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=zygote --no-sandbox
  271 root     1.8g  86m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=C2E394138D1C75D4D73BA01C674ADEC4 --la
 9305 root     1.4g 229m ECAgent          /usr/local/libexec/qemu-hack/ECAgent /usr/share/sangfor/EasyConnect/resources/bin/ECAgent-origin --resume
 9418 root     1.9g 114m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=44D273D5BA22F008A4047048DABC9D47 --la
 9788 root     1.5g  39m CSClient         /usr/local/libexec/qemu-hack/CSClient /usr/share/sangfor/EasyConnect/resources/bin/CSClient-origin
 9823 root     1.5g  81m svpnservice      /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpnservice-origin -h /usr/share/sangfor/EasyCo
 9839 root     315m  12m svpnservice      /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpnservice-origin -h /usr/share/sangfor/EasyCo
 9844 root     1.7g  87m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=BDDA94C967985D5CAC00BEAC8A122894 --la
 9923 root     1.4g  95m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=1261B4D58973477C31B38A0D86EE7EFA --la
10435 root     7260 3180 su               su daemon -s /usr/sbin/danted -f /run/danted.conf
10436 daemon    28m 3960 danted           danted -f /run/danted.conf
10442 daemon    27m 1980 danted           danted: monitor-child
10447 daemon    27m 1864 danted           danted: request-child: 0/
10448 daemon    27m 1864 danted           danted: request-child: 0/
10449 daemon    27m 1864 danted           danted: request-child: 0/
10450 daemon    27m 1864 danted           danted: request-child: 0/
10451 daemon    27m 1864 danted           danted: request-child: 0/
10452 daemon    27m 1864 danted           danted: request-child: 0/
10453 daemon    27m 1864 danted           danted: request-child: 0/
10454 daemon    27m 1864 danted           danted: request-child: 0/
10455 daemon    27m 1864 danted           danted: request-child: 0/
10456 daemon    27m 1864 danted           danted: request-child: 0/
10457 daemon    27m 1864 danted           danted: request-child: 0/
10458 daemon    27m 1864 danted           danted: request-child: 0/
10459 daemon    27m 1864 danted           danted: request-child: 0/
10495 daemon    28m 2032 danted           danted: request-child: 0/
14001 daemon    28m 2196 danted           danted: request-child: 0/
14002 daemon    29m 4004 danted           danted: io-child: 1/32 (0
15059 daemon    28m 2376 danted           danted: negotiate-child:
15068 root     2104  652 sh               /bin/sh
16099 daemon    28m 2196 danted           danted: request-child: 0/
16100 daemon    29m 2896 danted           danted: io-child: 0/32 (0
16275 root     3012 1952 busybox          busybox ps -o pid,user,vsz,rss,comm,args

哦对,是这个 top,我给打错了

@rea1shane
Copy link
Author

看起来不太正常… 能在容器中运行 busybox ps 然后按 M 看看内存占用情况么?

这个命令能展示你想要的信息么?

# busybox ps -o pid,user,vsz,rss,comm,args
PID   USER     VSZ  RSS  COMMAND          COMMAND
    1 root     3740 2780 start-sangfor.s  {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
   30 root     3740 1572 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   32 root     3740 1900 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   36 daemon   3184 2508 tinyproxy        tinyproxy -c /etc/tinyproxy.conf
   51 root      15m  10m tigervncserver   {tigervncserver} /usr/bin/perl /usr/bin/tigervncserver :1 -geometry 800x600 -localhost no -passwd /root/.vnc/passwd -xstartup flwm
   52 root     237m  94m Xtigervnc        /usr/bin/Xtigervnc :1 -localhost=0 -desktop d89743a4a72d:1 (root) -rfbport 5901 -PasswordFile /root/.vnc/passwd -SecurityTypes VncAut
   55 root      12m 7248 flwm             flwm
   58 root     5256 1696 xclip            xclip -selection c
   61 root     246m  21m EasyMonitor      /usr/local/libexec/qemu-hack/EasyMonitor /usr/share/sangfor/EasyConnect/resources/bin/EasyMonitor-origin
  173 root     2.9g 148m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --enable-transparent-visuals --disable-gpu
  184 root     157m  29m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=zygote --no-sandbox
  271 root     1.8g  86m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=C2E394138D1C75D4D73BA01C674ADEC4 --la
 9305 root     1.4g 229m ECAgent          /usr/local/libexec/qemu-hack/ECAgent /usr/share/sangfor/EasyConnect/resources/bin/ECAgent-origin --resume
 9418 root     1.9g 114m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=44D273D5BA22F008A4047048DABC9D47 --la
 9788 root     1.5g  39m CSClient         /usr/local/libexec/qemu-hack/CSClient /usr/share/sangfor/EasyConnect/resources/bin/CSClient-origin
 9823 root     1.5g  81m svpnservice      /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpnservice-origin -h /usr/share/sangfor/EasyCo
 9839 root     315m  12m svpnservice      /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpnservice-origin -h /usr/share/sangfor/EasyCo
 9844 root     1.7g  87m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=BDDA94C967985D5CAC00BEAC8A122894 --la
 9923 root     1.4g  95m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=1261B4D58973477C31B38A0D86EE7EFA --la
10435 root     7260 3180 su               su daemon -s /usr/sbin/danted -f /run/danted.conf
10436 daemon    28m 3960 danted           danted -f /run/danted.conf
10442 daemon    27m 1980 danted           danted: monitor-child
10447 daemon    27m 1864 danted           danted: request-child: 0/
10448 daemon    27m 1864 danted           danted: request-child: 0/
10449 daemon    27m 1864 danted           danted: request-child: 0/
10450 daemon    27m 1864 danted           danted: request-child: 0/
10451 daemon    27m 1864 danted           danted: request-child: 0/
10452 daemon    27m 1864 danted           danted: request-child: 0/
10453 daemon    27m 1864 danted           danted: request-child: 0/
10454 daemon    27m 1864 danted           danted: request-child: 0/
10455 daemon    27m 1864 danted           danted: request-child: 0/
10456 daemon    27m 1864 danted           danted: request-child: 0/
10457 daemon    27m 1864 danted           danted: request-child: 0/
10458 daemon    27m 1864 danted           danted: request-child: 0/
10459 daemon    27m 1864 danted           danted: request-child: 0/
10495 daemon    28m 2032 danted           danted: request-child: 0/
14001 daemon    28m 2196 danted           danted: request-child: 0/
14002 daemon    29m 4004 danted           danted: io-child: 1/32 (0
15059 daemon    28m 2376 danted           danted: negotiate-child:
15068 root     2104  652 sh               /bin/sh
16099 daemon    28m 2196 danted           danted: request-child: 0/
16100 daemon    29m 2896 danted           danted: io-child: 0/32 (0
16275 root     3012 1952 busybox          busybox ps -o pid,user,vsz,rss,comm,args

哦对,是这个 top,我给打错了

Mem: 7362752K used, 779368K free, 365928K shrd, 336592K buff, 5182344K cached
CPU:   3% usr   2% sys   0% nic  94% idle   0% io   0% irq   0% sirq
Load average: 0.13 0.31 0.36 3/1065 17298
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
  173     1 root     S    3043m  37%   0% /usr/share/sangfor/EasyConnect/EasyConnect --enable-transparent-visuals --disable-gpu
 9418   184 root     S    2021m  25%   0% /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=44D273D5BA22F008A4047048DABC9D47 --lan
  271   184 root     S    1862m  23%   0% /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=C2E394138D1C75D4D73BA01C674ADEC4 --lan
 9844   184 root     S    1809m  22%   0% /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=BDDA94C967985D5CAC00BEAC8A122894 --lan
 9823     1 root     S    1610m  20%   0% /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpnservice-origin -h /usr/share/sangfor/EasyCon
 9788     1 root     S    1609m  20%   0% /usr/local/libexec/qemu-hack/CSClient /usr/share/sangfor/EasyConnect/resources/bin/CSClient-origin
 9305     1 root     S    1558m  19%   1% /usr/local/libexec/qemu-hack/ECAgent /usr/share/sangfor/EasyConnect/resources/bin/ECAgent-origin --resume
 9923   184 root     S    1466m  18%   0% /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=1261B4D58973477C31B38A0D86EE7EFA --lan
 9839  9823 root     S     315m   4%   0% /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpnservice-origin -h /usr/share/sangfor/EasyCon
   61     1 root     S     246m   3%   0% /usr/local/libexec/qemu-hack/EasyMonitor /usr/share/sangfor/EasyConnect/resources/bin/EasyMonitor-origin
   52    51 root     S     237m   3%   0% /usr/bin/Xtigervnc :1 -localhost=0 -desktop d89743a4a72d:1 (root) -rfbport 5901 -PasswordFile /root/.vnc/passwd -SecurityTypes VncAuth
  184   173 root     S     157m   2%   0% /usr/share/sangfor/EasyConnect/EasyConnect --type=zygote --no-sandbox
16100 10436 daemon   S    29976   0%   0% danted: io-child: 0/32 (0
15059 10436 daemon   S    29316   0%   0% danted: negotiate-child:
14001 10436 daemon   S    28984   0%   0% danted: request-child: 0/
16099 10436 daemon   S    28984   0%   0% danted: request-child: 0/
10495 10436 daemon   S    28852   0%   0% danted: request-child: 0/
10436 10435 daemon   S    28788   0%   0% danted -f /run/danted.conf
10447 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10448 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10449 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10450 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10451 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10452 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10453 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10454 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10455 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10456 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10457 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10458 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10459 10436 daemon   S    28588   0%   0% danted: request-child: 0/
10442 10436 daemon   S    28488   0%   0% danted: monitor-child
   51     1 root     S    15760   0%   0% {tigervncserver} /usr/bin/perl /usr/bin/tigervncserver :1 -geometry 800x600 -localhost no -passwd /root/.vnc/passwd -xstartup flwm
   55    51 root     S    13128   0%   0% flwm
10435    32 root     S     7260   0%   0% su daemon -s /usr/sbin/danted -f /run/danted.conf
   58     1 root     S     5256   0%   0% xclip -selection c
    1     0 root     S     3740   0%   0% {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
   30     1 root     S     3740   0%   0% {start.sh} /bin/bash /usr/local/bin/start.sh
   32    30 root     S     3740   0%   0% {start.sh} /bin/bash /usr/local/bin/start.sh
   36     1 daemon   S     3184   0%   0% tinyproxy -c /etc/tinyproxy.conf
17030 15068 root     R     3012   0%   0% busybox top
15068     0 root     S     2104   0%   0% /bin/sh

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

top 那里看 RSS 列就好。

如果方便的话,能不能对容器内存进行限制

docker update 容器名 --memory MEMORY
# 这里 MEMORY 的位置填写内存限制如 4G 、4096M

并继续观察?

@rea1shane
Copy link
Author

top 那里看 RSS 列就好。

如果方便的话,能不能对容器内存进行限制

docker update 容器名 --memory MEMORY
# 这里 MEMORY 的位置填写内存限制如 4G 、4096M

并继续观察?

好的,已经执行如下命令

docker update container --memory 512M --memory-swap 512M

我再继续观察下。

另外,对于在 Mac 上完全移除 easy-connect 你有什么经验么?

@rea1shane
Copy link
Author

top 那里看 RSS 列就好。

如果方便的话,能不能对容器内存进行限制

docker update 容器名 --memory MEMORY
# 这里 MEMORY 的位置填写内存限制如 4G 、4096M

并继续观察?

观察结果:容器内存从 400+ mb 逐步升至 500 mb,每次快到 510 mb 时就会回落至 490+ mb,经过几次左右的回落后,跌落至 380 mb 左右并且不再上升,并且服务不可用,不可用时的 top 如下:

Mem: 7056116K used, 1086004K free, 368800K shrd, 336864K buff, 5186464K cached
CPU:   2% usr   1% sys   0% nic  95% idle   0% io   0% irq   0% sirq
Load average: 0.21 0.57 0.49 2/1026 14900
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
14680     1 root     S    3039m  37%   0% /usr/share/sangfor/EasyConnect/EasyConnect --enable-transparent-visuals --disable-gpu
14722 14684 root     S    1895m  23%   0% /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=00629F267BC09F6F7EDBAD8071DF342D --lan
 9260     1 root     S    1541m  19%   0% /usr/local/libexec/qemu-hack/ECAgent /usr/share/sangfor/EasyConnect/resources/bin/ECAgent-origin --resume
14744 14684 root     S    1486m  18%   0% /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=E456F7B3EA469D38C0FBD062B89C20CA --lan
   62     1 root     S     246m   3%   0% /usr/local/libexec/qemu-hack/EasyMonitor /usr/share/sangfor/EasyConnect/resources/bin/EasyMonitor-origin
   53    52 root     S     228m   3%   0% /usr/bin/Xtigervnc :1 -localhost=0 -desktop d89743a4a72d:1 (root) -rfbport 5901 -PasswordFile /root/.vnc/passwd -SecurityTypes VncAuth
14684 14680 root     S     157m   2%   0% /usr/share/sangfor/EasyConnect/EasyConnect --type=zygote --no-sandbox
13361 10883 daemon   S    30124   0%   0% danted: io-child: 1/32 (1
14841 10883 daemon   S    29972   0%   0% danted: io-child: 0/32 (0
14849 10883 daemon   S    29312   0%   0% danted: negotiate-child:
13360 10883 daemon   S    28980   0%   0% danted: request-child: 0/
14840 10883 daemon   S    28980   0%   0% danted: request-child: 0/
14850 10883 daemon   S    28980   0%   0% danted: request-child: 0/
14866 10883 daemon   S    28980   0%   0% danted: request-child: 0/
14876 10883 daemon   S    28980   0%   0% danted: request-child: 0/
11085 10883 daemon   S    28848   0%   0% danted: request-child: 0/
10883 10882 daemon   S    28784   0%   0% danted -f /run/danted.conf
10893 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10894 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10895 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10896 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10897 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10898 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10899 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10900 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10901 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10902 10883 daemon   S    28584   0%   0% danted: request-child: 0/
10885 10883 daemon   S    28488   0%   0% danted: monitor-child
   52     1 root     S    15732   0%   0% {tigervncserver} /usr/bin/perl /usr/bin/tigervncserver :1 -geometry 800x600 -localhost no -passwd /root/.vnc/passwd -xstartup flwm
   56    52 root     S    13132   0%   0% flwm
10882    33 root     S     7260   0%   0% su daemon -s /usr/sbin/danted -f /run/danted.conf
   59     1 root     S     5256   0%   0% xclip -selection c
    1     0 root     S     3740   0%   0% {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
   33    31 root     S     3740   0%   0% {start.sh} /bin/bash /usr/local/bin/start.sh
   31     1 root     S     3740   0%   0% {start.sh} /bin/bash /usr/local/bin/start.sh
14679     1 root     S     3740   0%   0% {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
   37     1 daemon   S     3184   0%   0% tinyproxy -c /etc/tinyproxy.conf
14682 14679 root     S     3084   0%   0% grep \[Register\]cms client connect failed -m 1
14873 14857 root     R     3012   0%   0% busybox top
14857     0 root     S     2104   0%   0% /bin/sh
10935     0 root     S     2104   0%   0% /bin/sh
14681 14679 root     S     2036   0%   0% tail -n 0 -f /usr/share/sangfor/EasyConnect/resources/logs/ECAgent.log

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

好的,已经执行如下命令

docker update container --memory 512M --memory-swap 512M

感觉 --memory 是不是小了点(因为已经 600 多 M 了),这样子的话应该可能会开始用 swap 了,对硬盘不太好。

另外,对于在 Mac 上完全移除 easy-connect 你有什么经验么?

Mac 上我没什么经验(我没有 Mac 设备和 MacOS,调试是在树梅派上完成的),搜了一下(关键词 mac 删除EasyConnect

@rea1shane
Copy link
Author

感觉 --memory 是不是小了点(因为已经 600 多 M 了),这样子的话应该可能会开始用 swap 了,对硬盘不太好。

我是重新启动了容器然后执行的这行命令。

容器的内存在生命周期内是这样变化的:刚开始创建的时候是 120 左右,我成功建立公司连接后飙升至 400 左右,然后开始缓慢上升,如果我不做内存限制的话就不会停止上升,做了的话就会出现 #128 (comment) 描述的场景。

感谢提供的参考链接,我已经按照文档进行了清除。

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

top 那里看 RSS 列就好。

不好意思,我把 #128 (comment) 错看成是 top 了,我试了试 busybox 的 top 好像没有 RSS(进程实际占用的内存)可看,还是用那个 busybox ps -o pid,user,vsz,rss,comm,args 吧。
如果要持续观察的话可以用 busybox watch busybox ps -o pid,user,vsz,rss,comm,args

或者在容器里安装完整版的 top:

apt update
apt install procps
ps

然后按大写 M 切换成按 RSS 排序

容器的内存在生命周期内是这样变化的:刚开始创建的时候是 120 左右,我成功建立公司连接后飙升至 400 左右,然后开始缓慢上升,如果我不做内存限制的话就不会停止上升,做了的话就会出现 #128 (comment) 描述的场景。

服务变成不可用应该是超出限制时 docker 把相关进程给杀了。如果加上 --memory-swap 的话超出内存限制时部分内存会写入到硬盘的 swap 里。
(所以我前面其实想说可以设一个大一些的 --memory 比如 1.5G)。

另外我这里观察到涨到 700M 之后有自行回落的现象(但是我是在 32 位 x86 上跑,和 arm64 的 M1 还是不能等同)

@rea1shane
Copy link
Author

服务变成不可用应该是超出限制时 docker 把相关进程给杀了。如果加上 --memory-swap 的话超出内存限制时部分内存会写入到硬盘的 swap 里。

我加 --memory-swap 是因为不加会报错 Memory limit should be smaller than already set memoryswap limit, update the memoryswap at the same time

解决方法:Docker container 动态修改内存限制 https://cloud.tencent.com/developer/article/1525481

(所以我前面其实想说可以设一个大一些的 --memory 比如 1.5G)。

另外我这里观察到涨到 700M 之后有自行回落的现象(但是我是在 32 位 x86 上跑,和 arm64 的 M1 还是不能等同)

我尝试一下设置成 1G 看看,或者直接不设置看看最高的上限是多少。

另外有个疑问这个内存上升是在做什么?刚刚你也觉得这个内存上升并不正常。

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

另外有个疑问这个内存上升是在做什么?刚刚你也觉得这个内存上升并不正常。

有可能是内存泄漏,我在小内存的树梅派上调试,把树梅派内存用光了(用之前 700M 剩余)。
我试试 amd64 (x86_64) 上有没有这种现象。

@rea1shane
Copy link
Author

我尝试一下设置成 1G 看看,或者直接不设置看看最高的上限是多少。

跑了一个多小时,内存已经到了 1G 以上,代理还是可以正常访问,应该是内存泄漏了。

我试试 amd64 (x86_64) 上有没有这种现象。

测试结果如何? @Hagb

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

我试试 amd64 (x86_64) 上有没有这种现象。

测试结果如何? @Hagb

amd64 上原生运行,内存占用稳定在 122M 左右。
非 amd64 上我的也涨到 1G 以上了

@rea1shane
Copy link
Author

我试试 amd64 (x86_64) 上有没有这种现象。

测试结果如何? @Hagb

amd64 上原生运行,内存占用稳定在 122M 左右。 非 amd64 上我的也涨到 1G 以上了

debug 然后看看能否修复?感觉还是挺致命的。

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

可能是这个原因:https://gitlab.com/qemu-project/qemu/-/issues/866

@rea1shane
Copy link
Author

可能是这个原因:https://gitlab.com/qemu-project/qemu/-/issues/866

不懂这一块的了,这个 bug 是等官方修复?还是你来修复?

是否有其他方法可以绕过这个 bug?

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

可能是这个原因:https://gitlab.com/qemu-project/qemu/-/issues/866

不懂这一块的了,这个 bug 是等官方修复?还是你来修复?

是否有其他方法可以绕过这个 bug?

我也不懂这一块。
不过观察了一下,运行的时候几个需要用 qemu 模拟的进程中,只有 ECAgent 是需要创建、结束线程的,这也符合前面对原因的猜测以及其他进程内存占用平稳的事实。
ECAgent 的这个行为看起来是和 ECAgent 有一个和接收(或者发送?)心跳包的功能有关(在 /usr/share/sangfor/EasyConnect/resources/conf/LogConf.xml 中把 ECAgent 的日志级别调大可以看到。)。

进一步试验发现不频繁地杀 ECAgent 进程并不会对连接有很大影响,具体是:原本就通过 vpn 的连接没断连、ECAgent 被自动重启时的一两秒只会有一个 100~200ms 的网络延迟。

可以写一个 workaround 来做这件事(自动测量 ECAgent 的内存占用,超过阈值就杀掉它)。

容器的内存在生命周期内是这样变化的:刚开始创建的时候是 120 左右,我成功建立公司连接后飙升至 400 左右,然后开始缓慢上升,如果我不做内存限制的话就不会停止上升,做了的话就会出现 #128 (comment) 描述的场景。

从 Docker 官方的描述来看,达到内存限制后所杀进程的相对随机的:https://docs.docker.com/config/containers/resource_constraints/#understand-the-risks-of-running-out-of-memory 。所以指不定被杀掉了哪个进程,只好按照前面的思路人为进行控制了。

能看看你连上 vpn 一开始的内存占用情况吗?(busybox ps -o pid,user,vsz,rss,comm,args

@rea1shane
Copy link
Author

rea1shane commented Mar 21, 2022

能看看你连上 vpn 一开始的内存占用情况吗?(busybox ps -o pid,user,vsz,rss,comm,args

这是我测试公司内网连接成功后截取的:

Every 2s: busybox ps -o pid,user,vsz,rss,comm,args                                                               2022-03-21 16:01:22

PID   USER     VSZ  RSS  COMMAND          COMMAND
    1 root     3872 3064 start-sangfor.s  {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
   32 root     3872 1344 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   34 root     3872 1796 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   38 daemon   3184 2436 tinyproxy        tinyproxy -c /etc/tinyproxy.conf
   53 root      15m  10m tigervncserver   {tigervncserver} /usr/bin/perl /usr/bin/tigervncserver :1 -geometry 800x600 -localhost no
   54 root     236m  92m Xtigervnc        /usr/bin/Xtigervnc :1 -localhost=0 -desktop 55220358168a:1 (root) -rfbport 5901 -PasswordF
   57 root      12m 7280 flwm             flwm
   60 root     5256 1644 xclip            xclip -selection c
   63 root     245m  20m EasyMonitor      /usr/local/libexec/qemu-hack/EasyMonitor /usr/share/sangfor/EasyConnect/resources/bin/Easy
  175 root     2.9g 129m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --enable-transparent-visuals --disable-gpu
  184 root     157m  28m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=zygote --no-sandbox
  264 root     1.9g  86m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-
  915 root     2104  612 sh               /bin/sh
 3018 root     2876 1592 busybox          busybox watch busybox ps -o pid,user,vsz,rss,comm,args
 6578 root     1.3g  52m ECAgent          /usr/local/libexec/qemu-hack/ECAgent /usr/share/sangfor/EasyConnect/resources/bin/ECAgent-
 6730 root     2.0g 113m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-
 7072 root     1.5g  39m CSClient         /usr/local/libexec/qemu-hack/CSClient /usr/share/sangfor/EasyConnect/resources/bin/CSClien
 7092 root     1.5g  35m svpnservice      /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpn
 7106 root     315m  12m svpnservice      /usr/local/libexec/qemu-hack/svpnservice /usr/share/sangfor/EasyConnect/resources/bin/svpn
 7111 root     1.3g  76m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-
 7178 root     1.4g  93m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-
 7420 root     7260 3136 su               su daemon -s /usr/sbin/danted -f /run/danted.conf
 7424 daemon    27m 3824 danted           danted -f /run/danted.conf
 7646 daemon    27m 1900 danted           danted: monitor-child
 7647 daemon    28m 2664 danted           danted: negotiate-child:
 7648 daemon    28m 5300 danted           danted: request-child: 0/
 7649 daemon    27m 1852 danted           danted: request-child: 0/
 7650 daemon    27m 1852 danted           danted: request-child: 0/
 7651 daemon    27m 1852 danted           danted: request-child: 0/
 7653 daemon    27m 1852 danted           danted: request-child: 0/
 7654 daemon    27m 1852 danted           danted: request-child: 0/
 7655 daemon    27m 1852 danted           danted: request-child: 0/
 7656 daemon    27m 1852 danted           danted: request-child: 0/
 7657 daemon    27m 1852 danted           danted: request-child: 0/
 7658 daemon    27m 1852 danted           danted: request-child: 0/
 7659 daemon    27m 1852 danted           danted: request-child: 0/
 7660 daemon    27m 1852 danted           danted: request-child: 0/
 7661 daemon    27m 1852 danted           danted: request-child: 0/
 7663 daemon    27m 1852 danted           danted: request-child: 0/
 7665 daemon    27m 1852 danted           danted: request-child: 0/
 7666 daemon    27m 1852 danted           danted: request-child: 0/
 7667 daemon    29m 3656 danted           danted: io-child: 1/32 (0
 7802 daemon    28m 2244 danted           danted: negotiate-child:
 7803 daemon    28m 2024 danted           danted: request-child: 0/
 7805 daemon    29m 2800 danted           danted: io-child: 0/32 (0
 7824 root     2104  644 sh               sh -c busybox ps -o pid,user,vsz,rss,comm,args
 7825 root     3012 1952 busybox          busybox ps -o pid,user,vsz,rss,comm,args


这是我在建立连接的时候录制的:

vpn

可以写一个 workaround 来做这件事(自动测量 ECAgent 的内存占用,超过阈值就杀掉它)。

这个方法听起来可行,但是感觉有点暴力,还有其它的修复方式么?

另外,这个连接建立起来的时候看了下总内存量是 380M 左右,也远远高于你在 #128 (comment) 提到的 amd64 的 120+M,刚启动容器不建立连接的时候才比较接近这个数值,是指令集转译后的性能损耗么?

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

这个方法听起来可行,但是感觉有点暴力,还有其它的修复方式么?

目前没想到。改 qemu 目前超出个人能力,改 ECAgent 又因为没有源码而难以进行。
如果有别的主意欢迎提出。

另外,这个连接建立起来的时候看了下总内存量是 380M 左右,也远远高于你在 #128 (comment) 提到的 amd64 的 120+M,刚启动容器不建立连接的时候才比较接近这个数值,是指令集转译后的性能损耗么?

是指令集转译后的性能损耗么?

有可能。我这里 x86 模拟 x86_64 建立连接后倒是能够到 250M 左右。下面一张图是连接后 x86 qemu-user 模拟 x64 (上)和 x64 原生(下)的内存情况。
图片

@Hagb
Copy link
Collaborator

Hagb commented Mar 21, 2022

502bcca 添加了上述的 workaround,对 ECAgent 的内存大小默认限制在 256M 了。欢迎测试。

@rea1shane
Copy link
Author

rea1shane commented Mar 28, 2022

还有一个预期现象是,输出中不含有 ECAgent spend memory 2xx MB > 256 MB! Kill ECAgent! 的字样

日志中确实没有出现这个字样,但是服务挂掉了,无法访问公司网络,当前状态:

容器内存 1.1G,几秒之前是 1.4G,这是我在 1.1G 时运行的命令:

# busybox ps -o pid,user,vsz,rss,comm,args
PID   USER     VSZ  RSS  COMMAND          COMMAND
    1 root     3872 3012 start-sangfor.s  {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
   30 root     3872 1532 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   32 root     3872 1920 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   36 daemon   3184 2540 tinyproxy        tinyproxy -c /etc/tinyproxy.conf
   51 root      15m  10m tigervncserver   {tigervncserver} /usr/bin/perl /usr/bin/tigervncserver :1 -geometry 800x600 -localhost no -passw
   52 root     221m  78m Xtigervnc        /usr/bin/Xtigervnc :1 -localhost=0 -desktop f602eeeb937f:1 (root) -rfbport 5901 -PasswordFile /r
   55 root      12m 7228 flwm             flwm
   58 root     5256 1668 xclip            xclip -selection c
   61 root     245m  20m EasyMonitor      /usr/local/libexec/qemu-hack/EasyMonitor -E LD_PRELOAD=/usr/local/lib/libthread_reuse.so /usr/sh
   63 root     3872 2272 start-sangfor.s  {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
  177 root     2.9g 155m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --enable-transparent-visuals --disable-gpu
  184 root     157m  28m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=zygote --no-sandbox
  252 root     1.8g  88m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=
 6506 root     2.1g  55m ECAgent          /usr/local/libexec/qemu-hack/ECAgent -E LD_PRELOAD=/usr/local/lib/libthread_reuse.so /usr/share/
 7250 root     7260 3168 su               su daemon -s /usr/sbin/danted -f /run/danted.conf
 7260 daemon    28m 3852 danted           danted -f /run/danted.conf
 7511 daemon    27m 1904 danted           danted: monitor-child
13412 root     1.3g  81m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=
13967 daemon    28m 2196 danted           danted: request-child: 0/
13968 daemon    28m 2196 danted           danted: request-child: 0/
13969 daemon    28m 2196 danted           danted: request-child: 0/
13970 daemon    28m 2196 danted           danted: request-child: 0/
13971 daemon    28m 2196 danted           danted: request-child: 0/
13972 daemon    28m 2196 danted           danted: request-child: 0/
13973 daemon    28m 2196 danted           danted: request-child: 0/
13974 daemon    28m 2196 danted           danted: request-child: 0/
13975 daemon    28m 2196 danted           danted: request-child: 0/
13976 daemon    28m 2196 danted           danted: request-child: 0/
13977 daemon    28m 2196 danted           danted: request-child: 0/
13978 daemon    28m 2196 danted           danted: request-child: 0/
13979 daemon    28m 2196 danted           danted: request-child: 0/
13980 daemon    28m 2196 danted           danted: request-child: 0/
14009 daemon    29m  12m danted           danted: io-child: 0/32 (0
14010 daemon    29m  12m danted           danted: io-child: 0/32 (0
14011 daemon    29m  12m danted           danted: io-child: 0/32 (0
14012 daemon    29m  12m danted           danted: io-child: 0/32 (0
14013 daemon    29m  12m danted           danted: io-child: 0/32 (0
14014 daemon    29m  12m danted           danted: io-child: 0/32 (0
14015 daemon    29m  12m danted           danted: io-child: 0/32 (0
14016 daemon    29m  12m danted           danted: io-child: 0/32 (0
14017 daemon    29m  12m danted           danted: io-child: 0/32 (0
14018 daemon    29m  12m danted           danted: io-child: 0/32 (0
14019 daemon    29m  12m danted           danted: io-child: 0/32 (0
14020 daemon    29m  12m danted           danted: io-child: 0/32 (0
14021 daemon    29m  12m danted           danted: io-child: 0/32 (0
14022 daemon    29m  12m danted           danted: io-child: 0/32 (0
14023 daemon    29m  12m danted           danted: io-child: 0/32 (0
14024 daemon    29m  12m danted           danted: io-child: 0/32 (0
14025 daemon    29m  12m danted           danted: io-child: 0/32 (0
14026 daemon    29m  12m danted           danted: io-child: 0/32 (0
14027 daemon    29m  12m danted           danted: io-child: 0/32 (0
14028 daemon    29m  12m danted           danted: io-child: 0/32 (0
14029 daemon    29m  12m danted           danted: io-child: 0/32 (0
14030 daemon    29m  12m danted           danted: io-child: 0/32 (0
14031 daemon    29m  12m danted           danted: io-child: 0/32 (0
14032 daemon    29m  12m danted           danted: io-child: 0/32 (0
14033 daemon    29m  12m danted           danted: io-child: 0/32 (0
14034 daemon    29m  12m danted           danted: io-child: 0/32 (0
14035 daemon    29m  12m danted           danted: io-child: 0/32 (0
14036 daemon    29m  12m danted           danted: io-child: 0/32 (0
14037 daemon    29m  12m danted           danted: io-child: 0/32 (0
14038 daemon    29m  12m danted           danted: io-child: 0/32 (0
14039 daemon    29m  12m danted           danted: io-child: 0/32 (0
14040 daemon    29m  12m danted           danted: io-child: 0/32 (0
14041 daemon    29m  12m danted           danted: io-child: 0/32 (0
14042 daemon    29m  12m danted           danted: io-child: 0/32 (0
14043 daemon    29m  12m danted           danted: io-child: 0/32 (0
14044 daemon    29m  12m danted           danted: io-child: 0/32 (0
14045 daemon    29m  12m danted           danted: io-child: 0/32 (0
14046 daemon    29m  12m danted           danted: io-child: 0/32 (0
14047 daemon    29m  12m danted           danted: io-child: 0/32 (0
14048 daemon    29m  12m danted           danted: io-child: 0/32 (0
14049 daemon    29m  12m danted           danted: io-child: 0/32 (0
14050 daemon    29m  12m danted           danted: io-child: 0/32 (0
14051 daemon    29m  12m danted           danted: io-child: 0/32 (0
14052 daemon    29m  12m danted           danted: io-child: 0/32 (0
14053 daemon    29m  12m danted           danted: io-child: 0/32 (0
14054 daemon    29m  12m danted           danted: io-child: 0/32 (0
14055 daemon    29m  12m danted           danted: io-child: 0/32 (0
14056 daemon    29m  12m danted           danted: io-child: 0/32 (0
14057 daemon    29m  12m danted           danted: io-child: 0/32 (0
14058 daemon    29m  12m danted           danted: io-child: 0/32 (0
14059 daemon    29m  12m danted           danted: io-child: 0/32 (0
14060 daemon    29m  12m danted           danted: io-child: 0/32 (0
14061 daemon    29m  12m danted           danted: io-child: 0/32 (0
14062 daemon    29m  12m danted           danted: io-child: 0/32 (0
14063 daemon    29m  12m danted           danted: io-child: 0/32 (0
14064 daemon    29m  12m danted           danted: io-child: 0/32 (0
14065 daemon    29m  12m danted           danted: io-child: 0/32 (0
14066 daemon    29m  12m danted           danted: io-child: 0/32 (0
14067 daemon    29m  12m danted           danted: io-child: 0/32 (0
14068 daemon    29m  12m danted           danted: io-child: 0/32 (0
14069 daemon    29m  12m danted           danted: io-child: 0/32 (0
14070 daemon    29m  12m danted           danted: io-child: 0/32 (0
14071 daemon    29m  12m danted           danted: io-child: 0/32 (0
14072 daemon    29m  12m danted           danted: io-child: 0/32 (0
14073 daemon    29m  12m danted           danted: io-child: 0/32 (0
14074 daemon    29m  12m danted           danted: io-child: 0/32 (0
14075 daemon    29m  12m danted           danted: io-child: 0/32 (0
14076 daemon    29m  12m danted           danted: io-child: 0/32 (0
14077 daemon    29m  12m danted           danted: io-child: 0/32 (0
14078 daemon    29m  12m danted           danted: io-child: 0/32 (0
14079 daemon    29m  12m danted           danted: io-child: 0/32 (0
14080 daemon    29m  12m danted           danted: io-child: 0/32 (0
14081 daemon    29m  12m danted           danted: io-child: 0/32 (0
14082 daemon    29m  12m danted           danted: io-child: 0/32 (0
14083 daemon    29m  12m danted           danted: io-child: 0/32 (0
14087 daemon    29m  12m danted           danted: io-child: 0/32 (0
14088 daemon    29m  12m danted           danted: io-child: 0/32 (0
14089 daemon    29m  12m danted           danted: io-child: 0/32 (0
14090 daemon    29m  12m danted           danted: io-child: 0/32 (0
14091 daemon    29m  12m danted           danted: io-child: 0/32 (0
14092 daemon    29m  12m danted           danted: io-child: 0/32 (0
14093 daemon    29m  10m danted           danted: io-child: 0/32 (0
14098 daemon    28m 2864 danted           danted: negotiate-child:
14099 daemon    28m 2004 danted           danted: request-child: 0/
14104 daemon    29m 2884 danted           danted: io-child: 0/32 (0
14108 daemon    28m 2356 danted           danted: negotiate-child:
14109 daemon    28m 2004 danted           danted: request-child: 0/
14127 root     2104  644 sh               /bin/sh
14140 root     2004  632 sleep            sleep 15
14141 root     3012 2060 busybox          busybox ps -o pid,user,vsz,rss,comm,args

补充1:服务正常的时候观察了几眼,内存最高不超过 440M,也就是上升不到 20M,一直比较稳定,写了会代码准备提交的时候发现挂掉了 = =

补充2:突然内存又到了 1.4G,这是 1.4G 时的状态:

# busybox ps -o pid,user,vsz,rss,comm,args
PID   USER     VSZ  RSS  COMMAND          COMMAND
    1 root     3872 3012 start-sangfor.s  {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
   30 root     3872 1532 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   32 root     3872 1920 start.sh         {start.sh} /bin/bash /usr/local/bin/start.sh
   36 daemon   3184 2540 tinyproxy        tinyproxy -c /etc/tinyproxy.conf
   51 root      15m  10m tigervncserver   {tigervncserver} /usr/bin/perl /usr/bin/tigervncserver :1 -geometry 800x600 -localhost no -passw
   52 root     221m  78m Xtigervnc        /usr/bin/Xtigervnc :1 -localhost=0 -desktop f602eeeb937f:1 (root) -rfbport 5901 -PasswordFile /r
   55 root      12m 7228 flwm             flwm
   58 root     5256 1668 xclip            xclip -selection c
   61 root     245m  20m EasyMonitor      /usr/local/libexec/qemu-hack/EasyMonitor -E LD_PRELOAD=/usr/local/lib/libthread_reuse.so /usr/sh
   63 root     3872 2272 start-sangfor.s  {start-sangfor.s} /bin/bash /usr/local/bin/start-sangfor.sh
  177 root     2.9g 155m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --enable-transparent-visuals --disable-gpu
  184 root     157m  28m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=zygote --no-sandbox
  252 root     1.8g  88m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=
 6506 root     2.1g  55m ECAgent          /usr/local/libexec/qemu-hack/ECAgent -E LD_PRELOAD=/usr/local/lib/libthread_reuse.so /usr/share/
 7250 root     7260 3168 su               su daemon -s /usr/sbin/danted -f /run/danted.conf
 7260 daemon    28m 3852 danted           danted -f /run/danted.conf
 7511 daemon    27m 1904 danted           danted: monitor-child
13412 root     1.3g  81m EasyConnect      /usr/share/sangfor/EasyConnect/EasyConnect --type=renderer --no-sandbox --primordial-pipe-token=
14127 root     2104  644 sh               /bin/sh
14168 daemon    28m 2680 danted           danted: request-child: 0/
14169 daemon    28m 2864 danted           danted: negotiate-child:
14170 daemon    28m 2004 danted           danted: request-child: 0/
14171 daemon    28m 2356 danted           danted: negotiate-child:
14172 daemon    28m 2004 danted           danted: request-child: 0/
14173 daemon    28m 2004 danted           danted: request-child: 0/
14174 daemon    28m 2004 danted           danted: request-child: 0/
14175 daemon    28m 2004 danted           danted: request-child: 0/
14176 daemon    28m 2004 danted           danted: request-child: 0/
14177 daemon    28m 2004 danted           danted: request-child: 0/
14178 daemon    28m 2004 danted           danted: request-child: 0/
14179 daemon    28m 2004 danted           danted: request-child: 0/
14180 daemon    28m 2004 danted           danted: request-child: 0/
14181 daemon    28m 2004 danted           danted: request-child: 0/
14182 daemon    28m 2004 danted           danted: request-child: 0/
14183 daemon    28m 2004 danted           danted: request-child: 0/
14184 daemon    28m 2004 danted           danted: request-child: 0/
14185 daemon    28m 2004 danted           danted: request-child: 0/
14186 daemon    28m 2004 danted           danted: request-child: 0/
14187 daemon    29m  12m danted           danted: io-child: 0/32 (0
14188 daemon    29m  12m danted           danted: io-child: 0/32 (0
14189 daemon    29m  12m danted           danted: io-child: 0/32 (0
14190 daemon    29m  12m danted           danted: io-child: 0/32 (0
14191 daemon    29m  12m danted           danted: io-child: 0/32 (0
14192 daemon    29m  12m danted           danted: io-child: 0/32 (0
14193 daemon    29m  12m danted           danted: io-child: 0/32 (0
14194 daemon    29m  12m danted           danted: io-child: 0/32 (0
14195 daemon    29m  12m danted           danted: io-child: 0/32 (0
14196 daemon    29m  12m danted           danted: io-child: 0/32 (0
14197 daemon    29m  12m danted           danted: io-child: 0/32 (0
14198 daemon    29m  12m danted           danted: io-child: 0/32 (0
14204 daemon    29m  12m danted           danted: io-child: 0/32 (0
14205 daemon    29m  12m danted           danted: io-child: 0/32 (0
14206 daemon    29m  12m danted           danted: io-child: 0/32 (0
14207 daemon    29m  12m danted           danted: io-child: 0/32 (0
14208 daemon    29m  12m danted           danted: io-child: 0/32 (0
14209 daemon    29m  12m danted           danted: io-child: 0/32 (0
14210 daemon    29m  12m danted           danted: io-child: 0/32 (0
14211 daemon    29m  12m danted           danted: io-child: 0/32 (0
14212 daemon    29m  12m danted           danted: io-child: 0/32 (0
14213 daemon    29m  12m danted           danted: io-child: 0/32 (0
14214 daemon    29m  12m danted           danted: io-child: 0/32 (0
14215 daemon    29m  12m danted           danted: io-child: 0/32 (0
14216 daemon    29m  12m danted           danted: io-child: 0/32 (0
14217 daemon    29m  12m danted           danted: io-child: 0/32 (0
14221 daemon    29m  12m danted           danted: io-child: 0/32 (0
14222 daemon    29m  12m danted           danted: io-child: 0/32 (0
14223 daemon    29m  12m danted           danted: io-child: 0/32 (0
14224 daemon    29m  12m danted           danted: io-child: 0/32 (0
14225 daemon    29m  12m danted           danted: io-child: 0/32 (0
14226 daemon    29m  12m danted           danted: io-child: 0/32 (0
14227 daemon    29m  12m danted           danted: io-child: 0/32 (0
14228 daemon    29m  12m danted           danted: io-child: 0/32 (0
14229 daemon    29m  12m danted           danted: io-child: 0/32 (0
14230 daemon    29m  12m danted           danted: io-child: 0/32 (0
14231 daemon    29m  12m danted           danted: io-child: 0/32 (0
14232 daemon    29m  12m danted           danted: io-child: 0/32 (0
14233 daemon    29m  12m danted           danted: io-child: 0/32 (0
14234 daemon    29m  12m danted           danted: io-child: 0/32 (0
14235 daemon    29m  12m danted           danted: io-child: 0/32 (0
14236 daemon    29m  12m danted           danted: io-child: 0/32 (0
14237 daemon    29m  12m danted           danted: io-child: 0/32 (0
14238 daemon    29m  12m danted           danted: io-child: 0/32 (0
14239 daemon    29m  12m danted           danted: io-child: 0/32 (0
14240 daemon    29m  12m danted           danted: io-child: 0/32 (0
14241 daemon    29m  12m danted           danted: io-child: 0/32 (0
14242 daemon    29m  12m danted           danted: io-child: 0/32 (0
14243 daemon    29m  12m danted           danted: io-child: 0/32 (0
14244 daemon    29m  12m danted           danted: io-child: 0/32 (0
14245 daemon    29m  12m danted           danted: io-child: 0/32 (0
14246 daemon    29m  12m danted           danted: io-child: 0/32 (0
14247 daemon    29m  12m danted           danted: io-child: 0/32 (0
14248 daemon    29m  12m danted           danted: io-child: 0/32 (0
14249 daemon    29m  12m danted           danted: io-child: 0/32 (0
14250 daemon    29m  12m danted           danted: io-child: 0/32 (0
14251 daemon    29m  12m danted           danted: io-child: 0/32 (0
14252 daemon    29m  12m danted           danted: io-child: 0/32 (0
14253 daemon    29m  12m danted           danted: io-child: 0/32 (0
14254 daemon    29m  12m danted           danted: io-child: 0/32 (0
14255 daemon    29m  12m danted           danted: io-child: 0/32 (0
14256 daemon    29m  12m danted           danted: io-child: 0/32 (0
14257 daemon    29m  12m danted           danted: io-child: 0/32 (0
14258 daemon    29m  12m danted           danted: io-child: 0/32 (0
14259 daemon    29m  12m danted           danted: io-child: 0/32 (0
14260 daemon    29m  12m danted           danted: io-child: 0/32 (0
14261 daemon    29m  12m danted           danted: io-child: 0/32 (0
14262 daemon    29m  12m danted           danted: io-child: 0/32 (0
14263 daemon    29m  12m danted           danted: io-child: 0/32 (0
14264 daemon    29m  12m danted           danted: io-child: 0/32 (0
14265 daemon    29m  12m danted           danted: io-child: 0/32 (0
14266 daemon    29m  12m danted           danted: io-child: 0/32 (0
14267 daemon    29m  12m danted           danted: io-child: 0/32 (0
14268 daemon    29m  12m danted           danted: io-child: 0/32 (0
14269 daemon    29m  12m danted           danted: io-child: 0/32 (0
14270 daemon    29m  12m danted           danted: io-child: 0/32 (0
14271 daemon    29m  12m danted           danted: io-child: 0/32 (0
14272 daemon    29m  12m danted           danted: io-child: 0/32 (0
14273 daemon    29m  12m danted           danted: io-child: 0/32 (0
14274 daemon    29m  12m danted           danted: io-child: 0/32 (0
14275 daemon    29m  12m danted           danted: io-child: 0/32 (0
14276 daemon    29m  12m danted           danted: io-child: 0/32 (0
14277 daemon    29m  12m danted           danted: io-child: 0/32 (0
14278 daemon    29m  12m danted           danted: io-child: 0/32 (0
14279 daemon    29m  12m danted           danted: io-child: 0/32 (0
14280 daemon    29m  12m danted           danted: io-child: 0/32 (0
14281 daemon    29m  12m danted           danted: io-child: 0/32 (0
14282 daemon    29m  12m danted           danted: io-child: 0/32 (0
14283 daemon    29m  12m danted           danted: io-child: 0/32 (0
14284 daemon    29m  12m danted           danted: io-child: 0/32 (0
14285 daemon    29m  12m danted           danted: io-child: 0/32 (0
14286 daemon    29m  12m danted           danted: io-child: 0/32 (0
14287 daemon    29m  12m danted           danted: io-child: 0/32 (0
14288 daemon    29m  12m danted           danted: io-child: 0/32 (0
14289 daemon    29m  12m danted           danted: io-child: 0/32 (0
14290 daemon    29m  12m danted           danted: io-child: 0/32 (0
14295 daemon    29m  12m danted           danted: io-child: 0/32 (0
14296 daemon    29m  12m danted           danted: io-child: 0/32 (0
14297 daemon    29m  12m danted           danted: io-child: 0/32 (0
14298 daemon    29m  12m danted           danted: io-child: 0/32 (0
14299 daemon    29m  12m danted           danted: io-child: 0/32 (0
14300 daemon    29m  12m danted           danted: io-child: 0/32 (0
14301 daemon    29m  12m danted           danted: io-child: 0/32 (0
14302 daemon    29m  12m danted           danted: io-child: 0/32 (0
14303 daemon    29m  12m danted           danted: io-child: 0/32 (0
14304 daemon    29m  12m danted           danted: io-child: 0/32 (0
14305 daemon    29m  12m danted           danted: io-child: 0/32 (0
14306 daemon    29m  12m danted           danted: io-child: 0/32 (0
14307 daemon    29m 9204 danted           danted: io-child: 0/32 (0
14308 daemon    29m 2884 danted           danted: io-child: 0/32 (0
14357 root     2004  604 sleep            sleep 15
14365 root     3012 1980 busybox          busybox ps -o pid,user,vsz,rss,comm,args

补充3:刚准备杀掉容器的时候又观察到新的现象,容器内存不知怎么掉到一个低点,大概 280+M,然后快速飙升至 1.4G,每秒钟上升 100M+ 的那种飙升

@Hagb
Copy link
Collaborator

Hagb commented Mar 28, 2022

~ 看起来内存飙升可能是服务停止、tun0 消失后 socks 服务端 danted 引起的。~

docker logs 容器名 里面有没有什么不寻常的输出不?

另外可以看看容器内 /usr/share/sangfor/EasyConnect/resources/logs 下各个日志文件有没有什么蛛丝马迹?特别是 svpnservice.logECAgent.log
其中可能有可能有 ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. 的行,需要忽略掉,以及 svpnservice.log 里有 sh: 1: route: not found 这样的报错也可以忽略掉。

Update: danted 并不会因为 vpn 的停止而超量使用路由。这里 danted 使用那么多内存不知道是怎么回事,如果设置了内存大小限制并且达到了,有可能 easyconnect 服务因此被 oom killer 杀掉。

@Hagb
Copy link
Collaborator

Hagb commented Mar 28, 2022

日志中确实没有出现这个字样,但是服务挂掉了,无法访问公司网络,当前状态:

服务挂掉后 vnc 里的前端有没有显示什么?

@rea1shane
Copy link
Author

rea1shane commented Mar 29, 2022

昨天晚上有点事情直接给容器删了下班了,今天再继续观察下。

docker logs 容器名 里面有没有什么不寻常的输出不?

这个貌似并没有,最后一句日志为 start svpnservice seccess!

另外可以看看容器内 /usr/share/sangfor/EasyConnect/resources/logs 下各个日志文件有没有什么蛛丝马迹?

这个今天观察下。

Update: danted 并不会因为 vpn 的停止而超量使用路由。这里 danted 使用那么多内存不知道是怎么回事,如果设置了内存大小限制并且达到了,有可能 easyconnect 服务因此被 oom killer 杀掉。

容器并没有设置内存上限,应该不会触发 docker 的 oom killer,今天看看能否复现。

服务挂掉后 vnc 里的前端有没有显示什么?

挂掉后没有再尝试连接前端,我猜测前端已经不能够通过 vnc 连接了,今天如果复现了的话我尝试下。

@rea1shane
Copy link
Author

再次出现服务异常,当前内存 1.5G,docker log 无额外信息输出,vnc 连接正常并且是黑屏,和连接成功时一个状态。

svpnservice.log

ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
sh: 1: route: not found
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
sh: 1: route: not found
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
sh: 1: route: not found
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
sh: 1: route: not found
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
sh: 1: route: not found
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
sh: 1: route: not found
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/local/lib/libthread_reuse.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

看起来都是你预料之内的日志。

ECAgent.log

[2022-03-29 04:09:52][E][  98][Register]cms client connect failed.
[2022-03-29 04:09:52][E][  98][Register]cms client connect failed.
[2022-03-29 04:09:52][E][ 128][Connect]connect to GETDISPLAYMSG5678(0) - CSCLIENT(0) failed, try again later
[2022-03-29 04:09:52][E][ 128][Connect]connect to QRYCLIENT5680(0) - CSCLIENT(0) failed, try again later
[2022-03-29 04:09:52][E][ 169][ConnectDomainSock][cms] /usr/share/sangfor/EasyConnect/resources/conf/ECDomainFile domain socket connect failed, errno:111, errstr:Connection refused.
[2022-03-29 04:09:52][E][ 169][ConnectDomainSock][cms] /usr/share/sangfor/EasyConnect/resources/conf/ECDomainFile domain socket connect failed, errno:111, errstr:Connection refused.
[2022-03-29 04:09:52][E][  98][Register]cms client connect failed.
[2022-03-29 04:09:52][E][  98][Register]cms client connect failed.
[2022-03-29 04:09:52][E][ 128][Connect]connect to GETDISPLAYMSG5678(0) - CSCLIENT(0) failed, try again later
[2022-03-29 04:09:52][E][ 128][Connect]connect to QRYCLIENT5680(0) - CSCLIENT(0) failed, try again later
[2022-03-29 04:09:52][E][ 169][ConnectDomainSock][cms] /usr/share/sangfor/EasyConnect/resources/conf/ECDomainFile domain socket connect failed, errno:111, errstr:Connection refused.
[2022-03-29 04:09:52][E][  98][Register]cms client connect failed.
[2022-03-29 04:09:52][E][ 147][Connect]cms for QRYCLIENT5680 failed, current state connect failed.
[2022-03-29 04:09:52][E][ 128][Connect]connect to GETDISPLAYMSG5678(0) - CSCLIENT(0) failed, try again later
[2022-03-29 04:09:52][E][ 146][Unregister]cms client is null.
[2022-03-29 04:09:52][E][ 169][ConnectDomainSock][cms] /usr/share/sangfor/EasyConnect/resources/conf/ECDomainFile domain socket connect failed, errno:111, errstr:Connection refused.
[2022-03-29 04:09:52][E][  98][Register]cms client connect failed.
[2022-03-29 04:09:52][E][ 128][Connect]connect to GETDISPLAYMSG5678(0) - CSCLIENT(0) failed, try again later
[2022-03-29 04:09:53][E][ 169][ConnectDomainSock][cms] /usr/share/sangfor/EasyConnect/resources/conf/ECDomainFile domain socket connect failed, errno:111, errstr:Connection refused.
[2022-03-29 04:09:53][E][  98][Register]cms client connect failed.
[2022-03-29 04:09:53][E][ 128][Connect]connect to GETDISPLAYMSG5678(0) - CSCLIENT(0) failed, try again later
[2022-03-29 04:09:53][E][ 169][ConnectDomainSock][cms] /usr/share/sangfor/EasyConnect/resources/conf/ECDomainFile domain socket connect failed, errno:111, errstr:Connection refused.
[2022-03-29 04:09:53][E][  98][Register]cms client connect failed.
[2022-03-29 04:09:53][E][ 128][Connect]connect to GETDISPLAYMSG5678(0) - CSCLIENT(0) failed, try again later
[2022-03-29 04:09:53][E][ 169][ConnectDomainSock][cms] /usr/share/sangfor/EasyConnect/resources/conf/ECDomainFile domain socket connect failed, errno:111, errstr:Connection refused.

这个文件的日志一直在输出,我截取了一小段。

@Hagb
Copy link
Collaborator

Hagb commented Mar 29, 2022

看起来似乎是 CSClient 没起来。
日志文件目录下有 CSClient.log 吗?

@rea1shane
Copy link
Author

看起来似乎是 CSClient 没起来。 日志文件目录下有 CSClient.log 吗?

等我再复现一下哈哈

@rea1shane
Copy link
Author

看起来似乎是 CSClient 没起来。 日志文件目录下有 CSClient.log 吗?

日志:

[2022-03-29 07:05:15][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:15][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:15][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:16][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:16][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:16][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:16][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:16][I][ 114][ProcessMessage][browser] recv msgLen:124, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>GETDISPLAYMSG</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:17][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:17][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:17][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:17][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:18][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:18][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:18][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:18][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:19][I][ 114][ProcessMessage][browser] recv msgLen:124, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>GETDISPLAYMSG</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:19][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:19][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:19][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:19][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:19][I][ 114][ProcessMessage][browser] recv msgLen:138, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>HEARTBEAT</Type>
<Argument>3807adea69b4f86d</Argument>
<Note>0</Note>
</BsClient>.
[2022-03-29 07:05:19][I][ 625][ProcessQryHeartBeat][browser] handle heartbeat message, sockname:BSCLIENT.
[2022-03-29 07:05:19][I][ 411][OnWrite][cms] onwrite len:166, data:CMSCCSCLIENT
[2022-03-29 07:05:20][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:20][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:20][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:20][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:21][I][ 683][ProcessServerMsg][timeqry] recv timeout message.
[2022-03-29 07:05:21][I][ 114][ProcessMessage][browser] recv msgLen:124, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>GETDISPLAYMSG</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:21][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:21][I][1242][NotifySysTrayStateChange][timeqry] send l3vpn reconn event
[2022-03-29 07:05:21][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:21][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:21][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:21][I][ 178][ProcessL3vpnEvent][cs] Recive l3vpn event title: L3VPN_STATUS ,content: 1.
[2022-03-29 07:05:21][I][  74][HandleEvent][timeqry] Recive l3vpn event title: L3VPN_STATUS ,content: 1.
[2022-03-29 07:05:21][I][ 178][ProcessL3vpnEvent][cs] Recive l3vpn event title: L3VPN_STATUS ,content: 1.
[2022-03-29 07:05:21][I][  74][HandleEvent][timeqry] Recive l3vpn event title: L3VPN_STATUS ,content: 1.
[2022-03-29 07:05:22][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:22][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:22][I][ 373][Run][timeqry]time query thread stop.
[2022-03-29 07:05:22][I][ 107][StopServices][cs] service logout begin.
[2022-03-29 07:05:22][E][  84][initLogoutInfo]init initLogoutInfo success
[2022-03-29 07:05:22][I][ 115][Run]send logout message start https://1.12.181.71:4433/por/logout.csp?twfid=3807adea69b4f86d&language=en_US
[2022-03-29 07:05:22][I][ 245][Stop][CS] module to stop, module = DNS wait = 0
[2022-03-29 07:05:22][I][ 245][Stop][CS] module to stop, module = L3VPN wait = 0
[2022-03-29 07:05:22][I][ 245][Stop][CS] module to stop, module = TCP wait = 0
[2022-03-29 07:05:22][I][ 245][Stop][CS] module to stop, module = VIRTUALLINE wait = 0
[2022-03-29 07:05:22][I][ 118][StopServices][cs] TimeQryService service stop success.
[2022-03-29 07:05:22][I][ 117][Run]send logout message over ret = 0, httpstatus = 200, errmsg = , response = <?xml version="1.0" encoding="utf-8"?>
<Auth>
	<Message><![CDATA[logout user success]]></Message>
	<ErrorCode>1</ErrorCode>
</Auth>

[2022-03-29 07:05:22][I][ 411][OnWrite][cms] onwrite len:329, data:CMSCCSCLIENT
[2022-03-29 07:05:22][I][ 114][ProcessMessage][browser] recv msgLen:119, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>BSLOGOUT</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:22][I][ 645][ProcessBSLogout][browser] handler bs logout message.
[2022-03-29 07:05:22][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:22][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:22][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:22][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:22][I][ 123][processModuleStopEvent]CS module stop result event. module = DNS
[2022-03-29 07:05:22][I][ 123][processModuleStopEvent]CS module stop result event. module = L3VPN
[2022-03-29 07:05:22][I][ 123][processModuleStopEvent]CS module stop result event. module = TCP
[2022-03-29 07:05:22][I][ 123][processModuleStopEvent]CS module stop result event. module = VIRTUALLINE
[2022-03-29 07:05:23][I][ 120][StopServices][cs] BrowseService service stop success.
[2022-03-29 07:05:23][I][ 140][UninitService]EventService send EC_EVENT_NAME_CSSHUTDOWN
[2022-03-29 07:05:23][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:23][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:23][E][ 311][Run][tevent] event threads exit.
[2022-03-29 07:05:23][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:23][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:23][E][ 211][SendEvent][tevent] thread is not inited.
[2022-03-29 07:05:23][I][ 157][Run][event] service bridge thread exit.
[2022-03-29 07:05:23][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:23][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:23][I][ 122][StopServices][cs] EventService service stop success.
[2022-03-29 07:05:25][E][ 211][SendEvent][tevent] thread is not inited.
[2022-03-29 07:05:27][E][ 211][SendEvent][tevent] thread is not inited.
[2022-03-29 07:05:29][E][ 211][SendEvent][tevent] thread is not inited.
[2022-03-29 07:05:30][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:30][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:30][I][ 124][StopServices][cs] CmsServiceManager service stop success.
[2022-03-29 07:05:30][I][ 126][StopServices][cs] RcService service stop success.
[2022-03-29 07:05:30][I][ 128][StopServices][cs] ConfService service stop success.
[2022-03-29 07:05:30][I][ 130][StopServices][cs] HardIDService service stop success.
[2022-03-29 07:05:30][I][ 132][StopServices][cs] TrayService service stop success.
[2022-03-29 07:05:31][I][ 134][StopServices][cs] CsManagerService service stop success.
[2022-03-29 07:05:31][I][ 139][StopServices][cs] service logout end.

@Hagb
Copy link
Collaborator

Hagb commented Mar 29, 2022

看起来似乎是 CSClient 没起来。 日志文件目录下有 CSClient.log 吗?

日志:

[2022-03-29 07:05:15][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:15][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:15][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:16][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:16][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:16][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:16][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:16][I][ 114][ProcessMessage][browser] recv msgLen:124, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>GETDISPLAYMSG</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:17][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:17][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:17][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:17][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:18][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:18][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:18][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:18][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:19][I][ 114][ProcessMessage][browser] recv msgLen:124, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>GETDISPLAYMSG</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:19][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:19][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:19][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:19][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:19][I][ 114][ProcessMessage][browser] recv msgLen:138, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>HEARTBEAT</Type>
<Argument>3807adea69b4f86d</Argument>
<Note>0</Note>
</BsClient>.
[2022-03-29 07:05:19][I][ 625][ProcessQryHeartBeat][browser] handle heartbeat message, sockname:BSCLIENT.
[2022-03-29 07:05:19][I][ 411][OnWrite][cms] onwrite len:166, data:CMSCCSCLIENT
[2022-03-29 07:05:20][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:20][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:20][I][ 287][GetServiceState][cs] service query,module: L3VPN status: 2.
[2022-03-29 07:05:20][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:21][I][ 683][ProcessServerMsg][timeqry] recv timeout message.
[2022-03-29 07:05:21][I][ 114][ProcessMessage][browser] recv msgLen:124, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>GETDISPLAYMSG</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:21][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:21][I][1242][NotifySysTrayStateChange][timeqry] send l3vpn reconn event
[2022-03-29 07:05:21][I][ 114][ProcessMessage][browser] recv msgLen:122, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>LOGINSTATUS</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:21][I][ 747][ProcessLoginStatus][browser] handler LOGINSTATUS message.
[2022-03-29 07:05:21][I][  51][InitSecurityCheckConf]InitSecurityCheckConf do not find SecurityCheck
[2022-03-29 07:05:21][I][ 178][ProcessL3vpnEvent][cs] Recive l3vpn event title: L3VPN_STATUS ,content: 1.
[2022-03-29 07:05:21][I][  74][HandleEvent][timeqry] Recive l3vpn event title: L3VPN_STATUS ,content: 1.
[2022-03-29 07:05:21][I][ 178][ProcessL3vpnEvent][cs] Recive l3vpn event title: L3VPN_STATUS ,content: 1.
[2022-03-29 07:05:21][I][  74][HandleEvent][timeqry] Recive l3vpn event title: L3VPN_STATUS ,content: 1.
[2022-03-29 07:05:22][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:22][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:22][I][ 373][Run][timeqry]time query thread stop.
[2022-03-29 07:05:22][I][ 107][StopServices][cs] service logout begin.
[2022-03-29 07:05:22][E][  84][initLogoutInfo]init initLogoutInfo success
[2022-03-29 07:05:22][I][ 115][Run]send logout message start https://1.12.181.71:4433/por/logout.csp?twfid=3807adea69b4f86d&language=en_US
[2022-03-29 07:05:22][I][ 245][Stop][CS] module to stop, module = DNS wait = 0
[2022-03-29 07:05:22][I][ 245][Stop][CS] module to stop, module = L3VPN wait = 0
[2022-03-29 07:05:22][I][ 245][Stop][CS] module to stop, module = TCP wait = 0
[2022-03-29 07:05:22][I][ 245][Stop][CS] module to stop, module = VIRTUALLINE wait = 0
[2022-03-29 07:05:22][I][ 118][StopServices][cs] TimeQryService service stop success.
[2022-03-29 07:05:22][I][ 117][Run]send logout message over ret = 0, httpstatus = 200, errmsg = , response = <?xml version="1.0" encoding="utf-8"?>
<Auth>
	<Message><![CDATA[logout user success]]></Message>
	<ErrorCode>1</ErrorCode>
</Auth>

[2022-03-29 07:05:22][I][ 411][OnWrite][cms] onwrite len:329, data:CMSCCSCLIENT
[2022-03-29 07:05:22][I][ 114][ProcessMessage][browser] recv msgLen:119, msg:<?xml version="1.0" encoding="utf-8"?>
<BsClient>
<Type>BSLOGOUT</Type>
<Argument></Argument>
<Note></Note>
</BsClient>.
[2022-03-29 07:05:22][I][ 645][ProcessBSLogout][browser] handler bs logout message.
[2022-03-29 07:05:22][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:22][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:22][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:22][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:22][I][ 123][processModuleStopEvent]CS module stop result event. module = DNS
[2022-03-29 07:05:22][I][ 123][processModuleStopEvent]CS module stop result event. module = L3VPN
[2022-03-29 07:05:22][I][ 123][processModuleStopEvent]CS module stop result event. module = TCP
[2022-03-29 07:05:22][I][ 123][processModuleStopEvent]CS module stop result event. module = VIRTUALLINE
[2022-03-29 07:05:23][I][ 120][StopServices][cs] BrowseService service stop success.
[2022-03-29 07:05:23][I][ 140][UninitService]EventService send EC_EVENT_NAME_CSSHUTDOWN
[2022-03-29 07:05:23][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:23][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:23][E][ 311][Run][tevent] event threads exit.
[2022-03-29 07:05:23][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:23][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:23][E][ 211][SendEvent][tevent] thread is not inited.
[2022-03-29 07:05:23][I][ 157][Run][event] service bridge thread exit.
[2022-03-29 07:05:23][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:23][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:23][I][ 122][StopServices][cs] EventService service stop success.
[2022-03-29 07:05:25][E][ 211][SendEvent][tevent] thread is not inited.
[2022-03-29 07:05:27][E][ 211][SendEvent][tevent] thread is not inited.
[2022-03-29 07:05:29][E][ 211][SendEvent][tevent] thread is not inited.
[2022-03-29 07:05:30][I][ 216][LogoutSvpn][cs] manager begin to logout.
[2022-03-29 07:05:30][I][ 219][LogoutSvpn][cs] manager logoutint....
[2022-03-29 07:05:30][I][ 124][StopServices][cs] CmsServiceManager service stop success.
[2022-03-29 07:05:30][I][ 126][StopServices][cs] RcService service stop success.
[2022-03-29 07:05:30][I][ 128][StopServices][cs] ConfService service stop success.
[2022-03-29 07:05:30][I][ 130][StopServices][cs] HardIDService service stop success.
[2022-03-29 07:05:30][I][ 132][StopServices][cs] TrayService service stop success.
[2022-03-29 07:05:31][I][ 134][StopServices][cs] CsManagerService service stop success.
[2022-03-29 07:05:31][I][ 139][StopServices][cs] service logout end.

从日志上看有一些和线程有关的报错,确实可能和 thread_reuse workaround 的应用有关。
事实上 thread_reuse 考虑的范围并没有完全覆盖 pthread 关于线程创建、取消的各种用法,仅仅是实现了 easyconnect 用到的那一部分。不过刚才仔细看了看代码也还是有一些问题,可能还得仔细修正一下。
可以试试将容器里的 /usr/share/sangfor/EasyConnect/resources/bin/CSClient 中的 ${qemu_args} 给去掉再启动容器(如果还不行的话,甚至 EasyMonitorECAgent 也作此更改),这可以对这(几)个程序取消 workaround 的应用。

PS: 不额外安装软件包的情况下容器里可以使用 busybox vi 来编辑

@rea1shane
Copy link
Author

可以试试将容器里的 /usr/share/sangfor/EasyConnect/resources/bin/CSClient 中的 ${qemu_args} 给去掉再启动容器(如果还不行的话,甚至 EasyMonitor、ECAgent 也作此更改),这可以对这(几)个程序取消 workaround 的应用。

好的,那除了 workaround,还有其他办法解决之前的内存溢出么?

@Hagb
Copy link
Collaborator

Hagb commented Mar 29, 2022

可以试试将容器里的 /usr/share/sangfor/EasyConnect/resources/bin/CSClient 中的 ${qemu_args} 给去掉再启动容器(如果还不行的话,甚至 EasyMonitor、ECAgent 也作此更改),这可以对这(几)个程序取消 workaround 的应用。

好的,那除了 workaround,还有其他办法解决之前的内存溢出么?

除了 workaround,就是直接解决 qemu 的 bug 了…
还有一种方案是使用 https://github.com/ptitSeb/box64 替代 qemu 进行模拟,通过适当的配置很可能还可以得到比 qemu 好上不少的性能。但是短时间内我没法做这件事情了(事实上我是配了 qemu 的容器之后才知道 box64、box86 项目的,不然我一开始会拿 box64 而不是 qemu-user 来做)。

@Hagb
Copy link
Collaborator

Hagb commented Mar 30, 2022

事实上 thread_reuse 考虑的范围并没有完全覆盖 pthread 关于线程创建、取消的各种用法,仅仅是实现了 easyconnect 用到的那一部分。不过刚才仔细看了看代码也还是有一些问题,可能还得仔细修正一下。

对 libthread_reuse 的做了一些修复并更新了 thread_reuse 分支 bca6377 (不一定能解决上面的问题)

@Hagb Hagb changed the title m1 pro mac 使用命令行启动无法正常创建路由 arm64 的图形界面版容器支持 Mar 30, 2022
@rea1shane
Copy link
Author

对 libthread_reuse 的做了一些修复并更新了 thread_reuse 分支 bca6377 (不一定能解决上面的问题)

好的,我有空测试一下,现在已经返回公司办公,easyconnect 的使用频率会大大降低。

还有一种方案是使用 https://github.com/ptitSeb/box64 替代 qemu 进行模拟,通过适当的配置很可能还可以得到比 qemu 好上不少的性能。但是短时间内我没法做这件事情了(事实上我是配了 qemu 的容器之后才知道 box64、box86 项目的,不然我一开始会拿 box64 而不是 qemu-user 来做)。

那就等有机会再更新吧哈哈,我有空的时候也会去了解一下。

@ErickWei
Copy link

期待更新啊,到目前为止,M1 Mac上没有能完美运行的版本

@TurnOffNOD
Copy link

另外,对于在 Mac 上完全移除 easy-connect 你有什么经验么?

重装?

@rea1shane
Copy link
Author

另外,对于在 Mac 上完全移除 easy-connect 你有什么经验么?

重装?

我按照这些文档卸载了 easy-connect,姑且当做是干净卸载了吧😐

#128 (comment)

@whitehole-Z
Copy link

我切换到了thread_reuse分支,系统是12.5.1,M1pro,在执行时出现了以下的报错
image

@Hagb
Copy link
Collaborator

Hagb commented Sep 22, 2022

我切换到了thread_reuse分支,系统是12.5.1,M1pro,在执行时出现了以下的报错 image

@whitehole-Z 尝试将 build-scripts/set-mirror.sh 里的 replaced="${origin//$default_mirror/$MIRROR_URL}" 改成 replaced="${origin//$default_mirror /$MIRROR_URL }"

@Hagb
Copy link
Collaborator

Hagb commented Sep 24, 2022

现在应该可以使用 arm64 原生的 EasyConnect 了:#25 (comment)

@rea1shane
Copy link
Author

现在应该可以使用 arm64 原生的 EasyConnect 了:#25 (comment)

给力,国庆说不定有机会试用,到时候会反馈。

@rea1shane
Copy link
Author

Hi 大佬,好久没有跟进这个 issue 了,对此深感抱歉。

我们公司现在需要通过两步验证登录 vpn,我现在有以下问题:

  1. 请问现在是否只有图形化的方式才支持两步验证呢?
  2. 我应该从哪个分支构建镜像?
  3. 启动方式按照 main 分支的 README 即可么?

感谢大佬做出的贡献~

@rea1shane
Copy link
Author

Hi, @Hagb 如果想要更及时的测试反馈,可以在 @discord 上联系我 rea1shane#6075。

@Hagb
Copy link
Collaborator

Hagb commented Oct 18, 2022

@rea1shane

Hi 大佬,好久没有跟进这个 issue 了,对此深感抱歉。

没有没有。而且我最近也挺忙了(不过有什么问题也可以及时反馈,我有空会看的)

我们公司现在需要通过两步验证登录 vpn,我现在有以下问题:

1. 请问现在是否只有图形化的方式才支持两步验证呢?

2. 我应该从哪个分支构建镜像?

如果 amd64 的话 master 就可以,如果非 amd64 的话用 develop 分支(构建方式还未写入文档,现在可在 #25 (comment) 找到)

3. 启动方式按照 main 分支的 README 即可么?

构建完成后启动方式是一样的,master 分支的 README 就可以(vnc 版的)

@Hagb
Copy link
Collaborator

Hagb commented Jun 24, 2023

arm64 版本的镜像(dev 版)已经 push 到 docker hub 上。现在可以试一下使用 hagb/docker-easyconnect:dev-7.6.7 这个镜像(应该要加 -e DISABLE_PKG_VERSION_XML=1 参数)

@rea1shane
Copy link
Author

好的!我会在需要的时候进行测试。

Hagb added a commit that referenced this issue Jul 26, 2023
@Hagb Hagb closed this as completed in #263 Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants