Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant is blocking ports it doesn't need #95

Open
fasmat opened this issue Jan 17, 2022 · 2 comments
Open

Vagrant is blocking ports it doesn't need #95

fasmat opened this issue Jan 17, 2022 · 2 comments

Comments

@fasmat
Copy link

fasmat commented Jan 17, 2022

Vagrant version

Vagrant 2.2.19 (installed via homebrew)
vagrant-vmware-utility 1.0.21 (installed via homebrew)
VMware Fusion 12.2.1 (installed via homebrew)
vagrant-vmware-desktop 3.0.1, global

Host operating system

Big Sur (11.6.2)

Guest operating system

n/a

Vagrantfile

n/a

Debug output

n/a

Expected behavior

When no VM is running vagrant should not listen on any ports.

Actual behavior

vagrant global-status:

id       name   provider       state       directory                                                   
-------------------------------------------------------------------------------------------------------
d6b997c  lin-vm vmware_desktop not running /Users/fasmat/workspace/testvm
 
The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date (use "vagrant global-status --prune" to prune invalid
entries). To interact with any of the machines, you can go to that
directory and run Vagrant, or you can use the ID directly with
Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"

sudo lsof -i -P | grep LISTEN | grep vagrant:

vagrant-v 89537           root   12u  IPv6 0x207c21b20f830ead      0t0    TCP *:3000 (LISTEN)
vagrant-v 89537           root   13u  IPv6 0x207c21b20f83084d      0t0    TCP *:5432 (LISTEN)
vagrant-v 89537           root   14u  IPv6 0x207c21b22311fead      0t0    TCP *:2222 (LISTEN)
vagrant-v 89537           root   15u  IPv4 0x207c21b21b3da19d      0t0    TCP localhost:9922 (LISTEN)

Steps to reproduce

  1. Create a vagrant VM that has port forwarding defined.
  2. Start then stop the VM
  3. Ports will now be blocked, even if you kill vagrant-vmware-utility
@fasmat
Copy link
Author

fasmat commented Jan 17, 2022

A workaround I found was to delete nat.json and portforwarding.json in /opt/vagrant-vmware-desktop/settings/ and then killing vagrant-vmware-utility.

@kaitlincart kaitlincart transferred this issue from hashicorp/vagrant Jul 14, 2023
@ghost
Copy link

ghost commented Jun 30, 2024

Been having the same issue, even when rebooting my mac vagrant is still shown as hogging those ports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants