I recently started studying chef and trying out with 3 nodes. I managed to set up my workstation on ubuntu (was not obvious) and bootstrapped 2 nodes for now. But below on this image their IP address is set to 127.0.0.1.
I boostrapped them using this following method:
$knife bootstrap xxxx.xxxx.com -x root -P xxxxxxxx -N xxxxxxxx
It seems fine, it appears on chef server but when I do the following to force run the chef-client on it, it throws some errors as displayed below.
$ knife ssh "name:logsmanager" "chef-client" -x root -a xxxx.xxxx.com
FATAL: 1 node found, but does not have the required attribute to establish the connection. Try setting another attribute to open the connection using --attribute.
Besides , I understand that the client nodes check in every 30 minutes by default but on my chef server nodes tab, it shows last checked in 6 days ago and 13 hours ago.
Does that mean the client nodes don't check the chef server or it's like source versioning checkin, checkout terminology?
I would be grateful if anybody can she some lights on this for me. Thank you
EDIT:
After running the command above, I run into another issue:
$ knife ssh "name:logsmanager" "chef-client" -x root -a fqdn
WARNING: Failed to connect to my.domain.com -- Net::SSH::AuthenticationFailed: Authentication failed for user [email protected]@my.domain.com .Seems to understant [email protected] as username for my.domain.com fqdn.
The
-a
argument toknife ssh
should be a node attribute in the "dotted path" syntax so things likefqdn
orcloud.public_ipv4
. By defaultknife ssh
will use the node's FQDN to connect to.Knife will run the search quer you provide and then use the given attribute to look up which name to pass to
Net::SSH
.