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

port forwarding issue #39

Closed
viris opened this issue Jan 4, 2018 · 3 comments
Closed

port forwarding issue #39

viris opened this issue Jan 4, 2018 · 3 comments

Comments

@viris
Copy link

viris commented Jan 4, 2018

  • Operating System Version: Win 10
  • Provider (VirtualBox/VMWare): VirtualBox
  • Vagrant Version: 2.0.1
  • Packer Version: 1.1.3
  • Is the issue reproducible or intermittent? yes

Description of the issue:

When doing vagrant up, it stops with this error. Any help appreciated

==> dc: Setting the name of the VM: Vagrant_dc_1515109207844_92456
==> dc: Fixed port collision for 22 => 2222. Now on port 2200.
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 8000 is already in use
on the host machine.

To fix this, modify your current project's Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port:

config.vm.network :forwarded_port, guest: 8000, host: 1234

@MHaggis
Copy link
Contributor

MHaggis commented Jan 5, 2018

Hi @viris , I ran into the same issue.
Each host (all 3 that are built) will prompt this.
What worked for me was:
Edit the Vagrantfile
Change the host port on lines 8 and 9:
config.vm.network :forwarded_port, guest: 8000, host: 9431
config.vm.network :forwarded_port, guest: 8412, host: 2393

You will be prompted for WEF and Win10 during the build. Perform the same function and done.

My environment is working 100%. I sadly do not know enough about Vagrant to offer a better solution.

@randolpht
Copy link

I adjusted lines 8-9 but still run into the same issues with any host port that I put. Any other suggestions?

@clong
Copy link
Owner

clong commented Jan 16, 2018

Port forwarding seems to be a re-occurring issue with Vagrant, and I've never been able to get to the bottom of why it consistently has issues with it for both Virtualbox and VMware. For that reason, I've removed all port forwarding from the Vagrantfile in the latest commit: f0cc38f

Ususally I'm able to fix the issue by doing a vagrant reload <hostname>, but not always.

More on this here: hashicorp/vagrant#8130 (comment)

I'm going to go ahead and close this issue since port forwarding is no longer part of the Vagrantfile - thank you for the report!

@clong clong closed this as completed Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants