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.25k stars 236 forks source link

[BUG] dial tcp [fe80::21b6:a3a0:d48e:76ca]:22: connectex: A socket operation was attempted to an unreachable network. #2293

Closed polaroffer closed 3 years ago

polaroffer commented 3 years ago

General information

CRC version

# Put `crc version` output here
CodeReady Containers version: 1.25.0+0e5748c8
OpenShift version: 4.7.5 (embedded in executable)

## CRC status
```bash
# Put `crc status --log-level debug` output here
DEBU CodeReady Containers version: 1.25.0+0e5748c8
DEBU OpenShift version: 4.7.5 (embedded in executable)
DEBU Running 'crc status'
DEBU Checking file: C:\Users\WengJo1\.crc\machines\crc\.crc-exist
DEBU Checking file: C:\Users\WengJo1\.crc\machines\crc\.crc-exist
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM crc ).state
                   ] : Running
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM crc ).state
                   ] : Running
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM crc ).networkadapters[0]).ipaddresses[0]
DEBU [stdout =====>] :
DEBU [stderr =====>] :
Error getting ip: IP not found

## CRC config
```bash
# Put `crc config view` output here

Host Name: xxxxxxx OS Name: Microsoft Windows 10 Pro OS Version: 10.0.18363 N/A Build 18363 OS Manufacturer: Microsoft Corporation OS Configuration: Member Workstation OS Build Type: Multiprocessor Free Registered Owner: Desktop Management Services Registered Organization: Government of Ontario Product ID: 00331-10000-00001-AA915 Original Install Date: 03/27/2021, 5:07:47 PM System Boot Time: 04/29/2021, 7:13:25 AM System Manufacturer: LENOVO System Model: 20S1S80400 System Type: x64-based PC Processor(s): 1 Processor(s) Installed. 01: Intel64 Family 6 Model 142 Stepping 12 GenuineIntel ~804 Mhz BIOS Version: LENOVO N2XET26W (1.16 ), 11/04/2020 Windows Directory: C:\windows System Directory: C:\windows\system32 Boot Device: \Device\HarddiskVolume1 System Locale: en-ca;English (Canada) Input Locale: en-us;English (United States) Time Zone: (UTC-05:00) Eastern Time (US & Canada) Total Physical Memory: 16,135 MB Available Physical Memory: 2,018 MB Virtual Memory: Max Size: 30,983 MB Virtual Memory: Available: 8,148 MB Virtual Memory: In Use: 22,835 MB Page File Location(s): C:\pagefile.sys Domain: cihs.ad.xx.xxx.xxx Logon Server: \Mxxxxx Hotfix(s): 19 Hotfix(s) Installed.

                       [02]: KB4513661
                       [03]: KB4516115
                       [04]: KB4517245
                       [05]: KB4521863
                       [06]: KB4535680
                       [07]: KB4537759
                       [08]: KB4538674
                       [09]: KB4541338
                       [10]: KB4552152
                       [11]: KB4560959
                       [12]: KB4561600
                       [13]: KB4565554
                       [14]: KB4569073
                       [15]: KB4580325
                       [16]: KB4586863
                       [17]: KB5000908
                       [18]: KB5001406
                       [19]: KB5001337

Network Card(s): 7 NIC(s) Installed. 01: Intel(R) Ethernet Connection (10) I219-V Connection Name: Ethernet Status: Media disconnected [02]: Intel(R) Wi-Fi 6 AX201 160MHz Connection Name: Wi-Fi DHCP Enabled: Yes DHCP Server: 192.168.0.1 IP address(es)

                       [03]: Bluetooth Device (Personal Area Network)
                             Connection Name: Bluetooth Network Connection
                             Status:          Media disconnected
                       [04]: Check Point Virtual Network Adapter For Endpoint VPN Client
                             Connection Name: Local Area Connection* 3
                             Status:          Media disconnected
                       [05]: Hyper-V Virtual Ethernet Adapter
                             Connection Name: vEthernet (Default Switch)
                             DHCP Enabled:    No
                             IP address(es)
                             [01]: 169.254.28.31
                       [06]: Hyper-V Virtual Ethernet Adapter
                             Connection Name: vEthernet (WSL)
                             DHCP Enabled:    No
                             IP address(es)
                             [01]: 172.17.3.17
                       [07]: VirtualBox Host-Only Ethernet Adapter
                             Connection Name: VirtualBox Host-Only Network
                             DHCP Enabled:    No
                             IP address(es)
                             [01]: 192.168.56.1

Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.

### Steps to reproduce

  1. crc delete -f
  2. crc setup  
   successfully
  2. crc start --log-level debug

### Expected
crc up and running

### Actual
error

