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
질문됨 일 년 전426회 조회
1개 답변
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
전문가
답변함 일 년 전
profile picture
전문가
검토됨 일 년 전
profile picture
전문가
검토됨 일 년 전
  • Do you have any further questions, happy to help.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