Unknown Reboots on 2 Linodes
Log Files - /var/log/secure and /var/log/messages do not indicate any cause
SECURE
Jun 2 23:55:01 account-name systemd: Started Session 462 of user root.
Jun 3 00:00:01 account-name systemd: Created slice user-0.slice.
Jun 3 00:00:01 account-name systemd: Starting Session 463 of user root.
MESSAGES
Jun 2 23:34:38 account-name sshd[8574]: Failed password for invalid user root from 222.186.21.182 port 4853 ssh2
Jun 3 00:01:01 account-name sshd[1690]: Received signal 15; terminating.
Jun 3 00:01:45 account-name polkitd[1466]: Loading rules from directory /etc/polkit-1/rules.d
CRON
Jun 4 23:53:01 account-name CROND[10210]: (root) CMD (/usr/lib64/sa/sa2 -A)
Jun 4 23:55:01 account-name CROND[10222]: (root) CMD (/root/monitors/monitorDB.sh > /dev/null 2>&1)
Jun 5 00:00:01 account-name CROND[10236]: (root) CMD (/root/monitors/monitorDB.sh > /dev/null 2>&1)
Jun 5 00:00:01 account-name CROND[10237]: (root) CMD (/usr/local/bin/automysqlbackup/runmysqlbackup)
Jun 5 00:00:01 account-name CROND[10238]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 5 00:02:02 account-name crond[1434]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 11% if used.)
Jun 5 00:02:02 account-name crond[1434]: (CRON) INFO (running with inotify support)
Jun 5 00:05:01 account-name CROND[2440]: (root) CMD (/root/monitors/monitorDB.sh > /dev/null 2>&1)
Jun 5 00:10:01 account-name CROND[2450]: (root) CMD (/root/monitors/monitorDB.sh > /dev/null 2>&1)
There are three cron jobs (same as other limnodes - no issues)
Rotate Logs
1) 0 2 * * * /usr/sbin/logrotate /etc/logrotate.conf > /dev/null 2>&1
Backup Project At Regular Intervals
2) 41 22 1,15 * * /home/
Reboot Linode if Database Goes Down
3) */6 * * * * /root/monitors/monitorDB.sh > /dev/null 2>&1
==========
What next??
Thanks - John
3 Replies
You should not need that. At most, you would restart the database itself, not the entire system, but in either case there is something fundamentally wrong in your system if your database goes down and you have to restart the database by hand.
For example, make sure that your system has enough RAM and swap for your database to run and disable the Out Of Memory killer (search for "OOM killer")
I would insert a line like this one:
logger DB down, rebooting system
in the /root/monitors/monitorDB.sh script and the next time your system reboots you will be able to know, by looking at /var/log, whether your script was the reason for the reboot or not.