kuoruan / luci-app-kcptun

LuCI support for kcptun
Apache License 2.0
316 stars 84 forks source link

开机启动失败,手动保存应用一下能启动成功。 #10

Closed ninggu2008 closed 7 years ago

ninggu2008 commented 7 years ago
2016/12/05 05:33:03 main.go:259: version: SELFBUILD
2016/12/05 05:33:09 main.go:295: listening on: [::]:1082
2016/12/05 05:33:09 main.go:296: encryption: salsa20
2016/12/05 05:33:09 main.go:297: nodelay parameters: 0 30 2 1
2016/12/05 05:33:09 main.go:298: remote address: 1.1.1.1:29900
2016/12/05 05:33:09 main.go:299: sndwnd: 48 rcvwnd: 160
2016/12/05 05:33:09 main.go:300: compression: false
2016/12/05 05:33:09 main.go:301: mtu: 1350
2016/12/05 05:33:09 main.go:302: datashard: 10 parityshard: 3
2016/12/05 05:33:09 main.go:303: acknodelay: false
2016/12/05 05:33:09 main.go:304: dscp: 0
2016/12/05 05:33:09 main.go:305: sockbuf: 4194304
2016/12/05 05:33:09 main.go:306: keepalive: 10
2016/12/05 05:33:09 main.go:307: conn: 1
2016/12/05 05:33:09 main.go:308: autoexpire: 0
2016/12/05 05:33:09 main.go:78: dial udp 1.1.1.1:29900: ENETUNREACH
net.DialUDP
github.com/xtaci/kcp-go.DialWithOptions
    /opt/mipsgo/src/github.com/xtaci/kcp-go/sess.go:903
main.func路003
    /home/openwrt/kcptun/client/main.go:314
main.func路005
    /home/openwrt/kcptun/client/main.go:366
runtime.call16
    /home/openwrt/go-mips32/src/runtime/asm_mips32x.s:288
reflect.Value.call
    /opt/mipsgo/src/reflect/value.go:419
reflect.Value.Call
    /opt/mipsgo/src/reflect/value.go:296
github.com/urfave/cli.HandleAction
    /opt/mipsgo/src/github.com/urfave/cli/app.go:487
github.com/urfave/cli.(*App).Run
    /opt/mipsgo/src/github.com/urfave/cli/app.go:245
main.main
    /home/openwrt/kcptun/client/main.go:406
runtime.main
    /home/openwrt/go-mips32/src/runtime/proc.go:63
runtime.goexit
    /home/openwrt/go-mips32/src/runtime/asm_mips32x.s:932
createConn()
main.func路003
    /home/openwrt/kcptun/client/main.go:316
main.func路005
    /home/openwrt/kcptun/client/main.go:366
runtime.call16
    /home/openwrt/go-mips32/src/runtime/asm_mips32x.s:288
reflect.Value.call
    /opt/mipsgo/src/reflect/value.go:419
reflect.Value.Call
    /opt/mipsgo/src/reflect/value.go:296
github.com/urfave/cli.HandleAction
    /opt/mipsgo/src/github.com/urfave/cli/app.go:487
github.com/urfave/cli.(*App).Run
    /opt/mipsgo/src/github.com/urfave/cli/app.go:245
main.main
    /home/openwrt/kcptun/client/main.go:406
runtime.main
    /home/openwrt/go-mips32/src/runtime/proc.go:63
runtime.goexit
    /home/openwrt/go-mips32/src/runtime/asm_mips32x.s:932

日志如下,似乎运行出错了?是不是还没拨上号连上网就开始试图通信导致出错?(我把真实ip替换成1.1.1.1隐藏了) 补充一下,我路由设置了多拨。拨号和普通路由不太一样。

kuoruan commented 7 years ago

对,是这个问题。我会在新版里边处理一下的

kuoruan commented 7 years ago

新版本添加了进程监控,发现进程异常退出会重启 Kcptun,差不多能解决这个问题吧

ninggu2008 commented 7 years ago

@kuoruan 似乎还是有问题。我用的release版本1.20,发现勾选进程监控保存以后,重启,等几分钟kcptun都没运行(理应1分钟检查一次),进程监控没启动,然后看到etc/crontabs/root里面是空的,再次保存设置一次(进程监控勾选了的),客户端开始运行,但是crontabs/root里面还是空的,也就是说这个设置没起效。我手动把/1 * /usr/bin/kcptun_monitor加入/etc/crontabs/root,再重启,这次终于正常了。

kuoruan commented 7 years ago

sed -i '$a */1 * * * * /usr/bin/kcptun_monitor' /etc/crontabs/root 这个能正常插入吗?

ninggu2008 commented 7 years ago

@kuoruan 我不明白啥意思?插入哪里?

kuoruan commented 7 years ago

试试看上面那条命令能向 /etc/crontabs/root 插入内容吗

kuoruan commented 7 years ago

已修复 https://github.com/kuoruan/luci-app-kcptun/commit/2d7345c3c55ffe8dc0e299c47d6663d92123129f