Crc: [BUG] Ubuntu crc start fails with: lookup api.crc.testing: no such host

Created on 20 Sep 2019  Â·  12Comments  Â·  Source: code-ready/crc

Seems related to #293 and linked older issues.

General information

  • OS: Linux
  • Hypervisor: libvirt
  • Did you run crc setup before starting it? Yes

CRC version

version: 1.0.0-beta.5+f2aa58c
OpenShift version: 4.1.14 (embedded in binary)

CRC status

ERRO Error occurred: Unable to connect to the server: dial tcp: lookup api.crc.testing: no such host
 - exit status 1 

CRC config

- skip-check-user-in-libvirt-group      : true

Host Operating System

NAME="Ubuntu"
VERSION="19.04 (Disco Dingo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.04"
VERSION_ID="19.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=disco
UBUNTU_CODENAME=disco

Steps to reproduce

  1. Installed as per instructions on https://code-ready.github.io/crc/ (modulo #622)

Expected

Success.

Actual

…
INFO Extracting bundle: crc_libvirt_4.1.14.crcbundle ... 
INFO Creating VM ...                              
INFO Verifying validity of the cluster certificates ... 
INFO Check internal and public dns query ...      
INFO Copying kubeconfig file to instance dir ...  
INFO Adding user's pull secret and cluster ID ... 
INFO Starting OpenShift cluster ... [waiting 3m]  
INFO                                              
INFO To access the cluster, first set up your environment by following 'crc oc-env' instructions 
INFO Then you can access it by running 'oc login -u developer -p developer https://api.crc.testing:6443' 
INFO To login as an admin, username is 'kubeadmin' and password is …
INFO                                              
INFO These credentials can also be used to access the OpenShift web console at https://console-openshift-console.apps-crc.testing 
ERRO Error occurred: Error approving the node csr Not able to get csr names (exit status 1 : Unable to connect to the server: dial tcp: lookup api.crc.testing: no such host

Logs

With --log-level debug:

INFO Checking if running as non-root              
INFO Checking if oc binary is cached              
DEBU oc binary already cached                     
INFO Checking if Virtualization is enabled        
DEBU Checking if the vmx/svm flags are present in /proc/cpuinfo 
DEBU CPU virtualization flags are good            
INFO Checking if KVM is enabled                   
DEBU Checking if /dev/kvm exists                  
DEBU /dev/kvm was found                           
INFO Checking if libvirt is installed             
DEBU Checking if 'virsh' is available             
DEBU 'virsh' was found in /usr/bin/virsh          
INFO Checking if user is part of libvirt group    
WARN Skipping above check ...                     
INFO Checking if libvirt is enabled               
DEBU Checking if libvirtd.service is enabled      
DEBU libvirtd.service is already enabled          
INFO Checking if libvirt daemon is running        
DEBU Checking if libvirtd.service is running      
DEBU libvirtd.service is already running          
INFO Checking if crc-driver-libvirt is installed  
DEBU Checking if crc-driver-libvirt is installed  
DEBU crc-driver-libvirt is already installed in /home/jglick/.crc/bin/crc-driver-libvirt 
INFO Checking if libvirt 'crc' network is available 
DEBU Checking if libvirt 'crc' network exists     
DEBU libvirt 'crc' network exists                 
INFO Checking if libvirt 'crc' network is active  
DEBU Checking if libvirt 'crc' network is active  
DEBU libvirt 'crc' network is already active      
INFO Checking if NetworkManager is installed      
DEBU Checking if 'nmcli' is available             
DEBU 'nmcli' was found in /usr/bin/nmcli          
INFO Checking if NetworkManager service is running 
DEBU Checking if NetworkManager.service is running 
DEBU NetworkManager.service is already running    
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists 
DEBU Checking NetworkManager configuration        
DEBU NetworkManager configuration is good         
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists 
DEBU Checking dnsmasq configuration               
DEBU dnsmasq configuration is good                
Checking file: /home/jglick/.crc/machines/crc/.crc-exist
Found binary path at /home/jglick/.crc/bin/crc-driver-libvirt
Launching plugin server for driver libvirt
Plugin server listening at address 127.0.0.1:46391
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(crc) Calling .GetBundleName
(crc) Calling .DriverName
(crc) Calling .GetState
(crc) DBG | Getting current state...
(crc) DBG | Fetching VM...
Making call to close driver server
(crc) Calling .Close
Successfully made call to close driver server
Making call to close connection to plugin binary
CodeReady Containers instance is running
kinbug statustale

Most helpful comment

well. I have a desktop install of 18.04.. and it's using systemd-resolved. So the question is what manual steps are required, and how can we automate them? :-P

All 12 comments

I expect 'ping api.crc.testing' is not functional ?

Did not think to test it, sorry, and already uninstalled libvirt since it seems to have broken in-cluster DNS for Microk8s. Might try again later with the VirtualBox driver.

Note that VirtualBox is less optimized when it comes to resources. Start times for CRC are between 1.5 to 2x slower on vbox.

Also we don't support the vbox on linux.

I think the issue is that the install expects dnsmasq. ubuntu does not use dnsmasq, it uses systemd-resolved... which means whatever crc is doing to set up networking is a big no-op for ubuntu.

591 won't help either, as nmcli is just a command-line method of dealing with NetworkManager

Last time we looked into this, ubuntu server installs were using systemd-resolvd, while ubunt desktop installs are using networkmanager. crc indeed requires networkmanager at the moment, or manual configuration will be needed.

well. I have a desktop install of 18.04.. and it's using systemd-resolved. So the question is what manual steps are required, and how can we automate them? :-P

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I am getting the same error while following docs.

https://gist.github.com/amiya-mandal/95fea0084fa66f641969b9d396bd7caa

I'm getting the same here on Centos 7.7 with crc 1.8.0 . NetworkManager is installed - other than this it was a fresh clean install

I'm getting the same here on Centos 7.7 with crc 1.8.0 . NetworkManager is installed - other than this it was a fresh clean install

Please open a new issue, ubuntu and centos are sufficiently different that it's unlikely to be the same issue

Was this page helpful?
0 / 5 - 0 ratings