By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Lightsail CentOS Instance error while updating

0

After launching a new CentOS instance and logging in, I attempted to run "sudo yum update" as an initial setup step. However, during the update process, specifically at 77/401 (Running scriptlet: selinux-policy-targeted-38.1.47.1.el9.noarch), I encountered a disconnection error:

"Your instance encountered an error and has closed the connection. Try again or contact customer support. UPSTREAM_ERROR[515]"

Does anyone know what might be causing this issue or how to resolve it?

  • Did the disconnection occur after a long period of no activity in Terminal window (about 5 minutes)?

  • The disconnect occurs approximately 1 minute into the update process, showing the error: UPSTREAM_ERROR[515]. This issue only affects the smallest instance type with 512 MB RAM and 2 vCPUs. I tested other Linux distributions, such as Ubuntu and AlmaLinux, on the same instance type, and they update and function without issues. It seems the problem might be specific to CentOS on the smallest instance type.

asked a month ago44 views
2 Answers
0

The error you're experiencing during the update process of your CentOS instance in Lightsail could be due to a few reasons. Here are some potential causes and steps you can take to troubleshoot:

  1. Instance capacity: The error might be related to insufficient instance capacity. Sometimes, when an instance is under heavy load during updates, it can cause connection issues. You could try waiting a few minutes and then attempting to reconnect to your instance.

  2. Instance not fully started: If your instance is newly created or recently rebooted, it's possible that not all services have fully initialized. In this case, waiting a few minutes before attempting the update again might resolve the issue.

  3. Temporary network issue: There could be a temporary network problem affecting the connection to your instance. Try reconnecting after a short wait.

  4. Instance resource constraints: If your instance plan doesn't have enough resources to handle the update process, it might cause disconnections. Consider upgrading to a larger instance plan if this is a recurring issue.

To resolve this:

  1. Wait a few minutes and try to reconnect to your instance.
  2. If you can reconnect, attempt the update process again.
  3. If the problem persists, you might want to create a new instance from a snapshot in a different Availability Zone.
  4. As a last resort, if none of the above steps work, contact AWS Support for further assistance. They may need to investigate if there are any underlying issues with the instance or the Lightsail service in your region.

Remember to verify that you have access to the new instance and that everything is working properly before deleting the original instance if you decide to create a new one.
Sources
Resolve connection errors with Lightsail browser-based SSH and RDP clients - Amazon Lightsail
Resolve insufficient instance capacity errors in Lightsail - Amazon Lightsail

profile picture
answered a month ago
profile picture
EXPERT
reviewed a month ago
0

I've been testing Ubuntu and CentOS on AWS Lightsail with similar specifications, and I'm noticing significant performance differences:

  1. Ubuntu on 512 MB RAM, 2 vCPUs:
  • Ran sudo apt upgrade with no issues.
  • The VM was very responsive throughout the update process.
  1. CentOS on 512 MB RAM, 2 vCPUs:
  • ran sudo yum update, but midway through the update, the connection closed with this error: "Your instance encountered an error and has closed the connection. Try again or contact customer support. UPSTREAM_ERROR[515]"
  1. CentOS on 1 GB RAM, 2 vCPUs:
  • The update sudo yum update completed without disconnection issues, but the OS felt less responsive even with the larger memory allocation.
  • Comparatively, Ubuntu on 512 MB was noticeably faster.
  1. CentOS on another cloud provider with 512 MB RAM, 1 vCPU:
  • Performed sudo yum update without issues, and the responsiveness was much better than on Lightsail 1 GB RAM instance.

Ubuntu seems to work well on Lightsail, suggesting this might be specific to CentOS. Could there be an underlying issue with the CentOS image on Lightsail?

What are your thoughts on this?

answered a month 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.

Guidelines for Answering Questions