跳至內容

Bastion host shutting down "randomly"

0

Hi all,

We have an EC2 instance which we are using as a bastion host. We use this to sometimes get a production console but mostly as an entry point for a data transfer tool (Census) to migrate some of our database from RDS to an external warehouse.

We noticed our EC2 instance would shut down randomly throughout the day. So installed the cloudwatch agent so we could monitor more metrics. The machine was not running out of memory, CPU or disk. So I went to check the logs are there were no errors happening when the machine shut down. The user session would just be stopped.

So to test a theory I got a production console which would just print something out to the console every 15 seconds. This completely stopped the machine from going down.

The instance is running an ubuntu image.

Has anyone experienced any similar problems or have any advice? I can provide more details if needed.

My instance id: i-0a7f8278d1b943e6f

已提問 2 年前檢視次數 437 次

1 個回答
1

Hi Brandon,

I think This information solve your issue in a good way.

The issue with your EC2 instance shutting down randomly seems to be related to inactivity. Possible Cause: Inactivity Timeout

=> Ubuntu has features like power saving or session timeouts that could terminate user sessions if inactive for a period.

=> Your test with a constantly running process suggests this might be the culprit.

Try to Do Given Below Steps To resolve your issue:

  1. Disable Power Saving Features:

Check if there are any power saving settings enabled that might terminate sessions. You can find these in the Ubuntu settings or by editing configuration files.

  1. Adjust Session Timeout:

Look into modifying the session timeout value for your user sessions. There might be ways to extend this timeout or disable it completely (not recommended for security reasons).

3.CloudWatch Logs:

CloudWatch documentation (https://docs.aws.amazon.com/cloudwatch/) provides information on analyzing logs for specific events. You can search for messages related to session timeouts or terminations.

專家

已回答 2 年前

專家

已審閱 2 年前

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

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