Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Ansible can't connect with AWS public DNS, but it can connect with the raw IP. #15508
OS / ENVIRONMENT
Mac OSX El Capitan (10.11.3)
This issue is strange. If I use the public DNS provided by AWS, Ansible fails to connect (see error report below). But if I use the IP address it can connect and everything works.
Just to make sure, I can ssh into it without issues (providing the same username and key file than ansible is using).
Thanks very much for your interest in Ansible. It sincerely means a lot to us.
This appears to be a user question, and we'd like to direct these kinds of things to either the mailing list or the IRC channel.
This does not look as much as an Ansible issue as an ssh/DNS setup on your controller issue.
If you can stop by there, we'd appreciate it. This allows us to keep the issue tracker for bugs, pull requests, RFEs and the like.
Thank you once again and we look forward to seeing you on the list or IRC. Thanks!
This seems to be duplicate of #11536 but you have to run cmd from
Currently that error is hiden behind:
I have the same error. If I use in my host file the public DNS of Amazon Ec2 I got:
If I change the DNS by an IP works like a charm.
I ran in to the same problem. Based on the comments in ansible.cfg, the length of the ec2 domain name is going over the character limit for file socket names (I have no understanding of what I just said...). Long story short, the answer is this issue comment as pointed out by @suside .
Presumably it wouldn't help if you're running from within a deeply nested directory (or one with a long name). I simply uncommented the first 'control_path' example in the stock ansible.cfg file and it started working. It now reads:
EDIT: Just to be clear, based on my shaky understanding, it's neither a problem with your DNS setup nor Ansible. I think it's some sort of fundamental limitation of our operating systems.