Search code examples
sslchef-infraknife

Knife SSL check fails when workstation is undocked


My Chef workstation is a virtual machine. I initially setup this machine with Hosted Chef server while the machine was docked in my computer's dock and hardlined to the internet.

When I undock the workstation, the knife ssl command fails with the following error:

c2-device@c2failover-VirtualBox:~$ cd chef/
c2-device@c2failover-VirtualBox:~/chef$ knife ssl check
Connecting to host api.chef.io:443
ERROR: Network Error: getaddrinfo: Name or service not known
Check your knife configuration and network settings
c2-device@c2failover-VirtualBox:~/chef$ 

I have since assigned a resolvable IP address to the VM workstation as it was using DHCP prior. I'm not sure how to resolve this issue or what the issue may be when undocking my workstation. Does anyone have any possible causes or solutions to the issue I'm seeing?

my network interface is configured as follows:

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address XXX.XXX.X.XXX
        netmask XXX.XXX.XXX.X
        gateway XXX.XXX.XX.XXX
        dns-nameservers X.X.X.X

I have not been able to find much in the chef documentation about this issue. Thanks for any help in advance, I'm fairly new to Chef.


Solution

  • This is not related to Chef or knife. You'll need to ensure the VM is able to reach the Internet in general. Overall we do not recommend using a VM as your workstation, you the actual desktop or laptop that you work on.