crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.23k stars 233 forks source link

[BUG] Check DNS query from host... Failed on Windows 10 #3295

Open pkesseli opened 1 year ago

pkesseli commented 1 year ago

General information

CRC version

CRC version: 2.6.0+e7251680
OpenShift version: 4.10.22
Podman version: 4.1.0

CRC status

DEBU CRC version: 2.6.0+e7251680
DEBU OpenShift version: 4.10.22
DEBU Podman version: 4.1.0
DEBU Running 'crc status'
DEBU Checking file: C:\Users\Pascal\.crc\machines\crc\.crc-exist
DEBU Checking file: C:\Users\Pascal\.crc\machines\crc\.crc-exist
DEBU Running 'Hyper-V\Get-VM crc | Select-Object -ExpandProperty State'
DEBU Running SSH command: df -B1 --output=size,used,target /sysroot | tail -1
DEBU Using ssh private keys: [C:\Users\Pascal\.crc\machines\crc\id_ecdsa C:\Users\Pascal\.crc\cache\crc_hyperv_4.10.22_amd64\id_ecdsa_crc]
DEBU SSH command results: err: <nil>, output: 32737570816 13888417792 /sysroot
DEBU cannot get OpenShift status: CreateFile C:\Users\Pascal\.crc\machines\crc\kubeconfig: The system cannot find the file specified.
CRC VM:          Running
OpenShift:       Unreachable (v4.10.22)
Podman:
Disk Usage:      13.89GB of 32.74GB (Inside the CRC VM)
Cache Usage:     18.42GB
Cache Directory: C:\Users\Pascal\.crc\cache

CRC config

- consent-telemetry                     : no

Host Operating System

