相关疑难解决方法(0)

如何调试"Vagrant无法转发此VM上的指定端口"消息

我正在尝试启动Vagrant实例并收到以下消息:

Vagrant cannot forward the specified ports on this VM, since they
would collide with another VirtualBox virtual machine's forwarded
ports! The forwarded port to 4567 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.forward_port 80, 1234
Run Code Online (Sandbox Code Playgroud)

我打开了VirtualBox,但此刻我没有任何运行的盒子,所以我很难过.如何确定哪个进程正在侦听4567?有没有办法列出我机器上运行的所有Vagrant盒子?

谢谢,凯文

vagrant

41
推荐指数
5
解决办法
5万
查看次数

使用相同的端口转发规则为多个VM进行端口转发

我目前有一个vagrant环境,每个VM都有一个从主机到客户端的端口转发规则设置.但是,此转发规则的问题在于,我不能同时使用类似的端口转发规则通过vagrant运行多个VM.

似乎我需要某种端口代理来处理这个问题.是否有一些已经融入vagrant/virtualbox的东西可以支持这个?

Traceback from Vagrant when I try running another VM with the same forwarding rules:
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 8000 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, …
Run Code Online (Sandbox Code Playgroud)

virtualbox vagrant

1
推荐指数
1
解决办法
2797
查看次数

标签 统计

vagrant ×2

virtualbox ×1