Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X 10.8.4 + Vagrant 1.2.2 + VirtualBox 4.2.12 + private_network = Failure #1838

Closed
JasonSwindle opened this issue Jun 16, 2013 · 13 comments
Closed

Comments

@JasonSwindle
Copy link

Howdy,

I am having a very odd OS X 10.8.4 + Vagrant 1.2.2 + VirtualBox 4.2.12 issue. The first vagrant up will timeout with an SSH error. If I turn the machine off in VirtualBox, and vagrant up again….. it works. Here is my logs, and etc.

  • The Vagrantfile that is failing

https://www.dropbox.com/s/y3b2qaguld71kdi/up_log.txt

Vagrant.configure("2") do |config|

  ## Ubuntu
  config.vm.box = "raring64"
  config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box"

  ## Givng this beast more memory and CPU
  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "512"]
    vb.customize ["modifyvm", :id, "--cpus", "1"]
    vb.gui = false
  end

  ## For masterless, mount your salt file root
  config.vm.synced_folder ".", "/srv"

  config.vm.define :database do |database|
    ## Defining the FQDN that Salt will match on.
    database.vm.hostname = "dev-database-master-n001"

    ## Setting up a private network with an IP.
    database.vm.network :private_network, :ip => "22.22.22.22"
  end

  config.vm.define :web do |web|
    ## Defining the FQDN that Salt will match on.
    web.vm.hostname = "dev-web-n001"

    ## Setting up a private network with an IP.
    web.vm.network :private_network, :ip => "11.11.11.11"
  end

  config.vm.define :redis do |redis|
    ## Defining the FQDN that Salt will match on.
    redis.vm.hostname = "dev-redis-n001"

    ## Setting up a private network with an IP.
    redis.vm.network :private_network, :ip => "33.33.33.33"
  end

  ## Use all the defaults:
  config.vm.provision :salt do |salt|
    salt.run_highstate = true
    salt.verbose = true
    salt.minion_config = "salt/minion"
    salt.install_type = "git"
    salt.install_args = "v0.16.0"
  end

end

~Jason Swindle

@JasonSwindle
Copy link
Author

Howdy,

Do you guys need anything more from me to help?

@ghost
Copy link

ghost commented Jul 2, 2013

Hi JasonSwindle,
Did you ever find out what was causing this issue, I'm experiencing the same thing!

@JasonSwindle
Copy link
Author

Sadly no. Still facing this issue, and it is horribly bothersome.

-Jason
On Jul 2, 2013 12:40 AM, "Ben Cooper" [email protected] wrote:

Hi JasonSwindle,
Did you ever find out what was causing this issue, I'm experiencing the
same thing!


Reply to this email directly or view it on GitHubhttps://github.com//issues/1838#issuecomment-20327579
.

@ghost
Copy link

ghost commented Jul 2, 2013

Ok well I'll attempt to assist you by explaining what I did to fix my problem, although my problem turned out to be slightly different to yours!!

Initially my problems began after I upgraded Vagrant to v1.2.2 and VirtualBox to v4.2.14 on my Mac running OS X 10.8.4. As soon as I ran vagrant up on a box I've been using prior to the upgrade I received this error "The box ‘boxname’ could not be found.". After a little hunting around I found this (http://www.wizonesolutions.com/2013/04/18/fixing-the-box-could-not-be-found-in-the-new-vagrant-1-1/) site which helped solved this problem. My next attempt at running vagrant up worked without issue, however a little later that same day I changed VM's and had to run the vagrant up command a second time, and that's when I started receiving the problem described here (#1850). The solution suggested by ehthayer on the aforementioned page fixed this issue for me.

Ok so that's two errors down, unfortunately one to go as I found out during my next attempt at running vagrant up. This is where our two errors find common ground, I began experiencing the exact same issue as described at the end of your VAGRANT_LOG=DEBUG file ("Failed to connect to VM via SSH. Please verify the VM successfully booted by looking at the VirtualBox GUI"), although the only way I could launch my VM was either in non-headless mode (gui mode) via CLI or via VirtualBox directly. I tried EVERY SOLUTION i could find on Google, to no avail. The vagrant up command in headless mode (non-gui) would just never fully boot my VM, every time it stopped while trying to connect via SSH during the bootstrap process. Then it occurred to me it may be a permissions issue, so after running ls -al on the directory containing my .vagrant/ directory, i found all files and folders where owned by root and belonged to the wheel group. So I tried a recursive chown on the parent folder containing my .vagrant/ directory, I used my current user and group, which i found by simply running the ls -al command in my home directory (~) and my next attempt and every attempt hence forth running the vagrant up command was without issue.

What a pain!! But got there in the end. Anyways Jason, I hope in some way the information I have provided here may help you relieve your headache by solving your issue. Good luck!!

PS: Let me know how you get on!

@tgalery
Copy link

tgalery commented Jul 5, 2013

Hi Jason, we are experiencing a similar thing at work, if you do VAGRANT_LOG=INFO vagrant up you can see what is going on. It tries to ssh the box
INFO ssh: Attempting SSH. Retries: 100. Timeout: 30
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: 127.0.0.1
INFO ssh: - Port: 2222
INFO ssh: - Username: vagrant
INFO ssh: - Key Path: /Users/Thiago/.vagrant.d/insecure_private_key
but fails to succeed because the machine is not up
after a while the machine is up, but the connection is reset and that generates another probelm
INFO retryable: Retryable exception raised: #<Errno::ECONNRESET: Connection reset by peer>
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: 127.0.0.1
INFO ssh: - Port: 2222
INFO ssh: - Username: vagrant
INFO ssh: - Key Path: /Users/Thiago/.vagrant.d/insecure_private_key
INFO retryable: Retryable exception raised: #<Errno::ECONNREFUSED: Connection refused - connect(2)>
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: 127.0.0.1
INFO ssh: - Port: 2222
INFO ssh: - Username: vagrant
INFO ssh: - Key Path: /Users/Thiago/.vagrant.d/insecure_private_key
extending the vm timeout config to a higher value (i'm using 1000) @@context.ssh.timeout = 10000 under your box.rb ip config makes things workable, but anything that involves ssh is painfully slow. If you managed to fix things properly, I'd like to hear.
Cheers

@JasonSwindle
Copy link
Author

@mitchellh Have you been able to dig into this? This is a real PITA to work flow.

Thanks!

@JasonSwindle
Copy link
Author

Tested with 1.2.4, sadly still the same issue.

@andyshinn
Copy link

I think I am running into the same issue. I am using a private address and my Puppet provisioning fails the first time (since it cannot connect out to download packages). If I run vagrant provision again, it does connect out and work fine.

Same issue? Anything I can do to help test / debug?

@JasonSwindle
Copy link
Author

I just updated with a better link to my log, all 12 MBs of it.

@JasonSwindle
Copy link
Author

Here is a new update. Using Vagrantup's Ubuntu 12.04 box, I do not have this issue. I can vagrant up with no issue at all.

@mitchellh
Copy link
Contributor

Based on the logs, this is almost certainly a misconfiguration of the box. I'm not entirely sure how, but I'm guessing your udev rules might still be there or something. Your final comment here adds to the fact that this was a problem with the box.

@JasonSwindle
Copy link
Author

Howdy, thanks you for following up. Funny thing is, this is Ubuntu's box.
:|

Thanks,
Jason

On Sun, Sep 1, 2013 at 12:31 AM, Mitchell Hashimoto <
[email protected]> wrote:

Based on the logs, this is almost certainly a misconfiguration of the box.
I'm not entirely sure how, but I'm guessing your udev rules might still be
there or something. Your final comment here adds to the fact that this was
a problem with the box.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1838#issuecomment-23619231
.

@sebastian-alfers
Copy link

I changed the box to lucid32 and got the same error

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants