docker-easyconnect / docker-easyconnect

使深信服(Sangfor)开发的非自由的 VPN 软件 EasyConnect 和 aTrust 运行在 docker 或 podman 中,并作为网关和/或提供 socks5、http 代理服务

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

7.6.3图形界面版容器删除重启后卡在图标明暗交替处

Cmizi opened this issue · comments

初次拉取后容器可以正常运行。因为我是部署在局域网内的服务器上,想要能够在web端进行操作,需要将容器删除后重新运行镜像。再次启动后可以登录VNC,但是卡在连接图标明暗交替处。
这是拉取的代码
docker run --device /dev/net/tun --cap-add NET_ADMIN -ti -e PASSWORD=xxxx -v $HOME/.ecdata:/root -p 5901:5901 -p 1080:1080 hagb/docker-easyconnect:7.6.3

以下是容器的日志

Error: ipv4: FIB table does not exist.
Flush terminated
RTNETLINK answers: Operation not permitted
RTNETLINK answers: Operation not permitted
RTNETLINK answers: Operation not permitted
RTNETLINK answers: Operation not permitted
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)
RTNETLINK answers: Operation not permitted
WARNING: logging deactivated (can't log to stdout when daemonized)
getsockopt failed strangely: Operation not permitted
getsockopt failed strangely: Operation not permitted
iptables v1.8.9 (legacy): can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.8.9 (legacy): can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
ioctl(TUNSETIFF): Operation not permitted
Failed to create tun interface! Please check whether /dev/net/tun is available.
Also refer to https://github.com/Hagb/docker-easyconnect/blob/master/doc/faq.md.
/
getsockopt failed strangely: Operation not permitted
iptables v1.8.9 (legacy): can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
Cleaning stale pidfile '/root/.vnc/d2f319b59da4:1.pid'!

New Xtigervnc server 'd2f319b59da4:1 (root)' on port 5901 for display :1.
Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /tmp/tigervnc.EFl8Bm/passwd d2f319b59da4:1 to connect to the VNC server.

(node:113) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:113) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:113) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.

按照faq.md排查后发现输出并没有tun0,但是tun模块正常加载。
按照route.md进行操作。但是问题并没有改善。

已解决,经过排查后发现是root权限的问题。在docker-compose中添加privileged: true后就可以正常运行。
不过还有个疑问是,使用sudo docker run hagb/docker-easyconnect:7.6.3启动容器后,还是与上方报错一样,没有root权限。而再次通过docker run --device /dev/net/tun --cap-add NET_ADMIN -ti -e PASSWORD=xxxx -v $HOME/.ecdata:/root -p 5901:5901 -p 1080:1080 hagb/docker-easyconnect:7.6.3启动容器才能正常运行。