# EC2 instance created then teminated

**URL:** <https://forums.suse.com/t/ec2-instance-created-then-teminated/1495>\
**Category:** Rancher 1.x\
**Created:** [January 20, 2016, 1:26am UTC](https://forums.suse.com/t/ec2-instance-created-then-teminated/1495 "2016-01-20T01:26:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cloudlady911](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cloudlady911/32/782_2.png) [@cloudlady911](https://forums.suse.com/u/cloudlady911)\
**Post date:** [January 20, 2016, 1:26am UTC](https://forums.suse.com/t/ec2-instance-created-then-teminated/1495/1 "2016-01-20T01:26:17Z")

</div>

I created at instance using the EC2 option. The instance is created but I get the error:

> Error waiting for SSH: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded.

Then when I go back to the EC2 console, the instance is terminated. Here is what my cloud trail logs show. The relevant entries are the ones with the rancher username.

 ![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/1X/f077af7dcb5b5009aaddeeac93ae48924033e045.png)

---

<div class="post-metadata">

**Author:** ![cloudlady911](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cloudlady911/32/782_2.png) [@cloudlady911](https://forums.suse.com/u/cloudlady911)\
**Post date:** [January 20, 2016, 1:38am UTC](https://forums.suse.com/t/ec2-instance-created-then-teminated/1495/2 "2016-01-20T01:38:37Z")

</div>

I noticed that during the provisioning there is no place to set the keypair name for SSH access. How can SSH work between the instance and the server if that is not configured?

---

<div class="post-metadata">

**Author:** ![cloudlady911](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cloudlady911/32/782_2.png) [@cloudlady911](https://forums.suse.com/u/cloudlady911)\
**Post date:** [January 20, 2016, 1:50am UTC](https://forums.suse.com/t/ec2-instance-created-then-teminated/1495/3 "2016-01-20T01:50:06Z")

</div>

I tried again and noticed that the Key Pair Name that is listed is the same as I used to name the instance: The key I use for SSH is call InstanceMGMT. The name of the instance in this case was Graylog-SV02.

![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/1X/5572a30039a278df65461ea53670da1fd0a1ff8a.png)

Below is a copy of the API: i have removed the credentials.

{  
“id”: “1ph7”,  
“type”: “machine”,  
“links”: {  
“self”: “…/v1/projects/1a5/machines/1ph7”,  
“account”: “…/v1/projects/1a5/machines/1ph7/account”,  
“hosts”: “…/v1/projects/1a5/machines/1ph7/hosts”,  
},  
“actions”: {  
“bootstrap”: “…/v1/projects/1a5/machines/1ph7/?action=bootstrap”,  
“remove”: “…/v1/projects/1a5/machines/1ph7/?action=remove”,  
“error”: “…/v1/projects/1a5/machines/1ph7/?action=error”,  
},  
“name”: “Graylog-SV02”,  
“state”: “creating”,  
“accountId”: “1a5”,  
“amazonec2Config”: {  
“region”: “us-west-1”,  
“instanceType”: “t2.small”,  
“securityGroup”: “rancher-machine”,  
“zone”: “c”,  
“rootSize”: “40”,  
“accessKey”: “XXXXXXXXXXXX”,  
“secretKey”: “XXXXXXXXXX”,  
“vpcId”: “vpc-6fe62f0a”,  
“subnetId”: “subnet-b163dfe8”,  
“ami”: “ami-3e394d5e”,  
“sshUser”: “ubuntu”,  
“iamInstanceProfile”: “Docker”,  
“sessionToken”: null,  
“spotPrice”: null,  
},  
“authCertificateAuthority”: null,  
“authKey”: null,  
“azureConfig”: null,  
“created”: “2016-01-20T01:39:33Z”,  
“createdTS”: 1453253973000,  
“description”: “graylog”,  
“digitaloceanConfig”: null,  
“dockerVersion”: null,  
“driver”: “amazonec2”,  
“engineEnv”: null,  
“engineInsecureRegistry”: null,  
“engineInstallUrl”: null,  
“engineLabel”: null,  
“engineOpt”: { },  
“engineRegistryMirror”: null,  
“engineStorageDriver”: null,  
“exoscaleConfig”: null,  
“externalId”: “fc517ac2-9930-4ce8-8e45-39f692d4f05f”,  
“kind”: “machine”,  
“labels”: {  
“Cluster”: “graylogSV”,  
},  
“openstackConfig”: null,  
“packetConfig”: null,  
“rackspaceConfig”: null,  
“removed”: null,  
“softlayerConfig”: null,  
“transitioning”: “yes”,  
“transitioningMessage”: “Machine is running, waiting for SSH to be available…”,  
“transitioningProgress”: null,  
“ubiquityConfig”: null,  
“uuid”: “b07074ff-1784-4793-b8f4-769a11fb2c92”,  
“virtualboxConfig”: null,  
“vmwarevcloudairConfig”: null,  
“vmwarevsphereConfig”: null,  
}

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [January 23, 2016, 4:16am UTC](https://forums.suse.com/t/ec2-instance-created-then-teminated/1495/4 "2016-01-23T04:16:11Z")

</div>

Closing in favor of this Github issue:

[https://github.com/rancher/rancher/issues/3345](https://github.com/rancher/rancher/issues/3345)

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [January 23, 2016, 4:16am UTC](https://forums.suse.com/t/ec2-instance-created-then-teminated/1495/5 "2016-01-23T04:16:14Z")

</div>


