crc: [BUG] crc seems to conflict with Podman on Windows

General information

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

CRC version

CRC version: 2.26.0+233df0
OpenShift version: 4.13.9
Podman version: 4.4.4

CRC status

# Put `crc status --log-level debug` output here

CRC config

DEBU CRC version: 2.26.0+233df0
DEBU OpenShift version: 4.13.9
DEBU Podman version: 4.4.4
DEBU Running 'crc status'
CRC VM:          Stopped
MicroShift:      Stopped (v4.13.9)
RAM Usage:       0B of 0B
Disk Usage:      0B of 0B (Inside the CRC VM)
Cache Usage:     34.7GB
Cache Directory: C:\Users\Jeff\.crc\cache

Host Operating System


Nom de l'h鍍e:                              DESKTOP-JEFF
Nom du syst確e d'exploitation:              Microsoft Windows 11 Professionnel
Version du syst確e:                         10.0.22621 N/A build 22621
Fabricant du syst確e d'exploitation:        Microsoft Corporation
Configuration du syst確e d'exploitation:    Station de travail autonome
Type de build du syst確e d'exploitation:    Multiprocessor Free
PropriUaire enregistr・                    Jeff MAURY
Organisation enregistrF:                   
Identificateur de produit:                  00330-80819-37372-AA576
Date d'installation originale:              09/11/2022, 16:39:06
Heure de dNarrage du syst確e:              02/10/2023, 10:47:18
Fabricant du syst確e:                       LENOVO
Mod獲e du syst確e:                          20TJS2F43N
Type du syst確e:                            x64-based PC
Processeur(s):                              1 processeur(s) install・s).
                                            [01]: Intel64 Family 6 Model 165 Stepping 2 GenuineIntel ~2310 MHz
Version du BIOS:                            LENOVO N2VET29W (1.14 ), 15/03/2021
RQertoire Windows:                         C:\Windows
RQertoire syst確e:                         C:\Windows\system32
PSiphSique d'amor㌢ge:                    \Device\HarddiskVolume1
Option rHionale du syst確e:                fr;Fran㌢is (France)
Param閣res rHionaux d'entrF:              fr;Fran㌢is (France)
Fuseau horaire:                             (UTC+01:00) Bruxelles, Copenhague, Madrid, Paris
MNoire physique totale:                    32525 Mo
MNoire physique disponible:                11039 Mo
MNoire virtuelle: taille maximale:        61197 Mo
MNoire virtuelle: disponible:             28953 Mo
MNoire virtuelle: en cours d'utilisation: 32244 Mo
Emplacements des fichiers d'Dhange:        C:\pagefile.sys
Domaine:                                    WORKGROUP
Serveur d'ouverture de session:             \\DESKTOP-JEFF
Correctif(s):                               4 Corrections installFs.
                                            [01]: KB5029921
                                            [02]: KB5012170
                                            [03]: KB5030219
                                            [04]: KB5028756
Carte(s) rTeau:                            5 carte(s) rTeau installF(s).
                                            [01]: Intel(R) Wi-Fi 6 AX201 160MHz
                                                  Nom de la connexion: Wi-Fi
                                                  DHCP activ・:         Oui
                                                  Serveur DHCP:        192.168.1.254
                                                  Adresse(s) IP
                                                  [01]: 192.168.1.187
                                                  [02]: fe80::5102:6cd:7e09:85b2
                                                  [03]: 2a01:e34:ec7e:3020:8484:9c06:53b9:4b53
                                                  [04]: 2a01:e34:ec7e:3020:5116:66ca:8d7a:292a
                                            [02]: Bluetooth Device (Personal Area Network)
                                                  Nom de la connexion: Connexion rTeau Bluetooth
                                                  腎at:                Support dDonnect・
                                            [03]: Wintun Userspace Tunnel
                                                  Nom de la connexion: OpenVPN Wintun
                                                  腎at:                Support dDonnect・
                                            [04]: TAP-Windows Adapter V9
                                                  Nom de la connexion: OpenVPN TAP-Windows6
                                                  腎at:                Support dDonnect・
                                            [05]: OpenVPN Data Channel Offload
                                                  Nom de la connexion: OpenVPN Data Channel Offload
                                                  DHCP activ・:         Oui
                                                  Serveur DHCP:        255.255.255.255
                                                  Adresse(s) IP
                                                  [01]: 10.39.193.52
                                                  [02]: fe80::7c66:3db3:58ac:e5cd
                                                  [03]: fd10:39:192:1::1133
Configuration requise pour Hyper-V:         Un hyperviseur a U・dUect・ Les fonctionnalitT nDessaires ・Hyper-V ne seront pas affichFs.

Steps to reproduce

  1. crc start

Expected

crc should start

Actual

