设为首页收藏本站

ZMX - IT技术交流论坛 - 无限Perfect,追求梦想 - itzmx.com

 找回密码
 注册论坛

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

用百度帐号登录

只需两步,快速登录

搜索
查看: 187|回复: 1

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

[复制链接]
 成长值: 27530

签到天数: 3553 天

[LV.Master]伴坛终老

发表于 2021/7/15 19:26 | 显示全部楼层 |阅读模式 |Google Chrome 91.0.4472.124|Windows 10
天涯海角搜一下: 百度 谷歌 360 搜狗 有道 雅虎 必应 即刻
cdnbest管理系统节点每隔一段时间就重启kangle进程是什么情况,log日志看到如下,原来是自动更新升级

  1. cat /var/log/cdnbest.log | grep reboot
复制代码


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


看了下完整日志,原来是cdnbest节点会自动更新升级kangle程序,和主控无关
  1. Thu Jul 15 18:46:41|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=dump_flow&extend=4
  2. Thu Jul 15 18:46:41|     try[0]use unix socket success
  3. Thu Jul 15 18:46:41|WLWLWL      job op=[20] seq=[0] sync=[0] body []
  4. Thu Jul 15 18:47:11|    handling package,msg= &{20}
  5. Thu Jul 15 18:47:11|slave trying to log
  6. Thu Jul 15 18:47:11|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=dump_flow&extend=4
  7. Thu Jul 15 18:47:11|     try[0]use unix socket success
  8. Thu Jul 15 18:47:11|WLSLWLWL    job op=[20] seq=[0] sync=[0] body []
  9. Thu Jul 15 18:47:41|    handling package,msg= &{20}
  10. Thu Jul 15 18:47:41|slave trying to log
  11. Thu Jul 15 18:47:41|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=dump_flow&extend=4
  12. Thu Jul 15 18:47:41|     try[0]use unix socket success
  13. Thu Jul 15 18:47:41|     start time sleep auto update
  14. Thu Jul 15 18:47:42|autoupdate now...
  15. Thu Jul 15 18:47:42|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=info&
  16. Thu Jul 15 18:47:42|     try[0]use unix socket success
  17. Thu Jul 15 18:47:42|    autoupdate end,os exit...
  18. Thu Jul 15 18:47:42|WLWLWL      job op=[20] seq=[0] sync=[0] body []
  19. Thu Jul 15 18:48:11|    handling package,msg= &{20}
  20. Thu Jul 15 18:48:11|slave trying to log
  21. Thu Jul 15 18:48:11|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=dump_flow&extend=4
  22. Thu Jul 15 18:48:11|     try[0]use unix socket success
  23. Thu Jul 15 18:48:11|exit_code=[99]cbslave version=[4.6.4] go version [go1.13.10]
  24. Thu Jul 15 18:48:11|time is [202107151848],os is [linux]
  25. Thu Jul 15 18:48:11|update vhs.db start...
  26. Thu Jul 15 18:48:11|the lock num is 18
  27. Thu Jul 15 18:48:11|the update num is 18
  28. Thu Jul 15 18:48:11|    the seq is[18],the update_seq is [18]
  29. Thu Jul 15 18:48:11|uid file not isset
  30. Thu Jul 15 18:48:11|run init cmd[/sbin/iptables -D INPUT -m set --match-set blacklist src -j DROP] error[exit status 1]
  31. Thu Jul 15 18:48:11|run init cmd[/sbin/iptables -D INPUT -m set --match-set whitelist src -j ACCEPT] error[exit status 1]
  32. Thu Jul 15 18:48:11|run init cmd[/usr/sbin/ipset create blacklist hash:ip timeout 3600] error[exit status 1]
  33. Thu Jul 15 18:48:11|run init cmd[/usr/sbin/ipset create whitelist hash:ip timeout 3600] error[exit status 1]
  34. Thu Jul 15 18:48:11|run init cmd[/sbin/iptables -N kangle] error[exit status 1]
  35. Thu Jul 15 18:48:11|run init cmd[/sbin/iptables -D INPUT ! -s 127.0.0.1 -j kangle] error[exit status 1]
  36. Thu Jul 15 18:48:11|run init cmd[/sbin/iptables -D INPUT -j kangle] error[exit status 1]
  37. Thu Jul 15 18:48:11|run init cmd[/sbin/iptables -D INPUT ! -s 127.0.0.1 -j kangle] error[exit status 1]
  38. Thu Jul 15 18:48:11|run init cmd[/sbin/iptables -D INPUT -j kangle] error[exit status 1]
  39. Thu Jul 15 18:48:11|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=reload_vh&
  40. Thu Jul 15 18:48:11|     try[0]use unix socket success
  41. Thu Jul 15 18:48:11|kangle reload vh=[],success
  42. Thu Jul 15 18:48:11|register server [hello]
  43. Thu Jul 15 18:48:11|register server [init]
  44. Thu Jul 15 18:48:11|register server [edit_kangle]
  45. Thu Jul 15 18:48:11|register server [reboot]
  46. Thu Jul 15 18:48:11|register server [get_info]
  47. Thu Jul 15 18:48:11|register server [get_connection]
  48. Thu Jul 15 18:48:11|register server [cache_prefetch]
  49. Thu Jul 15 18:48:11|register server [cache_info]
  50. Thu Jul 15 18:48:11|register server [dump_load]
  51. Thu Jul 15 18:48:11|register server [del_node]
  52. Thu Jul 15 18:48:11|register server [autoupdate]
  53. Thu Jul 15 18:48:11|register server [reset]
  54. Thu Jul 15 18:48:11|register server [querykangle]
  55. Thu Jul 15 18:48:11|register server [queryrouter]
  56. Thu Jul 15 18:48:11|register server [queryserver]
  57. Thu Jul 15 18:48:11|register server [check_ssl]
  58. Thu Jul 15 18:48:11|register server [queryall]
  59. Thu Jul 15 18:48:11|register server [clearcache]
  60. Thu Jul 15 18:48:11|register server [querydomain]
  61. Thu Jul 15 18:48:11|register server [vhostcleancache]
  62. Thu Jul 15 18:48:11|register server [clearallcache]
  63. Thu Jul 15 18:48:11|register server [add_monitor_advanced]
  64. Thu Jul 15 18:48:11|register server [get_vhost_info]
  65. Thu Jul 15 18:48:11|register server [get_vhost_config_info]
  66. Thu Jul 15 18:48:11|register server [flushengine]
  67. Thu Jul 15 18:48:11|register server [clear_url_cache]
  68. Thu Jul 15 18:48:11|register server [add_preload_url_task]
  69. Thu Jul 15 18:48:11|register server [get_preload_url_task]
  70. Thu Jul 15 18:48:11|register server [del_preload_url_task]
  71. Thu Jul 15 18:48:11|register server [cancel_preload_url_task]
  72. Thu Jul 15 18:48:11|register server [query_all_module]
  73. Thu Jul 15 18:48:11|register server [update_node_name]
  74. Thu Jul 15 18:48:11|connect kangle url http://127.0.0.1:3311/core.whm?whm_call=info&
  75. Thu Jul 15 18:48:11|     try[0]use unix socket success
  76. Thu Jul 15 18:48:11|kangle version=[3.5.21.16]
  77. Thu Jul 15 18:48:11|engine start..
  78. Thu Jul 15 18:48:12|    load config....
  79. Thu Jul 15 18:48:12|load router count [0]
  80. Thu Jul 15 18:48:12|build vhost info to json file
  81. Thu Jul 15 18:48:12|    uid=[10086],sid=[23710],sync_seq=[1358]...
  82. Thu Jul 15 18:48:12|wayland goroutine start..
  83. Thu Jul 15 18:48:12|WL   start time sleep auto update
  84. Thu Jul 15 18:48:12|try connect to master......................
  85. Thu Jul 15 18:48:12|    get licnese info...
  86. Thu Jul 15 18:48:12|    get license info laddr=[] index=[0]
