ptwobrussell / Mining-the-Social-Web-2nd-Edition

The official online compendium for Mining the Social Web, 2nd Edition (O'Reilly, 2013)
http://bit.ly/135dHfs
Other
2.9k stars 1.49k forks source link

vagrant cannot forward the specified ports on this VM #223

Open DrWang1 opened 9 years ago

DrWang1 commented 9 years ago

Hi,

I get below error with vagrant up:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

D:\Mining-the-Social-Web-2nd-Edition>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'precise32'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: Mining-the-Social-Web-2nd-Edition_defau
lt_1410942676311_74637
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 8888 is already in use
on the host machine.

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

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

Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn't allow modifying port forwarding.

D:\Mining-the-Social-Web-2nd-Edition>

Can you help? Thanks!

ptwobrussell commented 9 years ago

The best guess I have is that you are indeed running another service on port 8888 on your host machine. What happens if you visit http://localhost:8888 in your browser?

Are you aware of any other web servers you are likely running for other projects?

jiajie999 commented 9 years ago
  1. Open Vagrantfile under repo, find below lines.
# IPython Notebook
override.vm.network :forwarded_port, host: 8888, guest: 8888
  1. Replace both 8888 to 9999
  2. Run vagrant up again Works for me :)
pakzam commented 7 years ago

Thanks jiajie999, its works!