Skip to content

lightsail suddenly cannot be accessed

0

I have a lightsail instance which host JANUS WebRTC Server. It was working yesterday (from the day i Post). Suddenly today it just refused to connect from SSH or any other port. I have tried

  1. stop and start the instance
  2. snapshot and create new instance
  3. I have tried larger new instance as well
  4. I have tried SSH from my device as well (Mac)
  5. I'm using static IP (attached)

Here is the loom recording: Loom Recording

Enter image description here

Any idea what to do and why it happened?

asked 2 years ago283 views

2 Answers
0

Hi,

Could you try to follow this doc: https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-ssh-using-terminal.html to ssh to your instance with your local SSH client.

In the meantime, you can use -v with your ssh command like ssh -v username@hostname, it will prompt you the reason for any connection failure.

Thank you

AWS
MODERATOR

answered 2 years ago

0

Based on the information provided, it appears you're experiencing a common issue with AWS Lightsail instances becoming inaccessible. This can happen unexpectedly and for various reasons. Here are some potential causes and additional troubleshooting steps you can try:

  1. Firewall issues: The problem may be caused by a firewall on the Lightsail OS blocking SSH access. To address this, you can try running a set of commands in the startup script when restoring from a snapshot. These commands include disabling the firewall, flushing iptables, and restarting the SSH service.

  2. OS-level problems: There might be issues with the operating system that are preventing proper startup or network connectivity. Creating a snapshot and launching a new instance from it can sometimes resolve these problems.

  3. Resource constraints: If your application has grown and is consuming more resources than available, it may cause connectivity issues. Try creating a new instance with a larger plan to see if that resolves the problem.

  4. Service configuration: The SSH service might not be starting properly. Ensure that the SSH service is enabled and configured correctly.

  5. Network adapter issues: In some cases, network adapter problems can cause connectivity issues. Restarting the instance or creating a new one from a snapshot can often resolve this.

If none of these steps work, you may need to:

  1. Create a snapshot of the instance's root volume to preserve your data.
  2. Attach this snapshot to a new, accessible instance to recover your data.
  3. Contact AWS Support for further assistance, providing them with details about your instance and the steps you've already taken.

Remember that while these issues can be frustrating, they are usually resolvable with the right troubleshooting steps or assistance from AWS support.

Sources
Lightsail instance stopped to be reacheable from internet | AWS re:Post
Can not connect to lightsail server even on web ssh, port is open | AWS re:Post
Lightsail AWS Can't Access SSH on browser | AWS re:Post
Cannot connect to my AWS Lightsail server | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.