INFO Checking minimum RAM requirements
INFO Checking if running in a shell with administrator rights
INFO Checking Windows release
INFO Checking Windows edition
INFO Checking if Hyper-V is installed and operational
INFO Checking if Hyper-V service is enabled
INFO Checking if crc-users group exists
INFO Checking if current user is in crc-users and Hyper-V admins group
INFO Checking if vsock is correctly configured
INFO Checking if the daemon task powershell script is present
INFO Checking if the daemon task is installed
INFO Checking if the daemon task is running
INFO Checking admin helper service is running
INFO Downloading bundle: crc_microshift_hyperv_4.13.9_amd64...
1.45 GiB / 1.45 GiB [------------------------------------------------------------------------------] 100.00% 7.36 MiB/s
INFO Extracting bundle: crc_microshift_hyperv_4.13.9_amd64...
crc.vhdx:  4.48 GiB / 4.48 GiB [------------------------------------------------------------------------------] 100.00%
oc.exe:  114.17 MiB / 114.17 MiB [----------------------------------------------------------------------------] 100.00%
CRC requires a pull secret to download content from Red Hat.
You can copy it from the Pull Secret section of https://console.redhat.com/openshift/create/local.
? Please enter the pull secret *****************************************************************************************INFO Creating CRC VM for MicroShift 4.13.9...
INFO Generating new SSH key pair...
INFO Starting CRC VM for microshift 4.13.9...
failed to expose port 127.0.0.1:2222 -> 192.168.127.2:22: listen tcp 127.0.0.1:2222: bind: Une seule utilisation de chaque adresse de socket (protocole/adresse réseau/port) est habituellement autorisée.

Using tcpview, I noticed that gvproxy.exe (from the Podman distribution) was listening on port 2222

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.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 35 (27 by maintainers)

Most upvoted comments

@kid1412621 you mean you have a conflicting port? Can you check which other processes uses this port?

We decided at first to not add a method/config option to change this, as we want to see how often this happens; we had earlier issues that might have been caused by this but were never reported as such, as those were mostly ‘ssh connection failures’.

gvproxy, I guess it’s to do with podman user net.

Error is reported but specific message is not displayed:

image

From CLI:

image

Will check with latest version of the extension

I started a server on 2222 port on Mac and got the following result indicating a port conflict:

DEBU retry loop: attempt 74
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [/Users/gvyas/.crc/machines/crc/id_ecdsa /Users/gvyas/.crc/cache/crc_microshift_vfkit_4.13.14_amd64/id_ecdsa_crc]
DEBU SSH command results: err: ssh: handshake failed: read tcp 127.0.0.1:62268->127.0.0.1:2222: read: connection reset by peer, output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : ssh: handshake failed: read tcp 127.0.0.1:62268->127.0.0.1:2222: read: connection reset by peer
 - sleeping 1s
DEBU retry loop: attempt 75
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [/Users/gvyas/.crc/machines/crc/id_ecdsa /Users/gvyas/.crc/cache/crc_microshift_vfkit_4.13.14_amd64/id_ecdsa_crc]
DEBU SSH command results: err: ssh: handshake failed: read tcp 127.0.0.1:62270->127.0.0.1:2222: read: connection reset by peer, output:
DEBU error: Temporary error: ssh command error:
command : exit 0
err     : ssh: handshake failed: read tcp 127.0.0.1:62270->127.0.0.1:2222: read: connection reset by peer
 - sleeping 1s
DEBU RetryAfter timeout after 76 tries
DEBU Running 'sw_vers -productVersion'
DEBU Sending 'identify' to segment
Failed to connect to the CRC VM with SSH -- virtual machine might be unreachable: Temporary error: ssh command error:
command : exit 0
err     : ssh: handshake failed: read tcp 127.0.0.1:62141->127.0.0.1:2222: read: connection reset by peer

Temporary error: ssh command error:
command : exit 0
err     : ssh: handshake failed: read tcp 127.0.0.1:62143->127.0.0.1:2222: read: connection reset by peer

On Windows, I did the same thing. crc start failed with a different error but it only happened with the server running.

DEBU retry loop: attempt 3
DEBU Running SSH command: exit 0
DEBU Using ssh private keys: [C:\Users\gvyas\.crc\machines\crc\id_ecdsa C:\Users\gvyas\.crc\cache\crc_hyperv_4.14.3_amd64\id_ecdsa_crc]
DEBU SSH command results: err: <nil>, output:
INFO CRC VM is running
DEBU Using root access: disable core user password
DEBU Running SSH command: sudo passwd --lock core
DEBU SSH command results: err: <nil>, output: Locking password for user core.
passwd: Success
DEBU Running SSH command: cat /home/core/.ssh/authorized_keys
DEBU SSH command results: err: Process exited with status 1, output:
INFO Updating authorized keys...
DEBU Creating /home/core/.ssh/authorized_keys with permissions 0644 in the CRC VM
DEBU Running SSH command: <hidden>
DEBU SSH command succeeded
DEBU Running SSH command: rm /home/core/.ssh/authorized_keys.d/ignition
DEBU SSH command results: err: <nil>, output:
DEBU Using root access: Get device id
DEBU Running SSH command: sudo /usr/sbin/blkid -t TYPE=xfs -o device
DEBU SSH command results: err: <nil>, output: /dev/sda4
DEBU Using root access: Growing /dev/sda4 partition
DEBU Running SSH command: sudo /usr/bin/growpart /dev/sda 4
DEBU SSH command results: err: Process exited with status 1, output: NOCHANGE: partition 4 is size 63961055. it cannot be grown
DEBU No free space after /dev/sda4, nothing to do
DEBU Using root access: make root Podman socket accessible
DEBU Running SSH command: sudo chmod 777 /run/podman/ /run/podman/podman.sock
DEBU SSH command results: err: <nil>, output:
Error running post start: host file not writable, try running with elevated privileges

Perhaps this is because Podman machine recently introduced usermode networking, and they might not have considered the situation that CRC already uses these ports. /CC: @n1hility => https://github.com/containers/podman/issues/20327

https://github.com/containers/gvisor-tap-vsock/blob/2a3419da952638147a42db9d49bd74bd10d2340c/pkg/types/gvproxy_command.go#L35