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 up fails when mongodb is running on it's default port #1

Closed
torgeir opened this issue Sep 8, 2014 · 4 comments
Closed

vagrant up fails when mongodb is running on it's default port #1

torgeir opened this issue Sep 8, 2014 · 4 comments

Comments

@torgeir
Copy link

torgeir commented Sep 8, 2014

Not an issue, per se, but posting here in case anyone else runs into this

~/Code/docker-workshop master
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'smat/docker-workshop' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'smat/docker-workshop'
    default: URL: https://vagrantcloud.com/smat/docker-workshop
==> default: Adding box 'smat/docker-workshop' (v1.1.2) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/smat/docker-workshop/version/3/provider/virtualbox.box
==> default: Successfully added box 'smat/docker-workshop' (v1.1.2) for 'virtualbox'!
==> default: Importing base box 'smat/docker-workshop'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'smat/docker-workshop' is up to date...
==> default: Setting the name of the VM: docker-workshop_default_1410195129543_58898
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 27017 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: 27017, 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.

Solved by stopping mongodb. If you installed it with brew do launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

@torgeir torgeir closed this as completed Sep 8, 2014
@tobiasgwaaler
Copy link
Contributor

Good catch! I'll add a link to this from the instructions :)

@eivinhb
Copy link
Member

eivinhb commented Oct 30, 2014

Hva gjør jeg når å ta ned mongodb ikke er et alternativ?

@torgeir
Copy link
Author

torgeir commented Oct 30, 2014

Endrer porten den starter på, og endrer eksponert port i Vagrantfile til å være det samme

https://github.com/bekkopen/docker-workshop/blob/master/Vagrantfile

@eivinhb
Copy link
Member

eivinhb commented Oct 30, 2014

Var kanskje litt retorisk spm.
Her er et til. :) Er det kanskje en bedre løsning enn å unloade mongodb?

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

3 participants