hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.27k stars 4.43k forks source link

Issue with vagrant up A JSON text must at least contain two octets! (JSON::ParserError) #8590

Closed bartwalczak1 closed 5 years ago

bartwalczak1 commented 7 years ago

Vagrant version

Run vagrant -v to show the version. If you are not running the latest version of Vagrant, please upgrade before submitting an issue. 1.9.5

Host operating system

This is the operating system that you run locally. Fedora 25

Guest operating system

This is the operating system you run in the virtual machine. centos 6

Already tried reinstalling vagrant, removing .vagrant.d

/opt/vagrant/embedded/lib/ruby/2.2.0/json/common.rb:155:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
    from /opt/vagrant/embedded/lib/ruby/2.2.0/json/common.rb:155:in `new'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/json/common.rb:155:in `parse'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/mixin_synced_folders.rb:236:in `cached_synced_folders'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/mixin_synced_folders.rb:111:in `synced_folders'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/provisioners/chef/provisioner/chef_solo.rb:39:in `configure'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/provision.rb:76:in `block in call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/provision.rb:75:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/provision.rb:75:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/providers/virtualbox/action/set_name.rb:19:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/box_check_outdated.rb:31:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:225:in `action_raw'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:200:in `block in action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/environment.rb:567:in `lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:186:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine.rb:186:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

Gem list

activesupport (5.0.3, 4.2.3)
addressable (2.5.1)
artifactory (2.8.1)
ast (2.3.0)
astrolabe (1.3.1)
aws-sdk (2.9.18)
aws-sdk-core (2.9.18)
aws-sdk-resources (2.9.18)
aws-sigv4 (1.0.0)
axiom-types (0.1.1)
berkshelf (5.6.5)
berkshelf-api-client (3.0.0)
bigdecimal (default: 1.2.8)
buff-config (2.0.0)
buff-extensions (2.0.0)
buff-ignore (1.2.0)
buff-ruby_engine (1.0.0, 0.1.0)
buff-shell_out (1.1.0)
builder (3.2.3)
bundle (0.0.1)
bundler (1.14.6)
bundler-unload (1.0.2)
celluloid (0.16.0)
celluloid-io (0.16.2)
chef (12.19.36)
chef-config (13.0.118, 12.19.36)
chef-zero (13.0.0)
chefspec (7.1.0)
cleanroom (1.0.0)
coderay (1.1.1)
coercible (1.0.0)
colorize (0.8.1)
concurrent-ruby (1.0.5)
dep-selector-libgecode (1.3.1)
dep_selector (1.0.3)
descendants_tracker (0.0.4)
did_you_mean (1.0.0)
diff-lcs (1.3)
docile (1.1.5)
droplet_kit (1.4.3)
equalizer (0.0.11)
erubis (2.7.0)
excon (0.55.0)
executable-hooks (1.3.2)
faraday (0.9.2)
fauxhai (4.1.0)
ffi (1.9.18)
ffi-yajl (2.3.0)
fuzzyurl (0.9.0)
gem-wrappers (1.2.7)
git (1.3.0)
hashie (3.5.5)
highline (1.7.8)
hitimes (1.2.4)
httpclient (2.8.3)
i18n (0.8.1)
ice_nine (0.11.2)
iniparse (1.4.2)
io-console (default: 0.4.5)
ipaddress (0.8.3)
iso8601 (0.9.1)
jmespath (1.3.1)
json (2.1.0, default: 1.8.3)
kartograph (0.2.4)
kitchen-digitalocean (0.9.5)
kitchen-ec2 (1.3.2)
kitchen-vagrant (1.1.0)
knife-playground (0.2.2)
libyajl2 (1.2.0)
method_source (0.8.2)
mime-types (1.25.1)
minitar (0.6.1)
minitest (5.10.2, 5.8.5)
mixlib-archive (0.4.1)
mixlib-authentication (1.4.1)
mixlib-cli (1.7.0)
mixlib-config (2.2.4)
mixlib-install (2.1.12)
mixlib-log (1.7.1)
mixlib-shellout (2.2.7)
mixlib-versioning (1.1.0)
molinillo (0.5.7)
multi_json (1.12.1)
multipart-post (2.0.0)
net-http-persistent (2.9.4)
net-scp (1.2.1)
net-sftp (2.1.2)
net-ssh (4.1.0)
net-ssh-gateway (2.0.0, 1.3.0)
net-ssh-multi (1.2.1)
net-telnet (0.1.1)
nio4r (2.0.0)
octokit (4.7.0)
ohai (13.1.0, 8.24.0)
parser (2.4.0.0)
plist (3.3.0)
power_assert (0.2.6)
powerpack (0.1.1)
proxifier (1.0.3)
pry (0.10.4)
psych (default: 2.1.0)
public_suffix (2.0.5)
rack (2.0.3, 1.6.4)
rainbow (2.2.2)
rake (12.0.0, 10.4.2)
rdoc (default: 4.2.1)
resource_kit (0.1.6)
rest-client (1.6.7)
retryable (2.0.4)
ridley (5.1.0)
rspec (3.6.0, 2.99.0)
rspec-core (3.6.0, 2.99.2)
rspec-expectations (3.6.0, 2.99.2)
rspec-its (1.2.0)
rspec-mocks (3.6.0, 2.99.4)
rspec-support (3.6.0)
rspec_junit_formatter (0.2.3)
rubocop (0.48.1)
ruby-progressbar (1.8.1)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
safe_yaml (1.0.4)
sawyer (0.8.1)
semverse (2.0.0)
serverspec (2.38.1)
sfl (2.3)
simplecov-html (0.9.0)
slop (3.6.0)
solve (3.1.0)
specinfra (2.67.10)
syslog-logger (1.6.8)
systemu (2.6.5)
test-kitchen (1.16.0)
test-unit (3.1.5)
thor (0.19.1)
thread_safe (0.3.6)
timers (4.0.4)
tzinfo (1.2.3)
unicode-display_width (1.2.1)
uuidtools (2.1.5)
vagrant-omnibus (1.5.0)
varia_model (0.6.0)
virtus (1.0.5)
wmi-lite (1.0.0)
yajl-ruby (1.3.0)

Ruby version

ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-linux]

chrisroberts commented 7 years ago

Hi there. Would you please provide a simple Vagrantfile that reproduces this error. Thanks!

bartwalczak1 commented 7 years ago

hiya, Here's the one I am using:

# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    # All Vagrant configuration is done here. The most common configuration
    # options are documented and commented below. For a complete reference,
    # please see the online documentation at vagrantup.com.

    # Every Vagrant virtual environment requires a box to build off of.
    # config.vm.box = "oraclelinux-6.5-x86_64"

    # box below can be used to test redhat 7.2
    # config.vm.box_url = "https://vagrant:B6G2b4EW@fridge.lab.mad-me.com/artifactory/private-artifacts/vagrant/boxes/redhat-7.2.tar"
    # config.vm.box = "redhat-7.2-4-box"

    config.vm.box               = "centos/6"

    # # Use vagrant-omnibus to install chef client
    config.omnibus.chef_version = '12.19.36'

    # set auto_update to false, if you do NOT want to check the correct
    # additions version when booting this machine
    if Vagrant.has_plugin?("vagrant-vbguest")
        config.vbguest.auto_update = true
    end

    # If true, then any SSH connections made will enable agent forwarding.
    # Default value: false
    # config.ssh.forward_agent = true

    ###
    # Define the various VM types that we are using
    ###
    config.ssh.forward_agent = true
    config.vm.define "app-server", primary: true do |app|
        app.vm.network :private_network, ip: "192.168.0.2"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "1536"]
            vb.customize ["modifyvm", :id, "--cpus", "2"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("app_server")
            # chef.log_level = "debug"
        end
    end

    config.vm.define "postgresql", autostart: false do |psql|
        psql.vm.network :private_network, ip: "192.168.0.4"
        psql.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "1024"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        psql.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("postgresql")
            chef.log_level = "info"
            # chef.json = { :apache => { :default_site_enabled => true } }
        end
    end

    config.vm.define "insights-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.5"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "512"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("insights_server")
            chef.log_level = "info"
        end
    end

    config.vm.define "war-server" do |app|
#  two networking interfaces for war-server, one "public" with HAProxy, another "private" with jboss listening to
        app.vm.network :private_network, ip: "192.168.22.6"
        app.vm.network :private_network, ip: "192.168.23.6"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "1024"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            # chef.add_recipe("madme-base")
            chef.add_role("war_server")
            # chef.add_role("tomcat_server")
            chef.json      = {
                    'haproxy' => {
                            'madme' => {
                                    'public_pools'  => ['engine-ws', 'subscriber-ws', 'campaign-web', 'tracking-web', 'operator-web'],
                                    'private_pools' => nil
                            }
                    }
            }
            chef.log_level = "info"
        end
    end

    config.vm.define "engine-server" do |app|
#  two networking interfaces for war-server, one "public" with HAProxy, another "private" with jboss listening to
        app.vm.network :private_network, ip: "192.168.0.6"
        app.vm.network :private_network, ip: "192.168.1.6"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "1024"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            # chef.add_recipe("madme-base")
            chef.add_role("engine_ws_server")
            # chef.add_role("tomcat_server")
            chef.json      = {
                    'haproxy' => {
                            'madme' => {
                                    'public_pools'  => ['engine-ws'],
                                    'private_pools' => nil
                            }
                    }
            }
            chef.log_level = "info"
        end
    end

    config.vm.define "targetting-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.7"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.ssh.guest_port = 22

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("cache_server")
            chef.add_role("targetting_server")
            chef.add_role("proxy_server")
            # chef.log_level = "debug"
        end
    end

    config.vm.define "commando-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.8"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("commando_server")
            chef.add_role("cache_server")
            # chef.log_level = "debug"
        end
    end

    config.vm.define "proxy-server" do |proxy|
        proxy.vm.network :private_network, ip: "192.168.0.9"
        proxy.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        proxy.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("public_proxy_server")
            # chef.add_recipe("madme-base")
            chef.log_level = "info"
        end
    end

    config.vm.define "messaging-server" do |proxy|
        proxy.vm.network :private_network, ip: "192.168.0.10"
        proxy.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        proxy.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("messaging_server")
            chef.log_level = "info"
        end
    end

    config.vm.define "aws-template" do |proxy|
        proxy.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "1024"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end
    end

    config.vm.define "schematron" do |proxy|
        proxy.vm.network :private_network, ip: "192.168.0.11"
        proxy.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end
        proxy.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("schema_provisioner")
            chef.add_recipe("madme-postgre-schematron::postgresql_reporting_user")
            #chef.add_recipe("madme-oracle-schematron")
            chef.json = {
                    'postgresql_host'          => '192.168.0.4',
                    'madme-postgre-schematron' => { 'dba_password' => 'mAdmePSQL1' }
            }
            # chef.log_level = "debug"
        end
    end

    config.vm.define "zabbix-agent" do |zbagent|
        zbagent.vm.network :private_network, ip: "192.168.0.12"
        zbagent.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        # ssh vagrant@192.168.0.12
        # password:  vagrant
        zbagent.ssh.forward_agent = true
        zbagent.ssh.guest_port    = 22

        zbagent.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("zabbix-agent")
            chef.log_level = "debug"
        end
    end

    config.vm.define "zabbix-server" do |proxy|
        proxy.vm.network :private_network, ip: "192.168.0.13"
        proxy.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        proxy.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("zabbix_server")
            # chef.log_level = "debug"
        end
    end

    config.vm.define "survey-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.14"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.ssh.guest_port = 22

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("survey_server")
            chef.log_level = "info"
        end
    end

    config.vm.define "web_app" do |proxy|
        proxy.vm.network :private_network, ip: "192.168.0.15"
        proxy.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        proxy.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("media_server")
            chef.json = {
                    'madme_apache2' => { 'doc_root' => '/opt/madme' }
            }
            # chef.log_level = "debug"

        end
    end

    config.vm.define "jenkins" do |proxy|
        proxy.vm.network :private_network, ip: "192.168.0.16"
        proxy.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "1024"]
            vb.customize ["modifyvm", :id, "--cpus", "2"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        proxy.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("jenkins_master")
            # chef.log_level = "debug"
        end
    end

    config.vm.define "survey_ui_server", primary: true do |app|
        app.vm.network :private_network, ip: "192.168.0.17"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "2"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("public_proxy_server")
            chef.add_role("survey_ui_server")
            # chef.log_level = "debug"
        end
    end

    config.vm.define "transcode-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.18"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.ssh.guest_port = 22

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("transcoder_server")
            # chef.log_level = "debug"
        end
    end

    config.vm.define "identity-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.19"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.ssh.guest_port = 22

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("identity_server")
            chef.log_level = "info"
        end
    end

    config.vm.define "multijdk-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.20"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "512"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.ssh.guest_port = 22

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_recipe("madme-base")
            chef.add_recipe("madme-java7")
            chef.add_recipe("madme-java8")
            # chef.log_level = "debug"
        end
    end

    config.vm.define "push-gw-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.21"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.ssh.guest_port = 22

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("push_gw_server")
            chef.add_role("public_proxy_server")
            chef.log_level = "debug"
        end
    end

    config.vm.define "tracking-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.22"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.ssh.guest_port = 22

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("tracking_server")
            chef.log_level = "info"
        end
    end

    config.vm.define "elasticsearch" do |app|
        app.vm.network :private_network, ip: "192.168.0.23"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "1024"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("elasticsearch_master")
            chef.log_level = "debug"
        end
    end

    config.vm.define "profiler-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.24"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "256"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.ssh.guest_port = 22

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("profiler_server")
            chef.log_level = "debug"
        end
    end

    config.vm.define "monitoring-server" do |app|
        app.vm.network :private_network, ip: "192.168.0.25"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "512"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.ssh.guest_port = 22

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_recipe("madme-prometheus::node_exporter")
            chef.add_role("prometheus_server")
            chef.log_level = "info"
        end
  end

    config.vm.define "madme_base" do |app|
        app.vm.network :private_network, ip: "10.1.1.35"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "1024"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path = "chef-repo/cookbooks"
            chef.roles_path = "chef-repo/roles"
            chef.data_bags_path = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
      chef.environment = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_recipe("madme-base")
            chef.log_level = "info"
        end
  end

    config.vm.define "airflow-server" do |app|
        app.vm.network :private_network, ip: "10.1.1.36"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "512"]
            vb.customize ["modifyvm", :id, "--cpus", "1"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path = "chef-repo/cookbooks"
            chef.roles_path = "chef-repo/roles"
            chef.data_bags_path = "chef-repo/data_bags"
            chef.nodes_path = "chef-repo/nodes"
            chef.environment = "local"
            # chef.add_recipe("chef-solo-search")
            chef.add_recipe("madme-base")
            chef.add_recipe("madme-role-airflow_server")
            chef.log_level = "info"
        end
    end

end
chrisroberts commented 7 years ago

@bartwalczak1 Can you reduce that down to the minimum required to reproduce the issue?

bartwalczak1 commented 7 years ago
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box               = "centos/6"
    config.omnibus.chef_version = '12.19.36'
    if Vagrant.has_plugin?("vagrant-vbguest")
        config.vbguest.auto_update = true
    end

    config.ssh.forward_agent = true
    config.vm.define "app-server", primary: true do |app|
        app.vm.network :private_network, ip: "192.168.0.2"
        app.vm.provider :virtualbox do |vb|
            vb.customize ["modifyvm", :id, "--usb", "off"]
            vb.customize ["modifyvm", :id, "--memory", "1536"]
            vb.customize ["modifyvm", :id, "--cpus", "2"]
            vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
        end

        app.vm.provision "chef_zero" do |chef|
            chef.environments_path = "chef-repo/environments"
            chef.cookbooks_path    = "chef-repo/cookbooks"
            chef.roles_path        = "chef-repo/roles"
            chef.data_bags_path    = "chef-repo/data_bags"
            chef.nodes_path              = "chef-repo/nodes"
            chef.environment       = "local"
            chef.add_recipe("chef-solo-search")
            chef.add_role("app_server")
            # chef.log_level = "debug"
        end
    end
end
chrisroberts commented 5 years ago

Hi there,

Thanks for reporting this bug. I'm sure this was a real issue when originally reported (our fault for not looking sooner!) but there have been multiple Vagrant releases since the original report. I'm going to close this issue now and request you reopen the issue if you're still experiencing this problem. I'm sorry this wasn't looked at earlier :frowning_face:

Cheers!

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.