skip to Main Content

I try to create a Vagrant Box (virtualbox) with Packer into Windows 11 OS.
I use a script which run correctly in the past but I don’t know why this time I have SSH issue that cause impossible building.

During the building packer I have this error message :
2022/05/30 10:23:51 packer.exe plugin: [DEBUG] TCP connection to SSH ip/port failed: dial tcp 127.0.0.1:2619: connectex: No connection could be made because the target machine actively refused it.

This TCP port number (2619) is random day by day.
In this example I try to know what application use this port number with those commands :

netstat -an | grep '2619'
netstat -ab | grep '2619' 
netstat -aon | grep '2619'

But nothing appear

I use the CurrPorts application to view all TCP/UDP ports in my system. And also I can’t view anything about this port number 2619. But I can see warning on packer.exe line like this :

enter image description here

Actually, I use also Docker in my system (not in the same time). But I don’t know how parameter port into this.

Why TCP local and remote port does not corresponding to the port number error into packer (2619) ?
Why this port number not appear into netstat commands ?

I understand that connection is forbidden (but access ok) but I don’t know why and how authorize this…

Here my config docker desktop :

enter image description here

enter image description here

enter image description here

How authorize or manage ports for using docker and packer in the same OS (not at the same time) ?

  • No Docker Desktop launched
  • disabled firewall Windows
  • try with uninstalled docker desktop

I don’t know if this message into linux build server dealing with this issue but :

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    After testing lot of thing, the unique problem is :

    Microsoft Windows 11 update (KB5012592)

    For resolving that you need to :

    stop using Hyper-V component windows (I never do something other. It's just this in my context)

    More info here :


  2. Docker does not create it’s own port, it must be a given with the -p command.
    Like, docker run -d -p 8080:80 –
    Map TCP port 80 in the container to port 8080 on the Docker host.

    About the netstat -aon | grep ‘2619.
    I am pretty sure that windows are using findstr command and not grep.
    After using findstr you should get a PID of the process which you can use taskkill

    See more here :
    https://stackoverflow.com/a/39633428/10814912

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search