小樱 发表于 2021/7/15 19:26

cdnbest管理系统节点每隔一段时间就重启kangle进程是什么情况,log日志看到如下,原来是自动更新升级

cdnbest管理系统节点每隔一段时间就重启kangle进程是什么情况,log日志看到如下,原来是自动更新升级

cat /var/log/cdnbest.log | grep reboot

通过日志可以看到每隔5个小时整跳出一次
Wed Jul7 07:44:47|register server
Thu Jul8 12:45:11|register server
Fri Jul9 17:45:41|register server
Sat Jul 10 22:46:12|register server
Mon Jul 12 03:46:42|register server
Tue Jul 13 08:47:12|register server
Wed Jul 14 13:47:41|register server
Thu Jul 15 18:48:11|register server

看了下完整日志,原来是cdnbest节点会自动更新升级kangle程序,和主控无关
Thu Jul 15 18:46:41|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=dump_flow&extend=4
Thu Jul 15 18:46:41|   tryuse unix socket success
Thu Jul 15 18:46:41|WLWLWL      job op= seq= sync= body []
Thu Jul 15 18:47:11|    handling package,msg= &{20}
Thu Jul 15 18:47:11|slave trying to log
Thu Jul 15 18:47:11|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=dump_flow&extend=4
Thu Jul 15 18:47:11|   tryuse unix socket success
Thu Jul 15 18:47:11|WLSLWLWL    job op= seq= sync= body []
Thu Jul 15 18:47:41|    handling package,msg= &{20}
Thu Jul 15 18:47:41|slave trying to log
Thu Jul 15 18:47:41|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=dump_flow&extend=4
Thu Jul 15 18:47:41|   tryuse unix socket success
Thu Jul 15 18:47:41|   start time sleep auto update
Thu Jul 15 18:47:42|autoupdate now...
Thu Jul 15 18:47:42|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=info&
Thu Jul 15 18:47:42|   tryuse unix socket success
Thu Jul 15 18:47:42|    autoupdate end,os exit...
Thu Jul 15 18:47:42|WLWLWL      job op= seq= sync= body []
Thu Jul 15 18:48:11|    handling package,msg= &{20}
Thu Jul 15 18:48:11|slave trying to log
Thu Jul 15 18:48:11|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=dump_flow&extend=4
Thu Jul 15 18:48:11|   tryuse unix socket success
Thu Jul 15 18:48:11|exit_code=cbslave version= go version
Thu Jul 15 18:48:11|time is ,os is
Thu Jul 15 18:48:11|update vhs.db start...
Thu Jul 15 18:48:11|the lock num is 18
Thu Jul 15 18:48:11|the update num is 18
Thu Jul 15 18:48:11|    the seq is,the update_seq is
Thu Jul 15 18:48:11|uid file not isset
Thu Jul 15 18:48:11|run init cmd error
Thu Jul 15 18:48:11|run init cmd error
Thu Jul 15 18:48:11|run init cmd error
Thu Jul 15 18:48:11|run init cmd error
Thu Jul 15 18:48:11|run init cmd error
Thu Jul 15 18:48:11|run init cmd error
Thu Jul 15 18:48:11|run init cmd error
Thu Jul 15 18:48:11|run init cmd error
Thu Jul 15 18:48:11|run init cmd error
Thu Jul 15 18:48:11|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=reload_vh&
Thu Jul 15 18:48:11|   tryuse unix socket success
Thu Jul 15 18:48:11|kangle reload vh=[],success
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|register server
Thu Jul 15 18:48:11|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=info&
Thu Jul 15 18:48:11|   tryuse unix socket success
Thu Jul 15 18:48:11|kangle version=
Thu Jul 15 18:48:11|engine start..
Thu Jul 15 18:48:12|    load config....
Thu Jul 15 18:48:12|load router count
Thu Jul 15 18:48:12|build vhost info to json file
Thu Jul 15 18:48:12|    uid=,sid=,sync_seq=...
Thu Jul 15 18:48:12|wayland goroutine start..
Thu Jul 15 18:48:12|WL   start time sleep auto update
Thu Jul 15 18:48:12|try connect to master......................
Thu Jul 15 18:48:12|    get licnese info...
Thu Jul 15 18:48:12|    get license info laddr=[] index=


看了下只有节点空闲的情况下,无访问情况时,cdnbest才会执行这个操作,虽然对用户访问没影响,使用的是无感知平滑重启,访客访问不会受到中断。
但是会丢失内存缓存数据,比如说节点缓存了100G内存数据,重启后就丢失了需要重新进行内存缓存导致命中率变低。

看了下没被升级的节点跳出错误如下
Sat Jul 24 05:48:11|WLWLSL      autoupdate download failed,err   autoupdate autoupdate2.conf is not found

那么就好解决了,用这条命令关闭节点自动更新
mv /vhs/kangle/bin/autoupdate /vhs/kangle/bin/autoupdate.bak

成功关闭自动升级后效果,此时kangle进程不会被重启
Sun Jul 25 10:51:11|autoupdate now...
Sun Jul 25 10:51:11|        autoupdate download failed,err        autoupdate autoupdate2.conf is not found

不可名 发表于 2021/7/19 08:23

{:3033:}

dany 发表于 2021/12/31 22:10

哇 日志中还可以看到操作的iptables,原来是cdnbest操作的,我还以为kangle能直接操作。

小樱 发表于 2021/12/31 23:06

dany 发表于 2021/12/31 22:10
哇 日志中还可以看到操作的iptables,原来是cdnbest操作的,我还以为kangle能直接操作。

iptables是kangle操作的,cdnbest负责通知kangle api
https://bbs.itzmx.com/thread-9269-1-1.html
页: [1]
查看完整版本: cdnbest管理系统节点每隔一段时间就重启kangle进程是什么情况,log日志看到如下,原来是自动更新升级