Host Name:                 WORKSTATION-00
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19043 N/A Build 19043
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          <redacted>
Registered Organization:
Product ID:                <redacted>
Original Install Date:     16/03/2021, 11:06:55
System Boot Time:          05/08/2022, 16:32:15
System Manufacturer:       Hewlett-Packard
System Model:              HP EliteDesk 800 G1 SFF
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 60 Stepping 3 GenuineIntel ~3601 Mhz
BIOS Version:              Hewlett-Packard L01 v02.65, 13/07/2015
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             de-ch;German (Switzerland)
Input Locale:              en-gb;English (United Kingdom)
Time Zone:                 (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
Total Physical Memory:     32,658 MB
Available Physical Memory: 13,572 MB
Virtual Memory: Max Size:  37,522 MB
Virtual Memory: Available: 14,747 MB
Virtual Memory: In Use:    22,775 MB
Page File Location(s):     D:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\WORKSTATION-00
Hotfix(s):                 15 Hotfix(s) Installed.
                           [01]: KB5013887
                           [02]: KB4562830
                           [03]: KB4577586
                           [04]: KB4580325
                           [05]: KB4589212
                           [06]: KB5000736
                           [07]: KB5015807
                           [08]: KB5006753
                           [09]: KB5007273
                           [10]: KB5011352
                           [11]: KB5011651
                           [12]: KB5014032
                           [13]: KB5014035
                           [14]: KB5014671
                           [15]: KB5005699
Network Card(s):           6 NIC(s) Installed.
                           [01]: Hyper-V Virtual Ethernet Adapter
                                 Connection Name: vEthernet (Default Switch)
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: <redacted>
                                 [02]: <redacted>
                           [02]: Intel(R) Ethernet Connection I217-LM
                                 Connection Name: Ethernet 5
                                 DHCP Enabled:    Yes
                                 DHCP Server:     <redacted>
                                 IP address(es)
                                 [01]: <redacted>
                                 [02]: <redacted>
                                 [03]: <redacted>
                           [03]: ASUS PCE-AC88 802.11ac Network Adapter
                                 Connection Name: WiFi 2
                                 Status:          Hardware not present
                           [04]: Hyper-V Virtual Ethernet Adapter
                                 Connection Name: vEthernet (WSL)
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: <redacted>
                                 [02]: <redacted>
                           [05]: VirtualBox Host-Only Ethernet Adapter
                                 Connection Name: Ethernet 3
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: <redacted>
                                 [02]: <redacted>
                           [06]: Bluetooth Device (Personal Area Network)
                                 Connection Name: Bluetooth-Netzwerkverbindung
                                 Status:          Media disconnected
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Steps to reproduce

GUI:

  1. Download and run crc-windows-amd64.msi
  2. Run "Red Hat OpenShift Local" and follow wizard instructions
  3. Run new instance from tray icon
  4. View log from tray icon

Console:

  1. Download and run crc-windows-amd64.msi
  2. Run crc setup in an admin PowerShell terminal
  3. Run crc start in non-admin PowerShell terminal

Expected

Check DNS query from host... passes, OpenShift starts and is able to download images from DockerHub.

Actual

Check DNS query from host...
Failed to query DNS from host: lookup foo.apps-crc.testing: no such host

In addition to this, Verifying validity of the kubelet certificates... fails. In the GUI version CRC tries to start again from scratch, in the console version it exits with an error. https://console-openshift-console.apps-crc.testing/ is available and new projects can be configured, but any pod will fail to download images from DockerHub, whether or not I configure an image pull credential.

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.

crc-start-log-level-debug.log

praveenkumar commented 1 year ago

This looks similar to #3294, as per start logs it is also failed to renew the certificates.

gbraad commented 1 year ago

this is an SFF system. Does the CPU throttle under load?

pkesseli commented 1 year ago

It's an Intel Core i7 4790, it supports thermal throttling, so certainly possible. I guess if as a response to https://github.com/code-ready/crc/issues/3294 you add support for custom timeouts during this renewal, this should address my issue as well and we can close this ticket.

gbraad commented 1 year ago

These timeouts are part of OpenShift. We do not have any control over this :-/ Let's continue in the other issue. OK?

pkesseli commented 1 year ago

For the timeout issue that makes sense, but just to double-check: Before I hit the timeout there is also a DNS error in my log.

Check DNS query from host...
Failed to query DNS from host: lookup foo.apps-crc.testing: no such host

This was the original reason why I created this issue. Is this expected for the same reason as the TLS renewal or does this sound like a network / DNS issue on Windows 10 / Hyper-V?

gbraad commented 1 year ago

We haven't been impacted by this for quite some time. The last was https://github.com/code-ready/crc/issues/1193 and we resolved this by directly using the hosts file. Check the entries in c:\windows\system32\drivers\etc\hosts. Is there and entry for the foo.apps-crc.testing hostname?

stale[bot] commented 1 year ago

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.

luisdanielmesa commented 1 year ago

I have this issue, it doesn't really affect me, but it seems like an oversight to look for a hard-coded namespace like "foo" in the startup. The whole Red Hat OpenShift Local feels sketchy as hell.

My local system has 32 cores and 64GB of ram... so not slow at all.

jochenr commented 1 year ago

I have exactly the same issue here

INFO Check DNS query from host...
WARN Failed to query DNS from host: lookup foo.apps-crc.testing: no such host

using

PS C:\> crc version
time="2022-12-06T16:19:12+01:00" level=warning msg="Could not load system CA pool: crypto/x509: system root pool is not available on Windows"
WARN Could not load system CA pool: crypto/x509: system root pool is not available on Windows
CRC version: 2.11.0+a5f90a25
OpenShift version: 4.11.13
Podman version: 4.2.0
cfergeau commented 1 year ago

WARN Failed to query DNS from host: lookup foo.apps-crc.testing: no such host is expected behaviour, so this is not indicating any specific issues with your crc install. This warning has been removed in git. Can you file a new issue and provide the information from the issue template so that we can investigate what's going on?

jochenr commented 1 year ago

thanks for making clear that the mentioned warning is expected behaviour.

meanwhile I found the cause of my DNS problems. crc is not the only software on my machine manipulationg the hosts file. VMWare was/is writing rules to the same line in the hosts ...and that line became too long

it would be good if the tools would write each rule in a seperate line.....

cfergeau commented 1 year ago

We have code to make sure the line does not get too long, but maybe we don't catch what vmware is doing to it :-/