WhiteBear
WhiteBear

Reputation: 33

VagrantFile config.vm.network

When my VagrantFile has

config.vm.network :forwarded_port, guest: 9000, host: 9000

I execute the vagrant up statement

enter image description here

Will be displayed.

I thought it was because the post was taken, and I execute netstat -aon , and there is no corresponding port.

If I delete the statement on config.vm.network, Vagrant can be opened normally.

Can someone help me solve it?

Upvotes: 2

Views: 618

Answers (1)

Frederic Henri
Frederic Henri

Reputation: 53713

It appears to be an issue with the new vagrant 1.9.3 (see https://github.com/mitchellh/vagrant/issues/8395)

you can fix it by adding the host_ip: "127.0.0.1" parameter for each of the "forwarded_port" network configuration.

config.vm.network :forwarded_port, guest: 9000, host: 9000, host_ip: "127.0.0.1"

Upvotes: 2

Related Questions