我在我的Vagrantfile中的所有端口上都遇到端口冲突,这似乎在一段时间内正常工作然后突然发生了一些变化并且它拒绝工作.请不要回答说“改变你的港口”
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 3100 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: 1337,host: 1234
我已经尽我所能找到了问题,但目前正在向我倾斜.
lsof -n -i4TCP:3100
没有输出
我正在使用vagrant-vmware-fusion(4.0.18)运行vagrant 1.9.2
解决方法
好吧,我想我已经破解了它.这似乎与这个问题有关
https://github.com/mitchellh/vagrant/issues/7948
vagrant-vmware-plugin没有清除融合中的nat.conf.因此,它仍然认为端口正在使用.
编辑/ Library / Preferences / VMware Fusion / vmnet8 / nat.conf并删除[incomingtcp]部分中的违规条目似乎可以解决它.
猜测它只是管理它,直到有适当的修复可用.
作为参考,这是fusion 8.5.3和vagrant-vmware-fusion 4.0.18.