vagrant icon indicating copy to clipboard operation
vagrant copied to clipboard

Vagrant VMWare connection error

Open suikast42 opened this issue 2 years ago • 7 comments

If I try a vagrant up or destroy sometime vagrant comes back with an error like

An error was encountered while generating the current list of available VMware adapters in use on this system. Get "http://localhost:49742/api/vmnet": GET http://localhost:49742/api/vmnet giving up after 5 attempt(s): Get "http://localhost:49742/api/vmnet": dial tcp [::1]:49742: connectex: No connection could be made because the target machine actively refused it.
Please resolve any problems reported in the error message above and try again.

The second and further vagrant commands works well after the first error.

It seems so that the error comes after a while when I don't use a vagrant command. I assume that the vagrant vmware utility takes a while for the first command to connect.

Vagrant version

2.2.19

Vagrant vmware utility version

1.0.21

VMWare Workstation version

15.5.7 build-17171714

Host operating system

Windows 10 Version 21H2 Build 10944.1446

suikast42 avatar Jan 28 '22 15:01 suikast42

I'm seeing this issue on MacOS Monterey servers. Appears that the Vagrant VMWare Utility is dying and the cli programs are therefore unable to connect to service. Blocks destroy and ssh to guest. Restarting the utility (via launchctl on MacOS) resolves issue. Same vagrant and utility versions as OP but on MacOS Monterey 12.1 with MacOS guest.

nycnewman avatar Feb 03 '22 15:02 nycnewman

The commands to stop/restart the vagrant vmware utility on Mac are:

sudo launchctl unload -w /Library/LaunchDaemons/com.vagrant.vagrant-vmware-utility.plist
sudo launchctl load -w /Library/LaunchDaemons/com.vagrant.vagrant-vmware-utility.plist

In case anyone is googling and end up here

fredngo avatar Mar 08 '22 16:03 fredngo

I'd love to see this issue get resolved. I'm on Venture 13.0 and this happens fairly regularly.

gkb avatar Sep 30 '22 18:09 gkb