复制代码



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

看了下没被升级的节点跳出错误如下
  1. Sat Jul 24 05:48:11|WLWLSL      autoupdate download failed,err[exit status 1]   autoupdate autoupdate2.conf is not found
复制代码


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


成功关闭自动升级后效果,此时kangle进程不会被重启
  1. Sun Jul 25 10:51:11|autoupdate now...
  2. Sun Jul 25 10:51:11|        autoupdate download failed,err[fork/exec /vhs/kangle/bin/autoupdate: no such file or directory]        autoupdate autoupdate2.conf is not found
复制代码


[发帖际遇]: 小樱 发帖时在路边捡到 4 樱币,偷偷放进了口袋. 幸运榜 / 衰神榜
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复

使用道具 举报

签到天数: 1064 天

[LV.10]以坛为家III

发表于 2021/7/19 08:23 | 显示全部楼层 |Google Chrome 91.0.4472.124|Windows 10
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册论坛 新浪微博账号登陆用百度帐号登录

本版积分规则

手机版|Archiver|Mail me|网站地图|IT技术交流论坛 ( 闽ICP备13013206号-7 )

GMT+8, 2021/9/25 06:07 , Processed in 0.163445 second(s), 20 queries , MemCache On.

Powered by itzmx! X3.4

© 2011- sakura

快速回复 返回顶部 返回列表