Vagrant cannot forward the specified ports on this VM

In case of ssh port, Vagrant solves port collisions by itself:

==> ubuntu64: Fixed port collision for 22 => 2222. Now on port 2200.

However, you still can create unavoidable collision by:

  1. Creating first vagrant env (it will get port 2222 for ssh)
  2. Suspend that env (vagrant suspend)
  3. Create second vagrant env (it will again get port 2222, since it is now unused)
  4. Try bringing first environment up again by vagrant up

You will get the error message you are getting now.

The solution is to use vagrant reload, to let vagrant discard virtual machine state (which means it will shut it down the hard way – so be careful if you have any unsaved work there) and start the environment again, solving any ssh port collisions on the way by itself.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)