Server log files mysteriously disappeared !!!

Recently I started working on a new client engagement. This setup was new to us. I was troubleshooting some issue and thought of checking log files. I was able to find server.log and diagnostic log files but surprisingly server.out files were missing all together. Here are the steps I have followed to troubleshoot the issue:

1) Checked if the managed server was started from console (node manager) or using startup scripts. As you know that stdout logs will be written to nohup if started from commandline. Server was started from node manager, so this possibility was ruled out.
2) Compared with logging config of an env where server.out logs are present. Didn’t find any difference.
3) As it is dev env, thought of checking it quickly restarting server. Restarted server and I could see server.out file and it was getting updated.
4) Returned to my desk after lunch, surprisingly the log was gone again.
5) Checked lsof output for this process and found interesting thing as below:
[myid@abc.org ~]$ lsof -p 22437 | grep deleted
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing
      Output information may be incomplete.
java    22437 oracle    1w      REG              249,0 217055103   3283180 /u01/data/domains/soa_domain/servers/soa_server1/logs/soa_server1.out (deleted)
java    22437 oracle    2w      REG              249,0 217055103   3283180 /u01/data/domains/soa_domain/servers/soa_server1/logs/soa_server1.out (deleted)
That means some process or script is deleting these files. So, I checked if there is any cron job that is periodically running. Here it was, there was a maintenance script that deletes old files. There was a bug in the script due to which server.out file is also getting deleted. 

Comments

Popular posts from this blog

HOW WE REDUCED SOA OSB PROVISIONING FROM 4 DAYS TO 4 HOURS

NOT ABLE TO START RABBITMQ CLUSTER: CANNOT DECLARE A QUEUE ‘~S’ ON NODE ‘~S’: ~255P

SOA SUITE 12.2.1.4 INSTALLATION: GOT EXCEPTION WHEN AUTO CONFIGURING THE SCHEMA COMPONENT(S) WITH DATA OBTAINED FROM SHADOW TABLE