Closed doginpants closed 7 years ago
Hi @doginpants,
Is the network you're running Streisand from unusual in any way? Is it possible that it's blocking/munging outbound SSH?
As a first step it might be worth increasing the timeout for this step in the Amazon genesis role. That is, edit the file playbooks/roles/genesis-amazon/tasks/main.yml
from the Streisand code you cloned. Change line 78 to a larger value (maybe try 2000) to start? I'm interested in hearing if this helps.
Are you able to confirm that the EC2 instance(s?) Streisand created are running when you log in to your AWS account?
Hey @cpu I just tried changing the timeout to 2000 with no avail.Also I did try running it again with the limit command and got the same error. on the front of the EC2 instance here is what I believe you are talking about for instances. the 2 times I ran streisand, it created these 2. new screenshot of instances after last run
@doginpants Are you able to SSH to any of those three instances using the ~/.ssh/id_rsa
keypair from the machine you're running Streisand on? E.g: what's the output from
ssh -i ~/.ssh/id_rsa ubuntu@XX.XX.XX.XX whoami
@cpu I tried the to ssh to the 3 instances currently running using the command replacing the x's with my instance ips. All 3 timed out when I tried to SSH. Any ideas?
@doginpants Are you able to ping the 3 instance IPs without error? Can you SSH to other machines without a timeout? E.g. what does ssh github.com
say?
Is the network you're running Streisand from unusual in any way? Is it possible that it's blocking/munging outbound SSH?
@cpu I think something is up in the background of what I am doing but I dont have the knowledge of the system enough to know what it is. Something must be configured wrong with the network or ssh. This is what I get when I try to ping github.com.
[admin@doginpants ~]$ ssh github.com
The authenticity of host 'github.com (192.30.255.112)' can't be established.
RSA key fingerprint is .
RSA key fingerprint is .
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts.
Permission denied (publickey).
[admin@doginpants ~]$
so the permission is being denied but I have a ssh key generated not sure how this stuff works quite yet tho so not sure what it means.
@doginpants That error is expected - you don't have an SSH key authorized for github.com. I just wanted to see if it failed with a timeout - it did not.
I'm not sure why you aren't able to reach your EC2 instances but it does not appear to be Streisand related. I'm short of ideas to try next.
maybe this [WARNING]: Found both group and host with same name: localhost that I get at the start has something to do with it?
@doginpants Unfortunately not. That warning can be ignored.
So what should I do. Things I am debating are, clean install clean aws and try again, wait for someone to magic fix, or keep scouring google for the possible cause. Idk someone has got to be able to figure this out.
@doginpants It may be worth trying a different provider (e.g. Linode, Digital Ocean, GCE) and seeing if you have the same problem with the initial SSH connection.
When you ran the ssh -i ~/.ssh/id_rsa ubuntu@XX.XX.XX.XX whoami
command, what IP did you use? Can you ping that IP? Can you share the exact output?
@cpu I can share the exact output I just was not sure if I should paste the ips in here because I dont know if that is safe. if you give me the heads up that its ok I can. Then I will try a different provider. Also should I try to ssh to the private or public ipv4 of the instances?
@cpu I can share the exact output I just was not sure if I should paste the ips in here because I dont know if that is safe. if you give me the heads up that its ok I can.
No problem. Best to be on the cautious side :-) I asked mostly to check that you were using the public IPv4 address. You can skip sharing the exact IP if you're able to confirm its the public address. Alternatively we could share that piece of information by IRC or E-mail if you prefer.
Then I will try a different provider. Also should I try to ssh to the private or public ipv4 of the instances?
@doginpants Definitely the public IPv4 address.
@cpu If you have a IRC or email you like I would like to share all the info with you as it maybe can help and I would really like to get this working. and it was always the public ipv4
@cpu If you have a IRC or email
@doginpants Ok! daniel <at> binaryparadox.net
for email. ccppuu
on freenode for IRC. I'll be in/out today but can try and help more.
When you have a chance to try another provider I'd be very interested in seeing those results as well.
it was always the public ipv4
Darn :-( so much for that theory.
@cpu I FOUND AN ERROR this could be it. the error occurs at wait for ssh again but there is a error not just the lack of connection. (connecting with rackspace now)
[admin@doginpants streisand]$ ./streisand
S T R E I S A N D
Which provider are you using?
1. Amazon
2. Azure
3. DigitalOcean
4. Google
5. Linode
6. Rackspace
: 6
[WARNING]: Found both group and host with same name: localhost
What region should the server be located in?
1. Chicago
2. Dallas
3. Hong Kong
4. Northern Virginia
5. Sydney
Please choose the number of your region. Press enter for default (#1) region.
[1]: 4
What should the server be named? Press enter for default (streisand).
[streisand]:
What is your Rackspace username?
: doginpants
The following information can be found in the Rackspace Cloud Control Panel.
https://mycloud.rackspace.com/
What is your Rackspace API key?
:my key
Streisand will now set up your server. This process usually takes around ten minutes. Press Enter to begin setup...
:
PLAY [Provision the Rackspace Server] ******************************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]
TASK [genesis-rackspace : Create the server] ***********************************
changed: [localhost]
TASK [genesis-rackspace : Wait until the server has finished booting and OpenSSH is accepting connections] ***
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: socket.error: [Errno 104] Connection reset by peer
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_lwlFg3/ansible_module_wait_for.py\", line 585, in <module>\n main()\n File \"/tmp/ansible_lwlFg3/ansible_module_wait_for.py\", line 525, in main\n response = s.recv(1024)\nsocket.error: [Errno 104] Connection reset by peer\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
to retry, use: --limit @/home/admin/streisand/playbooks/rackspace.retry
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=1
and this running with --limit
[admin@doginpants streisand]$ ./streisand --limit @/home/admin/streisand/playbooks/rackspace.retry
S T R E I S A N D
Which provider are you using?
1. Amazon
2. Azure
3. DigitalOcean
4. Google
5. Linode
6. Rackspace
: 6
[WARNING]: Found both group and host with same name: localhost
What region should the server be located in?
1. Chicago
2. Dallas
3. Hong Kong
4. Northern Virginia
5. Sydney
Please choose the number of your region. Press enter for default (#1) region.
[1]: 4
What should the server be named? Press enter for default (streisand).
[streisand]:
What is your Rackspace username?
: doginpants
The following information can be found in the Rackspace Cloud Control Panel.
https://mycloud.rackspace.com/
What is your Rackspace API key?
: 5a35212307e44621bac13685e9fa5eab
Streisand will now set up your server. This process usually takes around ten minutes. Press Enter to begin setup...
:
PLAY [Provision the Rackspace Server] ******************************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]
TASK [genesis-rackspace : Create the server] ***********************************
fatal: [localhost]: FAILED! => {"action": "create", "changed": true, "error": [], "failed": true, "instance_ids": {"error": [], "instances": [], "success": [], "timeout": ["9f2e24e2-64e4-482c-a715-6b66d9dec414"]}, "instances": [], "msg": "Timeout waiting for all servers to build", "success": [], "timeout": [{"accessIPv4": "", "id": "9f2e24e2-64e4-482c-a715-6b66d9dec414", "name": "streisand", "rax_accessipv4": "", "rax_accessipv6": "", "rax_addresses": {"private": [{"addr": "10.176.5.106", "version": 4}], "public": [{"addr": "162.209.103.154", "version": 4}, {"addr": "2001:4802:7800:1:be76:4eff:fe20:3caf", "version": 6}]}, "rax_adminpass": "bn9vn4uDAU8v", "rax_boot_source": "local", "rax_config_drive": "", "rax_created": "2017-06-08T21:22:43Z", "rax_flavor": {"id": "2", "links": [{"href": "https://iad.servers.api.rackspacecloud.com/1036474/flavors/2", "rel": "bookmark"}]}, "rax_hostid": "76c7bc2d34ef4cbe7f9d865a8a16c320eacc23042b039085fe5edce0", "rax_human_id": "streisand", "rax_id": "9f2e24e2-64e4-482c-a715-6b66d9dec414", "rax_image": {"id": "c86c7b56-02c5-4e79-826a-b1c895167bee", "links": [{"href": "https://iad.servers.api.rackspacecloud.com/1036474/images/c86c7b56-02c5-4e79-826a-b1c895167bee", "rel": "bookmark"}]}, "rax_key_name": null, "rax_links": [{"href": "https://iad.servers.api.rackspacecloud.com/v2/1036474/servers/9f2e24e2-64e4-482c-a715-6b66d9dec414", "rel": "self"}, {"href": "https://iad.servers.api.rackspacecloud.com/1036474/servers/9f2e24e2-64e4-482c-a715-6b66d9dec414", "rel": "bookmark"}], "rax_metadata": {}, "rax_name": "streisand", "rax_name_attr": "name", "rax_networks": {"private": ["10.176.5.106"], "public": ["162.209.103.154", "2001:4802:7800:1:be76:4eff:fe20:3caf"]}, "rax_os-dcf_diskconfig": "MANUAL", "rax_os-ext-sts_power_state": 0, "rax_os-ext-sts_task_state": "spawning", "rax_os-ext-sts_vm_state": "building", "rax_progress": 10, "rax_rax-public-ip-zone-id_publicipzoneid": "f4eb9af3c0fe10ca66aaa9c007d86a4836826700447d654934408b69", "rax_request_ids": ["req-9249ef26-aec3-451b-b8df-9c0bcd5bf90d", "req-3870e97d-4ea6-439d-a588-6b48cbe06bc7", "req-9f81c3de-e28d-4d5f-afcc-1e5ac15c06dc", "req-dea335b3-7743-488f-8be1-07ad00f3593d", "req-571bdfac-eddc-4732-8001-913c734b1505", "req-4edc3d3c-3160-4e1b-af6b-c399fa6855c3", "req-734e20e8-a39f-4f47-b9d7-527971402b25", "req-4a546be3-6089-4da8-8f59-5ad5f4eaf4b6", "req-dc7c4ccd-d3d3-4755-8803-1f20da242a41", "req-2d00630f-e70e-4c12-ae11-abf68de2b818", "req-d7f1c86d-b899-4fa9-8e9e-4f8c1206420d", "req-d2a146be-2ea5-45b2-9978-f3b6b275bfdc", "req-ef2094cd-91ed-424c-a28b-5610698c24d9", "req-a436ac86-e750-4241-bdda-0e4199567fa7", "req-b237134d-212c-49ec-8c3c-a663323a87d3", "req-5e1c9e9f-e68a-42bf-af37-ce965c0a6f1c", "req-5a8b8731-1b15-4c27-b79e-6fe7f8aec90c", "req-40ac1b4e-1c92-4b39-ba2d-81524eaf930a", "req-86838f07-3c71-45a6-afa2-85a812a39ffa", "req-622376d9-9abc-4a36-9b45-a9341b0cab27", "req-fdf98995-0782-42c5-ab71-fa7b5cd2be15", "req-9c4d7367-4295-4af6-9f3f-d2e1b90bc5ab", "req-44e4b01b-7473-40ec-8063-bf9d918569d6", "req-25f9987c-3d50-4e1e-9d3c-79c75baba8c9", "req-5f7e696c-08c0-4d0e-b487-0e8e2cfe52a8", "req-cff5f6ef-1729-493b-b518-53ea6567573e", "req-465b30e2-1958-48c9-a374-bdbc83326373", "req-10ac6e2c-22a4-47d9-9ced-cc90d9d077c9", "req-b416981e-faba-407a-af97-708a85d59412", "req-06d18503-d3b0-4a96-bc0e-d29faf5d0e58", "req-76513147-b3ed-47c7-bc63-302f7ec399f9", "req-956c8225-c805-466a-bcc5-d8fc78cdd549", "req-b6059718-c46c-4466-b8df-70fde3e00edd", "req-97aa0fb9-f914-484d-ab0c-2e42d0afcb03", "req-efd0d463-61ee-4055-b49d-81d4c2ff2f91", "req-f78f2db2-61b1-4bb5-b63d-9af5630cc92a", "req-ee8d482e-3557-4c95-8341-5ee64e4fa988", "req-dcad29eb-b9d7-43a3-b45c-50cd48706f62", "req-6c0c2871-c1c8-4ce4-93ce-d838193a16bb", "req-c09bfd0b-fdc1-4b49-a839-29f3e5c771b7", "req-16b702b0-ef16-41d3-8767-b4d0e2aac475", "req-d5231eb9-e369-4f19-8259-0fbec2d032d0", "req-50ce7bfe-18e5-492e-aa68-e0df47fc3fca", "req-83421e86-dd35-40d3-937c-b9ff7cbd4cb1", "req-d688d754-429a-4189-a4cb-6c7ece8ed57e", "req-08af5597-4bcd-40bc-b8ec-8cfd659b3e59", "req-0e17ae5b-650b-41b4-bec3-0b031647141d", "req-afaf3ace-06d7-4788-b483-acbf01036bad", "req-42bed260-45b4-40f1-ab83-33d2def7254a"], "rax_status": "BUILD", "rax_tenant_id": "1036474", "rax_updated": "2017-06-08T21:22:47Z", "rax_user_id": "5f17800dc9784790846e0ce3e9529407", "rax_x_openstack_request_ids": ["req-9249ef26-aec3-451b-b8df-9c0bcd5bf90d", "req-3870e97d-4ea6-439d-a588-6b48cbe06bc7", "req-9f81c3de-e28d-4d5f-afcc-1e5ac15c06dc", "req-dea335b3-7743-488f-8be1-07ad00f3593d", "req-571bdfac-eddc-4732-8001-913c734b1505", "req-4edc3d3c-3160-4e1b-af6b-c399fa6855c3", "req-734e20e8-a39f-4f47-b9d7-527971402b25", "req-4a546be3-6089-4da8-8f59-5ad5f4eaf4b6", "req-dc7c4ccd-d3d3-4755-8803-1f20da242a41", "req-2d00630f-e70e-4c12-ae11-abf68de2b818", "req-d7f1c86d-b899-4fa9-8e9e-4f8c1206420d", "req-d2a146be-2ea5-45b2-9978-f3b6b275bfdc", "req-ef2094cd-91ed-424c-a28b-5610698c24d9", "req-a436ac86-e750-4241-bdda-0e4199567fa7", "req-b237134d-212c-49ec-8c3c-a663323a87d3", "req-5e1c9e9f-e68a-42bf-af37-ce965c0a6f1c", "req-5a8b8731-1b15-4c27-b79e-6fe7f8aec90c", "req-40ac1b4e-1c92-4b39-ba2d-81524eaf930a", "req-86838f07-3c71-45a6-afa2-85a812a39ffa", "req-622376d9-9abc-4a36-9b45-a9341b0cab27", "req-fdf98995-0782-42c5-ab71-fa7b5cd2be15", "req-9c4d7367-4295-4af6-9f3f-d2e1b90bc5ab", "req-44e4b01b-7473-40ec-8063-bf9d918569d6", "req-25f9987c-3d50-4e1e-9d3c-79c75baba8c9", "req-5f7e696c-08c0-4d0e-b487-0e8e2cfe52a8", "req-cff5f6ef-1729-493b-b518-53ea6567573e", "req-465b30e2-1958-48c9-a374-bdbc83326373", "req-10ac6e2c-22a4-47d9-9ced-cc90d9d077c9", "req-b416981e-faba-407a-af97-708a85d59412", "req-06d18503-d3b0-4a96-bc0e-d29faf5d0e58", "req-76513147-b3ed-47c7-bc63-302f7ec399f9", "req-956c8225-c805-466a-bcc5-d8fc78cdd549", "req-b6059718-c46c-4466-b8df-70fde3e00edd", "req-97aa0fb9-f914-484d-ab0c-2e42d0afcb03", "req-efd0d463-61ee-4055-b49d-81d4c2ff2f91", "req-f78f2db2-61b1-4bb5-b63d-9af5630cc92a", "req-ee8d482e-3557-4c95-8341-5ee64e4fa988", "req-dcad29eb-b9d7-43a3-b45c-50cd48706f62", "req-6c0c2871-c1c8-4ce4-93ce-d838193a16bb", "req-c09bfd0b-fdc1-4b49-a839-29f3e5c771b7", "req-16b702b0-ef16-41d3-8767-b4d0e2aac475", "req-d5231eb9-e369-4f19-8259-0fbec2d032d0", "req-50ce7bfe-18e5-492e-aa68-e0df47fc3fca", "req-83421e86-dd35-40d3-937c-b9ff7cbd4cb1", "req-d688d754-429a-4189-a4cb-6c7ece8ed57e", "req-08af5597-4bcd-40bc-b8ec-8cfd659b3e59", "req-0e17ae5b-650b-41b4-bec3-0b031647141d", "req-afaf3ace-06d7-4788-b483-acbf01036bad", "req-42bed260-45b4-40f1-ab83-33d2def7254a"], "status": "BUILD"}]}
to retry, use: --limit @/home/admin/streisand/playbooks/rackspace.retry
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
[Errno 104] Connection reset by peer
@doginpants interesting data point! That seems like it may add some weight to the theory that your SSH connections are being disrupted between Streisand/Ansible and the provider.
Can you share your ~/.ssh/id_rsa.pub
file from the machine you're running Streisand on? Make double sure before you share that the file ends in .pub
and isn't the private key. I'd like to add your SSH public key to one of my own servers to see if you can SSH to that as an experiment (if you're willing!).
Sure thing @cpu here is .pub in a zip id_rsa (copy).zip
also it looks to me when I go into rackspace that streisand has created instances like before still but for some reason I am not able to ssh also another new development seems I cant see the host ubuntu@162.209.103.154 when i try to ssh but it cant authenticate so i continue but then there is a password for ubuntu and i dnot know what goes there
Welp still dont know what was wrong but I recloned streisand and set timeout for ssh to 2000 and error seemed to dissapear. I would still like to figure out what was wrong but seems to be finishing up the install just fine I will tell you if it works edit
PLAY RECAP *********************************************************************
104.130.23.36 : ok=314 changed=283 unreachable=0 failed=0
localhost : ok=6 changed=2 unreachable=0 failed=0
@cpu thanks for all the help got it up and running smooth!
@doginpants Great! I'm super happy to hear that!
The same issue happened to me
@lihuibng Please open a new issue & answer the template help questions. It's easier to coordinate in a separate issue and without the template questions being answered there isn't enough information to help you. Thanks!
I had the same issue but resolved it by switching my AWS server region
Expected behavior:
Not sure how to show what was supposed to happen but I have fixed all other issues and got so far but I am stuck on this one and can use some help. I will provide any info asked for. Not sure what you need to fix it so I will give what I ran
Actual Behavior:
Steps to Reproduce:
Additional Details:
Log output from Ansible or other relevant services (link to Gist for longer output):(will provide if I know how.)
Target Cloud Provider: aws ec2
Operating System of target host:
Operating System of client: fedora 25
Version of Ansible, using
ansible --version
: 2.3.1.0 (python 2.7.13)