简体   繁体   English

Vagrant报告一个没有任何运行的端口冲突

[英]Vagrant reporting a port collision which has nothing running on it

I'm getting a port collision on all the ports in my Vagrantfile which seems to work fine for a time then suddenly something changes and it refuses to work. 我在我的Vagrantfile中的所有端口上都遇到端口冲突,这似乎在一段时间内正常工作然后突然发生了一些变化并且它拒绝工作。 Please no answers saying "change your port" 请不要回答说“改变你的港口”

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

I have done what i can to find the problem but it's elluding me at the moment. 我已经尽我所能找到了问题,但目前正在向我倾斜。

lsof -n -i4TCP:3100

Outputs nothing 没有输出

I'm running vagrant 1.9.2 with vagrant-vmware-fusion (4.0.18) 我正在使用vagrant-vmware-fusion(4.0.18)运行vagrant 1.9.2

Ok i think i've cracked it. 好吧,我想我已经破解了它。 It seems to be related to this issue 这似乎与这个问题有关

https://github.com/mitchellh/vagrant/issues/7948 https://github.com/mitchellh/vagrant/issues/7948

the vagrant-vmware-plugin isn't clearing out the nat.conf in fusion. vagrant-vmware-plugin没有清除融合中的nat.conf。 Therefore it still thinks that the ports are in use when they aren't. 因此,它仍然认为端口正在使用。

editing /Library/Preferences/VMware Fusion/vmnet8/nat.conf and removing the offending entries in the [incomingtcp] section appears to solve it. 编辑/ Library / Preferences / VMware Fusion / vmnet8 / nat.conf并删除[incomingtcp]部分中的违规条目似乎可以解决它。

Guess it's just about managing that until a proper fix becomes available. 猜测它只是管理它,直到有适当的修复可用。

For reference this is fusion 8.5.3 and vagrant-vmware-fusion 4.0.18. 作为参考,这是fusion 8.5.3和vagrant-vmware-fusion 4.0.18。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM