crc: After crc setup dnsmasq break configuration for public dns as port is already bound to another process (conflict)

General information

  • OS: Linux Red Hat Enterprise Linux 8.2 (Ootpa)
  • Hypervisor: KVM / Hyper-V / hyperkit
  • Did you run crc setup before starting it YES

CRC version

 ./crc version
CodeReady Containers version: 1.18.0+bb304aa
OpenShift version: 4.6.1 (embedded in binary)

CRC status

 ./crc status
Machine 'crc' does not exist. Use 'crc start' to create it

CRC config

./crc config view

Host Operating System

 cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.2 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.2"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.2 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.2:GA"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.2
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.2"

Steps to reproduce

  1. ping redhat.com PING redhat.com (209.132.183.105) 56(84) bytes of data. 64 bytes from redirect.redhat.com (209.132.183.105): icmp_seq=1 ttl=235 time=178 ms 64 bytes from redirect.redhat.com (209.132.183.105): icmp_seq=2 ttl=235 time=177 ms

  2. ./crc setup

./crc setup
INFO Checking if oc binary is cached              
INFO Checking if podman remote binary is cached   
INFO Checking if goodhosts binary is cached       
INFO Checking if CRC bundle is cached in '$HOME/.crc' 
INFO Checking minimum RAM requirements            
INFO Checking if running as non-root              
INFO Checking if Virtualization is enabled        
INFO Checking if KVM is enabled                   
INFO Checking if libvirt is installed             
INFO Checking if user is part of libvirt group    
INFO Checking if libvirt daemon is running        
INFO Checking if a supported libvirt version is installed 
INFO Checking if crc-driver-libvirt is installed  
INFO Checking for obsolete crc-driver-libvirt     
INFO Checking if libvirt 'crc' network is available 
INFO Setting up libvirt 'crc' network             
INFO Checking if libvirt 'crc' network is active  
INFO Starting libvirt 'crc' network               
INFO Checking if NetworkManager is installed      
INFO Checking if NetworkManager service is running 
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists 
INFO Writing Network Manager config for crc       
INFO Will use root access: write NetworkManager config in /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf 
Identified face as aobrzut
INFO Will use root access: Changing permission for /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf to 420  
INFO Will use root access: executing systemctl daemon-reload command 
INFO Will use root access: executing systemctl reload NetworkManager 
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists 
INFO Writing dnsmasq config for crc               
INFO Will use root access: write dnsmasq configuration in /etc/NetworkManager/dnsmasq.d/crc.conf 
INFO Will use root access: Changing permission for /etc/NetworkManager/dnsmasq.d/crc.conf to 420  
INFO Will use root access: executing systemctl daemon-reload command 
INFO Will use root access: executing systemctl reload NetworkManager 
Setup is complete, you can now run 'crc start' to start the OpenShift cluster
  1. ping redhat.com ping: redhat.com: Name or service not known
  2. ./crc cleanup INFO Removing the crc VM if exists
    INFO Removing /etc/NetworkManager/dnsmasq.d/crc.conf file INFO Will use root access: removing dnsmasq configuration in /etc/NetworkManager/dnsmasq.d/crc.conf INFO Will use root access: executing systemctl daemon-reload command INFO Will use root access: executing systemctl reload NetworkManager INFO Removing /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf file INFO Will use root access: Removing NetworkManager config in /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf INFO Will use root access: executing systemctl daemon-reload command INFO Will use root access: executing systemctl reload NetworkManager INFO Removing ‘crc’ network from libvirt
    Cleanup finished
  3. ping redhat.com PING redhat.com (209.132.183.105) 56(84) bytes of data. 64 bytes from redirect.redhat.com (209.132.183.105): icmp_seq=1 ttl=235 time=178 ms 64 bytes from redirect.redhat.com (209.132.183.105): icmp_seq=2 ttl=235 time=177 ms

Expected

After setup CRC DNS network should work, and I can ping redhat webpage

Actual

After setup CRC DNS network not work, and I can not ping redhat webpage

Logs

 cat  /etc/NetworkManager/dnsmasq.d/crc.conf
server=/apps-crc.testing/192.168.130.11
server=/crc.testing/192.168.130.11

cat /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf
[main]
dns=dnsmasq

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 29 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Implementation note: it might be worthwhile to have a fatal preflight check to make sure nothing listens on localhost:53 before trying to setup dnsmasq+NetworkManager.

Ohh, I found maybe reason of my port unavailable On my laptop, there was a tool “IBM SAS GUI” which is installed by default on IBM Laptop sasgui-1.6.0-1.el8.x86_64 which based on pdnsd https://wiki.archlinux.org/index.php/pdnsd pdnsd-1.2.9a-3.el8.2.x86_64

After removing it and after go back to the standard configuration in systems crc works