crc: Console can not be resolved due to DNS setup issues

General information

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

CRC version

crc version: 1.0.0+575079b
OpenShift version: 4.2.0 (embedded in binary)

CRC status

CRC VM:          Running
OpenShift:       Running (v4.2.0)
Disk Usage:      9.61GB of 32.2GB (Inside the CRC VM)
Cache Usage:     9.608GB
Cache Directory: /Users/psrin14/.crc/cache

CRC config

C02Y93QNJGH6:~ psrin14$ crc config view
- memory                                : 16384
- pull-secret-file                      : ~/Downloads/pull-secret.txt

Host Operating System

ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G95

Steps to reproduce

  1. crc setup
  2. crc start
  3. crc console

Expected

The requested URL could not be retrieved. Unable to determine IP address from host name for console-openshift-console.apps-crc.testing

Actual

Console should come up

Logs

$ crc start
INFO Checking if running as non-root
INFO Checking if oc binary is cached
INFO Checking if HyperKit is installed
INFO Checking if crc-driver-hyperkit is installed
INFO Checking file permissions for /etc/resolver/testing
INFO Checking file permissions for /etc/hosts
INFO Starting CodeReady Containers VM for OpenShift 4.2.0...
INFO Verifying validity of the cluster certificates ...
INFO Network restart not needed
INFO Check internal and public DNS query ...
WARN Failed public DNS query: ssh command error:
command : host -R 3 quay.io
err     : exit status 1
output  : Host quay.io not found: 3(NXDOMAIN)
 :
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 wyozw-5ywAy-5yoap-7rj8q
INFO
INFO You can now run 'crc console' and use these credentials to access the OpenShift web console
The OpenShift cluster is running
WARN The cluster might report a degraded or error state. This is expected since several operators have been disable to lower the resource usage. For more information, please consult the documentation


$ crc ip
192.168.64.6

$ ping 192.168.64.6
PING 192.168.64.6 (192.168.64.6): 56 data bytes
64 bytes from 192.168.64.6: icmp_seq=0 ttl=64 time=0.206 ms
64 bytes from 192.168.64.6: icmp_seq=1 ttl=64 time=0.207 ms
64 bytes from 192.168.64.6: icmp_seq=2 ttl=64 time=0.211 ms
64 bytes from 192.168.64.6: icmp_seq=3 ttl=64 time=0.249 ms
64 bytes from 192.168.64.6: icmp_seq=4 ttl=64 time=0.298 ms
^C
--- 192.168.64.6 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.206/0.234/0.298/0.036 ms

$ crc console
Opening the OpenShift Web Console in the default browser...
$ oc login -u kubeadmin -p wyozw-5ywAy-5yoap-7rj8q https://api.crc.testing:6443
Login successful.

You have access to 51 projects, the list has been suppressed. You can list all projects with 'oc projects'

Using project "default".
$ oc get co
NAME                                       VERSION   AVAILABLE   PROGRESSING   DEGRADED   SINCE
authentication                             4.2.0     True        False         False      8d
cloud-credential                           4.2.0     True        False         False      8d
cluster-autoscaler                         4.2.0     True        False         False      8d
console                                    4.2.0     True        False         False      12m
dns                                        4.2.0     True        False         False      12m
image-registry                             4.2.0     True        False         False      8d
ingress                                    4.2.0     True        False         False      8d
insights                                   4.2.0     True        False         False      8d
kube-apiserver                             4.2.0     True        False         False      8d
kube-controller-manager                    4.2.0     True        False         False      8d
kube-scheduler                             4.2.0     True        False         False      8d
machine-api                                4.2.0     True        False         False      8d
machine-config                             4.2.0     False       True          True       8d
marketplace                                4.2.0     True        False         False      12m
monitoring                                           False       True          True       8d
network                                    4.2.0     True        False         False      8d
node-tuning                                4.2.0     True        False         False      12m
openshift-apiserver                        4.2.0     True        False         False      22m
openshift-controller-manager               4.2.0     True        False         False      20m
openshift-samples                          4.2.0     True        False         False      8d
operator-lifecycle-manager                 4.2.0     True        False         False      8d
operator-lifecycle-manager-catalog         4.2.0     True        False         False      8d
operator-lifecycle-manager-packageserver   4.2.0     True        False         False      12m
service-ca                                 4.2.0     True        False         False      8d
service-catalog-apiserver                  4.2.0     True        False         False      8d
service-catalog-controller-manager         4.2.0     True        False         False      8d
storage                                    4.2.0     True        False         False      8d

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 31 (12 by maintainers)

Most upvoted comments

I have same problem on MAC Mojave 10.14.6.
I can ping:

$ ping console-openshift-console.apps-crc.testing 
PING console-openshift-console.apps-crc.testing (192.168.64.2): 56 data bytes
64 bytes from 192.168.64.2: icmp_seq=0 ttl=64 time=0.156 ms
64 bytes from 192.168.64.2: icmp_seq=1 ttl=64 time=0.202 ms
64 bytes from 192.168.64.2: icmp_seq=2 ttl=64 time=0.258 ms
^C
--- console-openshift-console.apps-crc.testing ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.156/0.205/0.258/0.042 ms
$

I can check dns/resolver

$ dscacheutil -q host -a name console-openshift-console.apps- crc.testing 
name: console-openshift-console.apps-crc.testing
ip_address: 192.168.64.2

$

The browser won’t use the resolver that the system is using. Could be a corporate security thingy… I’ve tried safari, chrome and firefox. Searching for a workaround to get my firefox to use the system resolver (cuz that works fine as seen above).

running:

networksetup -setnetworkserviceenabled "Thunderbolt Ethernet Slot 1" off
networksetup -setnetworkserviceenabled "Thunderbolt Ethernet Slot 1" on

doesn’t work for me either. I’ve also tried

sudo ifconfig en9 down && sudo ifconfig en9 up

Note: en9 is my network interface, the only one enabled at the moment, through Thunderbolt to a docking station is where the ethernet is.

The browser (any of them) simply will not use /etc/resolver/testing.

Note, everything matches up for me, /etc/hosts, /etc/resolver/testing, scutil --dns all have the same “crc ip” address. No weird mismatches or anything. since dscacheutil works as seen above, my system can resolve the testing domain just fine, my browser cannot.

i’ll post the secret sauce if I find it.

SECRET SAUCE FOUND

at least for firefox

  1. Preferences -> Proxy -> Settings -> add .testing
  2. Clear cache
  3. reload and accept the insecure certificates

TADA!

NOTE: my laptop is a corporate laptop and we have PROXY set, so thinking THAT is the root of all my (and some of your) EVIL above.

@edeandrea

For me I am not behind any company firewall.

May be it doesn’t matter and the issue is something else 😃