跳至内容

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 年前533 查看次数
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

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。