- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
Hi,
To prevent the immediate shutdown, you can try canceling the shutdown command (if it's scheduled with a shutdown command) by executing shutdown -c as root. However, this is a temporary fix and might not work if the shutdown is triggered by another method. To figure out why this is happening, please check below:
Since you have created this instance from a snapshot, the original instance (from which the snapshot was taken) might have had custom scripts that trigger a shutdown under certain conditions. These scripts could still be active in the new instance created from the AMI.
Check for any cron jobs that might be scheduled to shut down the system. Inspect the cron jobs for the root user and other users by checking /var/spool/cron/crontabs/ and /etc/cron.* directories.
- Use crontab -l for the root user and other suspicious users to list cron jobs.
- Check system-wide cron directories: /etc/cron.d/, /etc/cron.daily/, /etc/cron.hourly/, etc
Review Logs:
- Check /var/log/syslog (or /var/log/messages on some Linux distributions) for any messages related to the shutdown.
- Look into the logs mentioned above for cloud-init
Hope this helps.
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 6 Monaten
- AWS OFFICIALAktualisiert vor 6 Monaten

Thanks!, I cancelled the shutdown and got my work completed for now. Will follow through on troubleshooting steps you gave.
Found below cron entry. Took backup and removed. I suspect it is checking if cloud 9 environment is still connected to the instance or not. The EBS from which the AMI was built was from Cloud 9 env.
[root@ip-172-31-0-215 cron.d.bkp]# cat c9-automatic-shutdown