### Logs
```ps
DEBU CodeReady Containers version: 1.25.0+0e5748c8
DEBU OpenShift version: 4.7.5 (embedded in executable)
DEBU Running 'crc start'
DEBU Total memory of system is 16918601728 bytes
DEBU No new version available. The latest version is 1.25.0
INFO Checking if podman remote executable is cached
DEBU Currently podman remote is not supported
INFO Checking if admin-helper executable is cached
DEBU Running 'C:\Users\WengJo1\.crc\bin\admin-helper-windows.exe --version'
DEBU Found admin-helper-windows.exe version 0.0.3
DEBU admin-helper executable already cached
INFO Checking minimum RAM requirements
DEBU Total memory of system is 16918601728 bytes
INFO Checking if running in a shell with administrator rights
INFO Checking Windows 10 release
INFO Checking Windows edition
DEBU Running on Windows Professional edition
INFO Checking if Hyper-V is installed and operational
INFO Checking if user is a member of the Hyper-V Administrators group
INFO Checking if Hyper-V service is enabled
INFO Checking if the Hyper-V virtual switch exist
INFO Found Virtual Switch to use: Default Switch
DEBU Checking file: C:\Users\WengJo1\.crc\machines\crc\.crc-exist
DEBU Cannot load secret from configuration: empty path
DEBU Cannot load secret from keyring: secret not found in keyring
CodeReady Containers requires a pull secret to download content from Red Hat.
You can copy it from the Pull Secret section of https://cloud.redhat.com/openshift/create/local.
? Please enter the pull secret **********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
DEBU Copying 'C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\oc.exe' to 'C:\Users\WengJo1\.crc\bin\oc\oc.exe'
INFO Loading bundle: crc_hyperv_4.7.5.crcbundle ...
INFO Creating CodeReady Containers VM for OpenShift 4.7.5...
DEBU Running pre-create checks...
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @(Get-Module -ListAvailable hyper-v).Name | Get-Unique
                   ] : Hyper-V
DEBU [stderr =====>] :                                                                                                                                                      DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(([System.Security.Principal.SecurityIdentifier]::new("S-1-5-32-578")))                                                                                         True                                                                                                                                                 DEBU [stderr =====>] :                                                                                                                                                      DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive [Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\Get-VMSwitch).Name
DEBU [stdout =====>] : Default Switch

DEBU [stderr =====>] :
DEBU Creating machine...
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive [Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\Get-VMSwitch).Name
DEBU [stdout =====>] : Default Switch

DEBU [stderr =====>] :
DEBU Using switch "Default Switch"
DEBU Creating VM...
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\New-VM crc -Path 'C:\Users\WengJo1\.crc\machines\crc' -MemoryStartupBytes 9216MB -SwitchName 'Default Switch'
DEBU [stdout =====>] :
Name State CPUUsage(%) MemoryAssigned(M) Uptime   Status             Version
---- ----- ----------- ----------------- ------   ------             -------
crc  Off   0           0                 00:00:00 Operating normally 9.0

DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Set-VMMemory -VMName crc -DynamicMemoryEnabled $false
DEBU [stdout =====>] :
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Set-VMProcessor crc -Count 4
DEBU [stdout =====>] :
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Add-VMHardDiskDrive -VMName crc -Path 'C:\Users\WengJo1\.crc\machines\crc\crc.vhdx'
DEBU [stdout =====>] :
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Start-VM crc
DEBU [stdout =====>] :
DEBU [stderr =====>] :
DEBU Waiting for host to start...
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM crc ).state
                   ] : Running
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM crc ).networkadapters[0]).ipaddresses[0]
DEBU [stdout =====>] :
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM crc ).state
                   ] : Running
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM crc ).networkadapters[0]).ipaddresses[0]
DEBU [stdout =====>] :
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM crc ).state
                   ] : Running
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM crc ).networkadapters[0]).ipaddresses[0]
DEBU [stdout =====>] :
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM crc ).state
                   ] : Running
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM crc ).networkadapters[0]).ipaddresses[0]
 EBU [stdout =====>] : fe80::b589:7028:83d0:152b
DEBU [stderr =====>] :
DEBU Waiting for machine to be running, this may take a few minutes...
DEBU retry loop: attempt 0
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM crc ).state
                   ] : Running
DEBU [stderr =====>] :
DEBU Machine is up and running!
DEBU Machine successfully created
DEBU Created C:\Users\WengJo1\.crc\machines\crc\.crc-exist
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM crc ).state
                   ] : Running
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM crc ).state
                   ] : Running
DEBU [stderr =====>] :
DEBU [executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM crc ).networkadapters[0]).ipaddresses[0]
 EBU [stdout =====>] : fe80::b589:7028:83d0:152b
DEBU [stderr =====>] :
DEBU Waiting until ssh is available
DEBU retry loop: attempt 0
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\id_ecdsa_crc]
DEBU SSH command results: err: dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network., output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network.\n - sleeping 1s
DEBU retry loop: attempt 1
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\id_ecdsa_crc]
DEBU SSH command results: err: dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network., output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network.\n - sleeping 1s
DEBU retry loop: attempt 2
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\id_ecdsa_crc]
DEBU SSH command results: err: dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network., output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network.\n - sleeping 1s
DEBU retry loop: attempt 3
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\id_ecdsa_crc]
DEBU SSH command results: err: dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network., output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network.\n - sleeping 1s
DEBU retry loop: attempt 4
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\id_ecdsa_crc]
DEBU SSH command results: err: dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network., output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network.\n - sleeping 1s
DEBU retry loop: attempt 5
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\id_ecdsa_crc]
DEBU SSH command results: err: dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network., output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network.\n - sleeping 1s
DEBU retry loop: attempt 6
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\id_ecdsa_crc]
DEBU SSH command results: err: dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network., output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network.\n - sleeping 1s
DEBU retry loop: attempt 7
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\id_ecdsa_crc]
DEBU SSH command results: err: dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network., output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network.\n - sleeping 1s
DEBU retry loop: attempt 8
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\WengJo1\.crc\cache\crc_hyperv_4.7.5\id_ecdsa_crc]
DEBU SSH command results: err: dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network., output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : dial tcp [fe80::b589:7028:83d0:152b]:22: connectex: A socket operation was attempted to an unreachable network.\n - sleeping 1s

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.

polaroffer commented 3 years ago

There is no VPN connected.

anjannath commented 3 years ago

@polaroffer Looks like the VM is getting an IPv6 address, which will not work, as a work around you can try to disable ipv6 addresses for the default switch by going to Network & sharing Settings > change adapter settings > vEthernet Default switch properties and uncheck the IPv6 option. And then try to start crc again, remember to start from a clean state, i.e

PS> crc delete -f
PS> crc cleanup
PS> crc setup
PS> crc start --log-level debug
stale[bot] commented 3 years 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.