내용으로 건너뛰기

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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