crc: [BUG] Failed to query DNS from host: Invalid IP for api.crc.testing

General information

  • OS: macOS
  • Hypervisor: hyperkit
  • Did you run crc setup before starting it (Yes/No)? Yes
  • Running CRC on: Laptop

CRC version

crc version: 1.11.0+883ca49
OpenShift version: 4.4.5 (embedded in binary)

CRC status

crc status --log-level debug
DEBU Running '/Users/pottavia/.crc/bin/oc/oc get co -ojson --kubeconfig /Users/pottavia/.crc/machines/crc/kubeconfig --context admin --cluster crc' 
DEBU Command failed: exit status 1                
DEBU stdout:                                      
DEBU stderr: error: stat /Users/pottavia/.crc/machines/crc/kubeconfig: no such file or directory 
DEBU error: stat /Users/pottavia/.crc/machines/crc/kubeconfig: no such file or directory 
ERRO stat /Users/pottavia/.crc/machines/crc/id_rsa: no such file or directory 

CRC config

N/A

Host Operating System

sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.5
BuildVersion:	19F101

Steps to reproduce

  1. crc setup
  2. crc start -p ./pull-secret --log-level debug

Expected

Actual

INFO Check DNS query from host …
DEBU api.crc.testing resolved to [40.68.249.35]
WARN api.crc.testing resolved to [40.68.249.35] but 192.168.64.2 was expected ERRO Failed to query DNS from host: Invalid IP for api.crc.testing

Logs

Before gather the logs try following if that fix your issue

$ crc delete -f
$ crc cleanup
$ crc setup
$ crc start --log-level debug

Please consider posting the output of crc start --log-level debug on http://gist.github.com/ and post the link in the issue.

https://gist.github.com/pottacode/2f42bb5128072647b0f8216a06c1f2cb

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

@psrin7 I think @pottacode just changed the file permissions for /etc/hosts

sudo chmod 644 /etc/hosts

then it looks like this

ls -l /etc/hosts -rw-r--r-- 1 root wheel 930 Jun 25 11:47 /etc/hosts

I had the same problem and changing the pemissions fixed it.