Can I get some help with an issue I am having with the knife ssh command? It is throwing a socket error when trying to use knife to issue a command on a chef node. As you can see below, the chef node name is the same as the full hostname, and the full hostname is also the same as the FQDN which is resolveable by DNS. The odd thing I noticed is that the error message uses the correct hostname but incorrect domain, but I don't know why.
To protect the innocent, I have flubbed/omitted some values.
my_userp@host_name:~$ SEARCH_QUERY="name:host_name.host_domain.com" my_userp@host_name:~$ SSH_CMD="ls /home/my_user/" my_userp@host_name:~$ hostname -f host_name.host_domain.com my_userp@host_name:~$ nslookup $(hostname -f) Server: 10.0.0.100 Address: 10.0.0.100#53 Non-authoritative answer: Name: host_name.host_domain.com Address: 10.0.0.100 my_userp@host_name:~$ knife node show $(hostname -f) Node Name: host_name.host_domain.com Environment: my_org FQDN: host_name.host_domain.com IP: 10.0.0.100 Run List: role[my-role-specific] Roles: my-role-specific, my-role-general Recipes: my-code::start, my-code::finish Platform: ubuntu 14.04 Tags: my-tag my_userp@host_name:~$ knife ssh "name:$(hostname -f)" "date" WARNING: Failed to connect to host_name.novalocal -- SocketError: getaddrinfo: Name or service not known