Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to query DNS from host: lookup api.crc.testing #3916

Closed
jimmynlssn opened this issue Nov 14, 2023 · 14 comments
Closed

Failed to query DNS from host: lookup api.crc.testing #3916

jimmynlssn opened this issue Nov 14, 2023 · 14 comments
Labels
kind/bug Something isn't working os/windows

Comments

@jimmynlssn
Copy link

jimmynlssn commented Nov 14, 2023

General information

  • OS: Windows
  • Hypervisor: Hyper-V
  • Did you run crc setup before starting it (Yes/No)? Yes
  • Running CRC on: Laptop

CRC version

# Put `crc version` output here
CRC version: 2.29.0+da5f55
OpenShift version: 4.14.1
Podman version: 4.4.4

CRC status

# Put `crc status --log-level debug` output here
DEBU CRC version: 2.29.0+da5f55
DEBU OpenShift version: 4.14.1
DEBU Podman version: 4.4.4
DEBU Running 'crc status'
CRC VM:          Running
OpenShift:       Running (v4.14.1)
RAM Usage:       5.76GB of 9.361GB
Disk Usage:      20.95GB of 32.68GB (Inside the CRC VM)
Cache Usage:     25.11GB
Cache Directory: C:\Users\jmni\.crc\cache

CRC config

# Put `crc config view` output here
- consent-telemetry                     : no
- 

Host Operating System

# Put the output of `cat /etc/os-release` in case of Linux
# put the output of `sw_vers` in case of Mac
# Put the output of `systeminfo` in case of Windows
Host Name:                 censored
OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          Standard
Registered Organization:   N/A
Product ID:                00355-60816-50359-AAOEM
Original Install Date:     2023-04-24, 13:39:22
System Boot Time:          2023-11-14, 08:14:11
System Manufacturer:       Dell Inc.
System Model:              XPS 15 9520
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 154 Stepping 3 GenuineIntel ~2300 Mhz
BIOS Version:              Dell Inc. 1.18.0, 2023-09-12
Windows Directory:         C:\Windows
System Directory:          C:\Windows\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             en-us;English (United States)
Input Locale:              sv;Swedish
Time Zone:                 (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
Total Physical Memory:     32 439 MB
Available Physical Memory: 10 540 MB
Virtual Memory: Max Size:  44 727 MB
Virtual Memory: Available: 18 235 MB
Virtual Memory: In Use:    26 492 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    censored.lan
Logon Server:              \\censored
Hotfix(s):                 5 Hotfix(s) Installed.
                           [01]: KB5030651
                           [02]: KB5012170
                           [03]: KB5026039
                           [04]: KB5031354
                           [05]: KB5031592
Network Card(s):           5 NIC(s) Installed.
                           [01]: Intel(R) Wi-Fi 6E AX211 160MHz
                                 Connection Name: Wi-Fi
                                 Status:          Media disconnected
                           [02]: Bluetooth Device (Personal Area Network)
                                 Connection Name: Bluetooth Network Connection
                                 Status:          Media disconnected
                           [03]: Realtek USB GbE Family Controller
                                 Connection Name: Ethernet 2
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.1.1
                                 IP address(es)
                                 [01]: 192.168.1.20
                                 [02]: fe80::a27f:ae36:f12e:6685
                           [04]: Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
                                 Connection Name: Ethernet 4
                                 Status:          Hardware not present
                           [05]: VirtualBox Host-Only Ethernet Adapter
                                 Connection Name: Ethernet 6
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: 192.168.56.1
                                 [02]: fe80::95a8:5af1:b9be:4463
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Steps to reproduce

  1. crc setup
  2. crc start
  3. oc login -u developer https://api.crc.testing:6443

Expected

Login with cli.

Actual

Error message:

error: dial tcp: lookup api.crc.testing: getaddrinfow: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. - verify you have provided the correct host and port and that the server is currently running.

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.

@gbraad
Copy link
Contributor

gbraad commented Nov 14, 2023

When you try to connect to the cluster, are you by any chance connected to a VPN (I do see AnyConnect)?

Note that VirtualBox is also installed. Since the hypervisor needs to run in exclusive mode, this might have effects on the way Hyper-V will work.

@gbraad
Copy link
Contributor

gbraad commented Nov 14, 2023

Can you use:

PS> ping api.crc.testing

to make sure this is referring to localhost?

@gbraad gbraad changed the title Failed to query DNS from host: lookup api.crc.testing: getaddrinfow: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. Failed to query DNS from host: lookup api.crc.testing Nov 14, 2023
@jimmynlssn
Copy link
Author

jimmynlssn commented Nov 14, 2023 via email

@jimmynlssn
Copy link
Author

jimmynlssn commented Nov 14, 2023 via email

@gbraad
Copy link
Contributor

gbraad commented Nov 14, 2023

the address api.crc.testing should have to resolve to 127.0.0.1. Can you check the contents of your hosts file? You can find it in [WINDRIVE]:\windows\system32\etc\drivers\hosts

@jimmynlssn
Copy link
Author

jimmynlssn commented Nov 14, 2023 via email

@gbraad
Copy link
Contributor

gbraad commented Nov 14, 2023

the entries view localhost server look weird to me and perhaps cause the issue. As this might mean that 'localhost' is a reserved name for the address view... and it also extends the line beyond the supported limit.

hmmm...

Can you edit this by removing view localhost server and try again?

@gbraad
Copy link
Contributor

gbraad commented Nov 14, 2023

Note that those references # view localhost server are created by the VMware Horizon Client. They aren't added or modified by us, but by the installation/execution of this client.

@jimmynlssn
Copy link
Author

jimmynlssn commented Nov 14, 2023 via email

@gbraad
Copy link
Contributor

gbraad commented Nov 14, 2023

Something on your system prevents the correct lookup to happen, as can be seen in: #3916 (comment)

Add a new line to the hosts file with

127.0.0.1 api.crc.testing

and see if this can be resolved. Otherwise, please check if you have other tools installed that might cause issues with networking, such as an application firewall, antivirus, etc.

@gbraad
Copy link
Contributor

gbraad commented Nov 15, 2023

Any updates?
This is not reproducible for me, so it is a local issue with your (networking) setup.

@jimmynlssn
Copy link
Author

jimmynlssn commented Nov 20, 2023 via email

@praveenkumar
Copy link
Member

Closing this since it is worked. Please reopen or create new if you face it again.

@gbraad
Copy link
Contributor

gbraad commented Nov 24, 2023

This could have helped maybe: crc-org/admin-helper#42

@crc-org/crc-team PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working os/windows
Projects
None yet
Development

No branches or pull requests

3 participants