Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Getting Past Vagrant's ''Authentication Failure'' When Starting OpenShift Origin

DZone's Guide to

Getting Past Vagrant's ''Authentication Failure'' When Starting OpenShift Origin

Using Vagrant to provision VMs and want to use Red Hat's OpenShift Origin image? Well, if you're using an older version of Vagrant, you might run into a problem. Here's the answer.

· Cloud Zone
Free Resource

Site24x7 - Full stack It Infrastructure Monitoring from the cloud. Sign up for free trial.

For getting up and running quickly with OpenShift Origin, Red Hat has an all-in-one VM image you can provision with Vagrant. The instructions mention to not use Vagrant 1.8.5 as there’s an issue with the SSH setup. Well, because I already had 1.8.5 installed for some other projects, I tried anyway, and ran into issues with SSHing into the VM with SSH keys.

When provisioning the VM, you’ll see:

Kevins-MacBook-Pro:openshift-origin kev$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'openshift/origin-all-in-one' is up to date...
==> default: Resuming suspended VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...

There are a number of posts discussing this issue and a few workarounds, for example, here and here.

The suggestions relate to switching from the SSH authentication to userid/password by adding this to your Vagrantfile:

config.ssh.username = "vagrant"
config.ssh.password = "vagrant"

I tried this, and when running vagrant up, I had different errors saying to the effect of, “SSH authentication failed.” Next, I tried adding this recommendation: 

config.ssh.insert_key = false

This didn’t make any difference initially, but doing a Vagrant destroy, and then trying to bring it up again initially ran into the same issue. So, I Ctrl-C’d out and tried again, and then it worked the second time. I’m not sure what steps got past the SSH keys issue, but at this point, I was up and running. There’s a long discussion in both the linked threads above that describe the cause of the issue, so if you’re interested, take a look through those threads.

Site24x7 - Full stack It Infrastructure Monitoring from the cloud. Sign up for free trial.

Topics:
cloud ,vagrant ,openshift origin ,authentication

Published at DZone with permission of Kevin Hooke, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}