跳至內容

receiving broadcast message on ec2

0

Hi All,

I am continuing to get below messages on my ec2 instance. Can someone please advise, what is wrong?

The system will power off at Wed

Broadcast message from root@ip-172-31-0-215.ec2.internal (Wed 2024-02-07 05:38:01 UTC):

The system will power off at Wed 2024-02-07 05:44:01 UTC!

Broadcast message from root@ip-172-31-0-215.ec2.internal (Wed 2024-02-07 05:39:01 UTC):

The system will power off at Wed 2024-02-07 05:44:01 UTC!

Broadcast message from root@ip-172-31-0-215.ec2.internal (Wed 2024-02-07 05:40:01 UTC):

The system will power off at Wed 2024-02-07 05:44:01 UTC!

Broadcast message from root@ip-172-31-0-215.ec2.internal (Wed 2024-02-07 05:41:01 UTC):

The system will power off at Wed 2024-02-07 05:44:01 UTC!

i-0821b0b17dc4619c8

I created this instance from an AMI created from a snapshot. If that matters.

Thanks!

已提問 2 年前檢視次數 534 次
1 個回答
0

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.

已回答 2 年前
  • 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

            • root /home/ec2-user/.c9/stop-if-inactive.sh

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。