Failed to connect to your instance

1

Hello!!

I faced trouble with this error message below. "Failed to connect to your instance Unable to connect to the instance because the instance is not in a valid state. Connecting to a stopped or terminated instance is not supported. If the instance is stopped, start your instance, and try to connect again."

I just create instance.

  1. amazon linux
  2. Made new key-pair
  3. Made new security group

But I failed to access to my new EC2.

I tried to access with browser.

Walter
feita há um ano429 visualizações
1 Resposta
2

Please make sure that instance is in healthy status, passed it's checks and running. It should not be stopped/terminated while accessing it.

From the error message, it seems that instance either couldn't come up running completely or was stopped/terminated when it was accessed.

See in the following example, instance is in running state but not yet passed it's health checks, sometime it happens when we try to access recently launched instance, which hasn't completed it's health checks yet.

Enter image description here

Enter image description here

Instance in shut down or terminated state:

Enter image description here

Enter image description here

Also make sure that appropriate network settings are in place:

  • Security group attached to your instance allows allows TCP port 22 for SSH to your IP atleast.
  • NACL is not blocking traffic(inbound/outbound)

Also, please refer this re:Post Knowledge Center Article and this thread for additional details.

PS: If none of this helps, I'd suggest you to stop the instance and start again and make sure network settings as mentioned above are in place, this should be resolved. Lastly if you can try, then try launching new instance and see if problem persists or not. If still you see the same issue, I'd suggest you to reach out to AWS support via support case, if you have the support plan.

Hope you find this information useful.

Comment here if you have additional questions, happy to help.

Abhishek

profile pictureAWS
ESPECIALISTA
respondido há um ano
profile picture
ESPECIALISTA
avaliado há um ano
profile picture
ESPECIALISTA
avaliado há um ano
  • Do you have any further questions, happy to help.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas