I am trying to set up a virtual machine running a Liberty profile server with a sample application deployed following the instructions given in this link : https://developer.ibm.com/wasdev/docs/getting-started-chef-cookbooks-liberty-profile/
But instead of using vagrant, I use an EC2 instance as a virtual machine. I get the following error when I ssh and run "sudo chef-client" in the virtual machine.
Starting Chef Client, version 12.5.1
resolving cookbooks for run list: ["apt", "starter::JSPExamples"]
Synchronizing Cookbooks:
- starter (1.0.0)
- apt (2.9.2)
- application (5.0.0)
- poise-service (1.0.2)
- application_wlp (0.2.0)
- wlp (0.3.0)
- java (1.36.0)
- poise (2.4.0)
Compiling Cookbooks...
[2015-11-12T10:20:23+00:00] WARN: Chef::Mixin::LanguageIncludeRecipe is deprecated, use Chef::DSL::IncludeRecipe instead.
[2015-11-12T10:20:23+00:00] WARN: Called from: /var/chef/cache/cookbooks/application_wlp/providers/wlp_application.rb:20:in `class_from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:42:in `class_eval'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:42:in `class_from_file'
=======================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/application_wlp/resources/wlp_application.rb
=======================================================================
LoadError
---------
cannot load such file -- ApplicationCookbook
Kindly help me out.
The application cookbook recently released a new major version (5.0.0) which is not backwards compatible with the earlier releases. The tutorial you are following is out of date and needs to be updated. In the short term you can probably fix your issue by explicitly downloading the last 4.x version of the application cookbook from https://supermarket.chef.io/.
Related
I am trying to deploy a webapp in Ruby 3.0.2 and Rails 7.0.1 and I have a problem after deploying it via capistrano in a production server Ubuntu 20.04 with nginx(1.18.0) and passenger(6.0.12).
All the processes work fine but the app can not start in production. I get the passenger error page. Finding in logs I get the next error:
"Error: The application encountered the following error: You have already activated io-wait 0.1.0, but your Gemfile requires io-wait 0.2.1. Since io-wait is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports io-wait as a default gem"
I have tried to remove the gem io-wait but is a default system gem and I cannot remove it, I have upgraded the bundler to the latest (2.3.4) and the error persists. I have added the latest io-wait version (0.2.1) and got the same error.
Any help will be welcome.
I got it to work by adding
gem "io-wait", "0.1.0"
I then also had the problem with "strscan". Had to downgrade to "3.0.0".
I was able to get things going by using the following:
gem "io-wait", "0.2.0"
In my gem file I set the two offending gems to the old versions.
gem "io-wait", "0.1.0"
gem "strscan", "3.0.0"
After that, deploying and booting the app worked fine.
Ruby v3.0.2
Rails 7.0.0
I downloaded and installed Vagrant 2.0.2 on my Mac, successfully provisioned a new virtual machine, however I am not able to share it via vagrant share, due to the following error:
Vagrant failed to initialize at a very early stage:
The plugins failed to load properly. The error message given is
shown below.
uninitialized constant Rails
I tried installing Ruby on Rails, thought that vagrant might need it, still get the same error.
I tried with another plugin, the login one, and got the same error message, so it seems that the problem is related to the plugins.
Here's the list of plugins I currently have installed:
$ vagrant plugin list
login (0.1.1)
- Version Constraint: > 0
share (1.0.1)
- Version Constraint: > 0
$ vagrant -v
Vagrant 2.0.2
I encountered a similar issue after upgrading, specifically as a result of the share plugin.
vagrant login is part of Vagrant core as of 1.7.0 so you shouldn't need it installed as a plugin.
vagrant share was silently removed in 2.0.2 (see https://github.com/hashicorp/vagrant/issues/9485) but it can still be installed manually as vagrant-share.
The following commands should fix your issue:
vagrant plugin uninstall login
vagrant plugin uninstall share
vagrant plugin install vagrant-share
Also note that per docs Vagrant Share via Atlas has been deprecated and it now requires ngrok.
https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html#vagrant-share
https://www.vagrantup.com/docs/share/
I'm trying to install vagrant-hostmanager plugin on Windows 7 without internet connection.
I have downloaded gem file from rubygems.org and copied to this machine to D:\distr\Vagrant.
Then I move to this folder and run in Command Prompt with Ruby (with Administrator privilegies):
vagrant plugin install vagrant-hostmanager --entry-point vagrant-hostmanager-1.8.6.gem
And get the following error:
Installing the 'vagrant-hostmanager' plugin. This can take a few minutes...
Vagrant failed to load a configured plugin source. This can be caused
by a variety of issues including: transient connectivity issues, proxy
filtering rejecting access to a configured plugin source, or a configured
plugin source not responding correctly. Please review the error message
below to help resolve the issue:
Errno::ECONNREFUSED: No connection could be made because the target machine ac
tively refused it. - connect(2) for "api.rubygems.org" port 443 (https://api.rub
ygems.org/specs.4.8.gz)
Source: https://rubygems.org/
I put specs.4.8.gz to his folder too but it didn't help. I also put specs.4.8 to SPEC CACHE DIRECTORY and gem file to GEM PATHS defined in gem environment. It also didn't help.
Versions:
Windows Enterprise Service Pack 1 (32 bit)
vagrant_1.9.5.msi
VirtualBox-5.1.22-115126-Win.exe
rubygems 2.5.2
rubyinstaller 2.3.3 (2016-11-21 patchlevel 222) [i386-mingw32]
I also tried with another versions of vagrant and gem: vagrant_1.8.4.msi and vagrant-hostmanager-1.8.5.gem. Result is the same.
Is it possible to install vagrant plugin offline?
Thanks!
I want to configure an evirinment to take Django lessons from enter link description here
The main problem that I'm getting errors with instalation of some Ruby gems.
At first I've got an error that told that mixlib is not installed because it requires ruby 1.9.3.
So, I've changed 11th string of the postinstall.sh file like this
The version of Ruby to be installed supporting the Chef and Puppet gems
ruby_ver="1.9.3-p429"
So then I've rerun postinstall.sh script. But I've got an error
ERROR: Error installing chef:
ohai requires Ruby version >= 2.0.0.
To fix that I've installed Ruby 2.1 and set it to use by default, then installed chef.
After I've logoff, run vagrant ssh, typed the pass. The inputed ls and there weren't synced files from host machine. I've run sudo ./postinstall.sh again and got the ohai version error.
Is there any ideas how to fix it?
That example is badly out of date with the following list of problems:
Chef is now installed using an omnibus package which contains an
embedded ruby. No more mucking around with gem installs.
Vagrant now supports a chef zero provisioner, big improvement over chef-solo and will also install chef.
Old format Vagrantfile. V2 has introduced a number of incompatible changes.
That example uses Ubuntu 12.04 which is no longer supported.
The "aws" cookbook under the "cookbooks" directory has invalid metadata causing chef to fail.... In fact all the cookbooks look out of date.
==> default: [2015-04-11T20:04:06+00:00] ERROR: Cookbook loaded at path(s) [/tmp/vagrant-chef/046103d02209a201a2d21ece6c21437c/cookbooks/aws] has invalid metadata: The `name' attribute is required in cookbook metadata
Tutorial needs a substantial re-write, sorry. (If the code was in github that might encourage others to help refactor it)
Ok, I'm trying to update chef-client with vagrant omnibus and proxyconf. I figured it would pull the proxy from the proxyconf, but it doesn't look that way. Here is my plugin list:
vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-omnibus (1.4.1)
- Version Constraint: 1.4.1
vagrant-proxyconf (1.3.2)
- Version Constraint: 1.3.2
vagrant-share (1.1.0, system)
and my Vagrant file:
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.omnibus.chef_version = :latest
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "my proxy"
config.proxy.https = "my proxy"
end
When i run it with vagrant up, the machine does not have an updated chef-client. I tried using the recipe[omnibus_updater] in my run list it still fails because another recipe is failing with a compile failure (because of the older version of chef-client, what a pain in the butt). Any ideas? Other than creating a new virtual box?
Update:
Running in debug mode doesn't show any errors using :latest. Updating to 11.12.8 gives the below error
vagrant-omnibus:
* '11.12.8' is not a valid version of Chef.
Logging into the vm shows $HTTP_PROXY and $HTTPS_PROXY set properly. Running the commands on the built vm works:
chef-client -v
Chef: 10.14.2
sudo gem update chef
chef-client -v
Chef: 11.12.8
Thing 1:
:latest does not error out when it fails to grab the artifact. Switching to a named version starts to fail to find the artifact which leads me to believe that it isn't getting through the proxy.
Thing 2:
I think this is a problem with omnibus in windows. I've found this pull that may fix it? https://github.com/schisamo/vagrant-omnibus/pull/89. I think this plug-in isn't using the settings set by poxy-conf.
CURRENTLY USING THIS WORKAROUND:
Set you http proxy in the windows cmd line
SET HTTP_PROXY=http://username:password#proxy:port