libruby errors when running kitchen create

142 views
Skip to first unread message

Michael Wyatt

unread,
Feb 2, 2016, 2:45:17 PM2/2/16
to Vagrant
I've got a RHEL 7.2 machine running chefdk 0.7.0 and vagrant 1.8.1 with the vmware plugin installed.

When I do a kitchen create I get the following error:


[wyatt@oc4642434687 ei-bootcamp]$ kitchen create
-----> Starting Kitchen (v1.4.2)
-----> Creating <default-RHEL>...
       Bringing machine 'default' up with 'vmware_workstation' provider...
       ==> default: Cloning VMware VM: 'IBM.EI.RHEL.6'. This can take some time...
       ==> default: Checking if box 'IBM.EI.RHEL.6' is up to date...
       ==> default: Skipping vmnet device verification, verify_vmnet is set to false.
       ==> default: Preparing network adapters...
       ==> default: Starting the VMware VM...
       ==> default: Waiting for machine to boot. This may take a few minutes...    default: SSH address: 192.168.211.140:22
           default: SSH username: vagrant
           default: SSH auth method: private key
           default: Warning: Connection refused. Retrying...
           default: Warning: Connection refused. Retrying...
           default: 
           default: Vagrant insecure key detected. Vagrant will automatically replace
           default: this with a newly generated keypair for better security.
           default: 
           default: Inserting generated public key within guest...
           default: Removing insecure key from the guest if it's present...
           default: Key inserted! Disconnecting and reconnecting using new SSH key...
       ==> default: Machine booted and ready!
       ==> default: Forwarding ports...
           default: -- 80 => 8080
           default: -- 22 => 2222
       ruby: error while loading shared libraries: libruby.so.2.2: cannot open shared object file: No such file or directory
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider vmware_workstation ----
STDOUT: Bringing machine 'default' up with 'vmware_workstation' provider...
==> default: Cloning VMware VM: 'IBM.EI.RHEL.6'. This can take some time...
==> default: Checking if box 'IBM.EI.RHEL.6' is up to date...
==> default: Skipping vmnet device verification, verify_vmnet is set to false.
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 192.168.211.140:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection refused. Retrying...
    default: Warning: Connection refused. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Forwarding ports...
    default: -- 80 => 8080
    default: -- 22 => 2222
STDERR: ruby: error while loading shared libraries: libruby.so.2.2: cannot open shared object file: No such file or directory
---- End output of vagrant up --no-provision --provider vmware_workstation ----
Ran vagrant up --no-provision --provider vmware_workstation returned 1]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration


I had a similar issue with vagrant 1.7.4 (except the error was with libruby.so.2.0).  If I add an "export LD_LIBRARY_PATH=opt/vagrant/embedded/lib" to my profile then it works.

Any ideas what could be wrong?  When I was on RHEL 6.7 I didn't have this same issue, even with the same levels of chef and vagrant.

Thanks.

Alvaro Miranda Aguilera

unread,
Feb 3, 2016, 5:51:17 AM2/3/16
to vagra...@googlegroups.com

On Wed, Feb 3, 2016 at 8:45 AM, Michael Wyatt <mike...@gmail.com> wrote:
: libruby.so.2.2:

Hello,

What happen if you run vagrant up manually, not with test kitchen?

I am not sure if the error is coming from test kitchen that is missing ruby22 for his own run.


Assuming your host is using test kitchen, and that requires ruby 2.2, RH7 by default have Ruby 2.0

Ruby 2.2 came in software-collections, so you should install that an enable. and test.

I wonder if you can do vagrant up manually and share how it goes.

Thanks
Alvaro.

Michael Wyatt

unread,
Feb 4, 2016, 7:16:21 PM2/4/16
to Vagrant
Hello Alvaro,

Thanks for the reply.  I've tried doing vagrant init and vagrant up and vagrant init and it failed with a timeout message.  The ruby error is intermittent, it seems.  The timeouts seem to be happening much more often.

However, this time, after running vagrant init and vagrant up, I got the error on the vagrant destroy:

[wyatt@oc4642434687 ibm-cds-appserver]$ vagrant box list
IBM.EI.RHEL.6        (vmware_desktop, 0)
IBM.EI.RHEL.6        (virtualbox, 6.7.20151128)
opscode-ubuntu-14.04 (vmware_desktop, 0)
 
[wyatt@oc4642434687 ibm-cds-appserver]$ vagrant init IBM.EI.RHEL.6
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
 
[wyatt@oc4642434687 ibm-cds-appserver]$ vagrant up 
Bringing machine 'default' up with 'vmware_workstation' provider...
==> default: Cloning VMware VM: 'IBM.EI.RHEL.6'. This can take some time...
==> default: Checking if box 'IBM.EI.RHEL.6' is up to date...
==> default: Skipping vmnet device verification, verify_vmnet is set to false.
==> default: Preparing network adapters...
==> default: Fixed port collision for 22 => 2222. Now on port 2201.
==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 192.168.211.147:22
    default: SSH username: vagrant
    default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

[wyatt@oc4642434687 ibm-cds-appserver]$ vagrant destroy 5e9ff42
    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Stopping the VMware VM...
==> default: Deleting the VM...
ruby: error while loading shared libraries: libruby.so.2.2: cannot open shared object file: No such file or directory
 


Not sure what is really going on, but things don't seem to be very stable right now.

Thanks,
Michael

Alvaro Miranda Aguilera

unread,
Feb 5, 2016, 4:47:15 AM2/5/16
to vagra...@googlegroups.com, mike...@gmail.com
Hello,

Can you send an email to support at hashicorp.com ?

For the Vagrant part

Attach a verbose output.

VAGRANT_LOG=debug vagrant up 2>&1 | tee vagrant_up.log

VAGRANT_LOG=debug vagrant destroy -f 2>&1 | tee vagrant_destroy.log

The ssh not working, may be (or may be not) something in the box. Can you check if /etc/udev/rules.d/70-persistent-net.rule (or similar) doesn't exist before you create the box image?

Thanks
Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/dac9f131-554f-4d24-8174-b56a2c31e526%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Wyatt

unread,
Mar 3, 2016, 6:04:26 PM3/3/16
to Vagrant, mike...@gmail.com
Hi Alvaro,

I sent the email to the address below this evening.  I've had a busy few weeks and finally just had some time to do the debug.

Thanks for the help.
Michael
Reply all
Reply to author
Forward
0 new messages