- Newest
- Most votes
- Most comments
Hi, both status checks of my instance show normal, and there is no indication of abnormalities. However, the website still cannot be accessed, which is somewhat strange. It seems that AWS customer service requires payment to assist with this issue.
Has your IP address changed, etc.?
Check your IP address to be sure.
It is recommended to check network ACLs and security groups afterwards.
https://repost.aws/knowledge-center/ec2-linux-resolve-ssh-connection-errors
If this does not solve the problem, you can also try to connect using Session Manager.
https://docs.aws.amazon.com/ja_jp/systems-manager/latest/userguide/session-manager.html
How can I check the firewall settings? I have checked my security group, and the settings seem normal: sgr-050eaa7e60aa4aa89 IPv6 HTTPS TCP 443 ::/0 –
– sgr-02fb68a313da3f4bc IPv4 SSH TCP 22 0.0.0.0/0 –
– sgr-02634c3a46d3011ce IPv4 HTTPS TCP 443 0.0.0.0/0 –
– sgr-0d58092cd29d7b455 IPv4 Custom TCP TCP 34210 0.0.0.0/0 runcloud
– sgr-0aa5912a1d4962712 IPv6 HTTP TCP 80 ::/0 –
– sgr-0751e7b1cb5ff144e IPv4 HTTP TCP 80
The worst thing is that after I restarted the instance, even the website inside cannot be accessed anymore, and it seems that AWS charges a fee to help fix the problem.
Doesn't sound like a problem with security groups, etc.
Are there any abnormalities in the EC2 status?
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html
The following documents are common troubleshooting steps to take when you cannot connect to an instance.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html
Follow the instructions in the "Instance console output" section and check the logs.
If sshd is stopped for some reason, the instance must be restarted.
The Session Manager can be used in the following ways.
https://docs.aws.amazon.com/ja_jp/systems-manager/latest/userguide/session-manager.html
After logging in with Session Manager, check the status of sshd with the following command.
sudo systemctl status sshd
If it is stopped, restart sshd with the following command.
sudo systemctl restart sshd
Relevant content
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 9 months ago
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html
Have you tried checking the logs using the "instance console output" method?
Hi, I tried. There is nothing error on it.
Starting Postfix Mail Transport Agent... [[0;32m OK [0m] Started Postfix Mail Transport Agent. [ 16.383767] cloud-init[1444]: Cloud-init v. 23.1.1-0ubuntu0
18.04.1 running 'modules:config' at Sun, 09 Apr 2023 12:35:29 +0000. Up 16.25 seconds. [[0;32m OK [0m] Started Apply the settings specified in cloud-config. Starting EC2 instance hibernation setup agent... [[0;32m OK [0m] Started EC2 instance hibernation setup agent. [[0;32m OK [0m] Reached target Multi-User System. [[0;32m OK [0m] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Starting Execute cloud user/final scripts... [[0;32m OK [0m] Started Update UTMP about System Runlevel Changes. [ 17.266236] cloud-init[2026]: Cloud-init v. 23.1.1-0ubuntu018.04.1 running 'modules:final' at Sun, 09 Apr 2023 12:35:30 +0000. Up 17.10 seconds. [ 17.278597] cloud-init[2026]: Cloud-init v. 23.1.1-0ubuntu0~18.04.1 finished at Sun, 09 Apr 2023 12:35:30 +0000. Datasource DataSourceEc2Local. Up 17.25 seconds [[0;32m OK [0m] Started Execute cloud user/final scripts. [[0;32m OK [0m] Reached target Cloud-init target. 2023/04/09 12:35:30Z: Amazon SSM Agent v3.1.1732.0 is running 2023/04/09 12:35:30Z: OsProductName: Ubuntu 2023/04/09 12:35:30Z: OsVersion: 18.04Ubuntu 18.04.6 LTS ip-172-31-13-57 ttyS0
ip-172-31-13-57 login:
I see from the logs that the SSM agent is installed.
If that's the case, try logging in with session manager and checking the sshd status, etc.
The Session Manager can be used in the following ways.
https://docs.aws.amazon.com/ja_jp/systems-manager/latest/userguide/session-manager.html