Vagrant share using wrong address
- Dominant language
- Ruby
- Stars
- 27.2k
- Forks
- 4.4k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!
### Vagrant version
1.9.5
### Host operating system
OSX Sierra
### Guest operating system
Apache (I think)
### Vagrantfile
```ruby
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# Define `web` as default
config.vm.define 'web', primary: true do |web|
# Box details
web.vm.box = 'deb/wheezy-amd64'
memory = 2048
cpus = 2
# Network
web.vm.network 'forwarded_port', guest: 80, host: 8080, auto_correct: true
web.vm.network 'forwarded_port', guest: 443, host: 4443, auto_correct: true
web.vm.network 'forwarded_port', guest: 9200, host: 9200, auto_correct: true
web.vm.network 'private_network', ip: '192.168.50.10'
web.vm.network 'public_network'
# Local sites directory
sites_directory = '~/Sites/buffalo' # Add absolute path to local sites directory here
# Synced directories
web.vm.synced_folder '.', '/vagrant'
web.vm.synced_folder sites_directory, '/vagrant-nfs', type: 'nfs'
web.bindfs.bind_folder '/vagrant-nfs', '/var/www', # Use vagrant-bindfs to re-mount directory
:owner => 'www-data',
:group => 'www-data'
# http://parallels.github.io/vagrant-parallels/docs/configuration.html
web.vm.provider 'parallels' do |v, override|
override.vm.box = 'parallels/debian-7.8'
v.memory = memory
v.cpus = cpus
end
# https://docs.vagrantup.com/v2/vmware/configuration.html
web.vm.provider 'vmware_fusion' do |v, override|
override.vm.box = 'thinktainer/debian-7.8-amd64'
v.vmx['memsize'] = memory.to_s
v.vmx['numvcpus'] = cpus.to_s
end
# https://docs.vagrantup.com/v2/virtualbox/configuration
web.vm.provider 'virtualbox' do |v|
v.memory = memory
v.cpus = cpus
end
end
# http://parallels.github.io/vagrant-parallels/docs/configuration.html
config.vm.provider 'parallels' do |v|
v.optimize_power_consumption = false
v.update_guest_tools = true
end
# Ansible provisioning
config.vm.provision 'ansible_local' do |ansible|
ansible.playbook = './ansible.yml'
ansible.groups = {'webservers' => ['web']}
# Support passing additional args to ansible, e.g. to run only certain tagged tasks
ansible.raw_arguments = ENV['ANSIBLE_ARGS']
end
end
```
So for some reason vagrant share is now using:
Local machine address: 127.0.0.1
```Russells-iMac:vagrant Russ$ vagrant share --http 80 --name 1994
==> web: Detecting network information for machine...
web: Local machine address: 127.0.0.1
web:
web: Note: With the local address (127.0.0.1), Vagrant Share can only
web: share any ports you have forwarded. Assign an IP or address to your
web: machine to expose all TCP ports. Consult the documentation
web: for your provider ('virtualbox') for more information.
web:
web: Local HTTP port: 80
web: Local HTTPS port: disabled
web: Port: 2222
web: Port: 4443
web: Port: 8080
web: Port: 2200
==> web: Checking authentication and authorization...
==> web: Creating Vagrant Share session...
web: Share will be at: 1994
==> web: Your Vagrant Share is running! Name: 1994
==> web: URL: http://1994.vagrantshare.com
==> web:
==> web: You're sharing your Vagrant machine in "restricted" mode. This
==> web: means that only the ports listed above will be accessible by
==> web: other users (either via the web URL or using vagrant connect).
```
When before it was using:
Local machine address: 192.168.50.10
```==> web: Detecting network information for machine...
web: Local machine address: 192.168.50.10
web: Local HTTP port: 80
web: Local HTTPS port: disabled
==> web: Checking authentication and authorization...
==> web: Creating Vagrant Share session...
web: Share will be at: 1994
==> web: Your Vagrant Share is running! Name: 1994
==> web: URL: http://1994.vagrantshare.com
```
Which means none of the vagrant shared sites are working. However the local versions are still working, so http://www.1994.192.168.50.10.nip.io for instance is still working, and new projects work fine. Its only vagrant share thats using the wrong address
Any ideas?
Thank-you
P.s: Sorry if this is the wrong place to ask, just saw similar questions herein
Contributor guide
Assessment
This issue has not been assessed yet.