Article 6NN30 gzip or find is corrupting the file

gzip or find is corrupting the file

by
james000
from LinuxQuestions.org on (#6NN30)
Hi,

This is Centos 8. I am seeing a strange issue on this. There is an application which is throwing some garbage in /var/log/message at specific time. Here is the snip from messages file :
Code:Jun 16 04:00:01 os-7 cnote-sip 2024-06-16 04:00:01 info: sipua.js - 76 : Received OPTIONS request from 216.221.133.15
Jun 16 04:00:01 os-7 cnote-sip 2024-06-16 04:00:01 info: sipua.js - 76 : Received OPTIONS request from 216.221.133.15
Jun 16 04:00:02 os-7 cnote-sip ^_<8b>^H^HiiCf^@^Ccnote-sip-2024-05-14.log^@iiM<8f>iWi<9c> iiWA(R)I@$2i#^Hhiiipi&<9a>i <97>d1%i Uii'E<82>^@^?id^Ti^U^[i<iii]iG'^R|7<82>^^<84>i<9f>twii+ijii;|ipib{i<<|ii^?iiii<87>iiiii_iii^?iiiii6_lIiW<9b>iiiiiiii<8f>iliiii<8f>oiioii||iiiii^?=oiiCiiimO_ivi/iii<97>iiikiiiiiiiiiii~i/<8f>?iiiiii<iiiiii<9f><9e>iiiiiiiii^Oii<9f><8f>i<9f>^?iiiiiiii_^?i?i<8f>iiiii?^?ii^?i<?miiii/i<97>iii^?yiiI~~iiiiiiiiii?Jiiipii/iaii<9f><9e>iiiii^?~ziiiiiiViiii^?iii^?iiiMiiiiae^Wiii<9f>M^?Rii|{^L7i^? vH^\^_n^RiiiOiiiiiiiivki??=o~z<99>i^?iiiiii<8f>iiii<97>ii^?ii?ii=<th<9d>^N^M*i^iiii<9e>iEiiiiiit^?<9a>iFi_iiiA^^ii?iJ_I*iMii<9f>iiziOO^_i<9d>i^]Jaiiieiiii<97><9f><9e>^_ii^?^?iii/iMiEiiiiiiioii<8b>ii?[7<93>i<93>^OLi<86>i}5imiG^RX7-iiiii^NEiiiYi}^Mio'iiiiiii<92>i-_i)~i i^Tiiyi^U^Bipitiiii~itOi<98>I^2<9d>/Lgii<9b>ii<94>^@Ii<95>4if^QisS'i^3I<87>eiYiy}i^B<9f>&iiti<94>iig]:iiS^\^[:<9d><99>_ii<9a>^]itviiiqitOi<98>I^2<9d>/Lgii<9b>ai)^A^XnS+jii*liP<81>7<88>Y^Gi^?C\iT'i^[`><9d>5%}iW<97>Ii^TiCi3ik.^^i-D6i^Tii^NI6EUit<96>i|Q:s6ii^^!a7[i^ULgi
Jun 16 04:00:02 os-7 cnote-sip ii.U ^Mbi<81>ii^P<8f>?UWhen checked further, I see there is a cronjob of find and gzip, which runs at exact same time when it throws the garbage.
Code:[root@os-7 ~]# crontab -u routadm -l | grep mtime
0 4 * * * find /export/home/routadm/cnotesipbase/Node.js/logs/*.log -mtime +31 -exec gzip {} \;
5 4 * * * find /export/home/routadm/cnotesipbase/Node.js/logs/*gz -mtime +365 -exec rm {} \;
[root@os-7 ~]#For test, I changed the time from 0 4 to 3 4 and then I saw garbage was logged at 04:03, which means either find or gzip or cronjob is doing something bad. What else I can check, which can give me some pointer ?

Please advice.

Thanks
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments