i running a cookbook from github. it throws error: recipe not found but if i run other recipes from that cookbook its runs fine - chef-recipe

i took a cookbook from github and am running chef-client. it gives me the error recipe not found but if i run other recipes from that cookbook its runs fine
root#vagrant-ubuntu-trusty-64:~# chef-client
Starting Chef Client, version 12.16.42
resolving cookbooks for run list: ["task_postgis::postgre_extension"]
Synchronizing Cookbooks:
- task_postgis (0.1.0)
- database (6.1.1)
- postgresql (5.1.0)
- apt (5.0.0)
- compat_resource (12.16.2)
- build-essential (7.0.2)
- seven_zip (2.0.2)
- windows (2.1.1)
- ohai (4.2.2)
- mingw (1.2.4)
- openssl (6.0.0)
Installing Cookbook Gems:
Compiling Cookbooks...
[2016-12-05T10:04:51+00:00] WARN: Chef::Provider::AptRepository already exists! Cannot create deprecation class for LWRP provider apt_repository from cookbook apt
[2016-12-05T10:04:52+00:00] WARN: AptRepository already exists! Deprecation class overwrites Custom resource apt_repository from cookbook apt
================================================================================
Recipe Compile Error
Chef::Exceptions::RecipeNotFound
could not find recipe setup_extensions for cookbook postgresql
Cookbook Trace:
/var/chef/cache/cookbooks/task_postgis/recipes/postgre_extension.rb:1:in `from_file'
Relevant File Content:
/var/chef/cache/cookbooks/task_postgis/recipes/postgre_extension.rb:
1>> include_recipe 'postgresql::setup_extensions'
2: # install extensions to database
3: postgresql_extension "postgis" do
4: database "mydb"
5: end
6:
7: #postgresql_language "plpgsql" do
8: # database "mydb"
9: #end
10:
Platform:
x86_64-linux
Running handlers:
[2016-12-05T10:04:52+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-12-05T10:04:52+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 14 seconds
[2016-12-05T10:04:53+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-12-05T10:04:53+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-12-05T10:04:53+00:00] ERROR: could not find recipe setup_extensions for cookbook postgresql
[2016-12-05T10:04:53+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

There is no setup_extensions recipe in community postgresql cookbook. I'm not sure if there ever was such recipe. Where did you get this snippet?

Related

VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory

I am trying to install kubeadm and for this i am trying to create vagrant environment i clone this link "https://github.com/kodekloudhub/certified-kubernetes-administrator-course" to my server and then run the command "vagrant up". I take this error.I am using Ubuntu 20.04.5 LTS
==> kubemaster: Clearing any previously set network interfaces...
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 95 of file VBoxManageHostonly.cpp
i want to create vagrant environment
This problem was solved by downgrading the "VirtualBox" version. Try to install version 6.38.

Execution Chef Cookbook using chef-solo

I am trying to execute chef solo on my windows vm locally using Powershell. (I am trying to execute cookbook during provisioning customise Windows VM on cloud)
All cookbook recipe dependencies are available within the cookbook.
Create solo.rb for recipe execution & web.json to run recipe.
"type": "powershell",
"inline": "chef-client --chef-license=accept -z -o cookbooks\\cookbook_workstation"
Error:
WARN: Failed to read the private key C:\chef\client.pem: #<Errno::ENOENT: No such file or directory # rb_sysopen - C:\chef\client.pem>
WARN: Error while reporting run start to Data Collector. URL: https://localhost:443/data-collector Exception: No HTTP Code -- I cannot read C:\chef\client.pem, which you told me to use to sign requests!
FATAL: NoMethodError: undefined method logger' for nil:NilClass <internal:warning>:43:in warn': warning: Chef::Compliance::Runner#logger at C:/opscode/chef/embedded/lib/ruby/2.7.0/forwardable.rb:154 forwarding to private method NilClass#logger (StructuredWarnings::BuiltInWarning)
Using chef-solo so I don't need chef server - how can I overcome client.pem WARN and logger issue. Pointers would be very helpful

Yocto Conflict between attempted installs

I have a conflict between a number of install files.
I am getting the below error:
Transaction Summary
================================================================================
Install 612 Packages
Total size: 110 M Installed size: 403 M Downloading Packages: Running
transaction check Transaction check succeeded. Running transaction
test Error: Transaction check error: file /etc/iproute2/rt_protos
conflicts between attempted installs of
base-files-3.0.14-r89.nexbox_a95x_s905x and iproute2-4.14.1-r0.aarch64
file /etc/iproute2/rt_tables conflicts between attempted installs of
base-files-3.0.14-r89.nexbox_a95x_s905x and iproute2-4.14.1-r0.aarch64
file /etc/sysctl.conf conflicts between attempted installs of
base-files-3.0.14-r89.nexbox_a95x_s905x and procps-3.3.12-r0.aarch64
Error Summary
-------------
ERROR: amlogic-image-headless-sd-1.0-r0 do_rootfs: Function failed:
do_rootfs ERROR: Logfile of failure stored in:
/home/user/amlogic-bsp/build/tmp/work/nexbox_a95x_s905x-poky-linux/amlogic-image-headless-sd/1.0-r0/temp/log.do_rootfs.29264
ERROR: Task
(/home/user/amlogic-bsp/meta-meson/recipes-core/images/amlogic-image-headless-sd.bb:do_rootfs)
failed with exit code '1' NOTE: Tasks Summary: Attempted 3131 tasks of
which 3130 didn't need to be rerun and 1 failed.
I have seen somewhere that I should pin a file, but how do I do this? I can't find a tutorial or any reference to what that means.
I am also getting the below warning. Is this related?
WARNING: Layer meson should set LAYERSERIES_COMPAT_meson in its
conf/layer.conf file to list the core layer names it is compatible
with.
I'm new to OE coming over from OpenWRT.
For bitbake, I've added the layers for the packages below:
meta-openwrt:- OE/Yocto metadata layer for OpenWRT
superna9999/meta-meson:- Upstream Linux Amlogic Meson Yocto/OpenEmbedded Layer
And tried compiling the nexbox-a95x-s905x image
I think the problem is that /etc/iproute2/rt_protos is provided by base-files which is coming from meta-openwrt as well as from iproute2 package which is coming from other OE layers. its not clear for the image builder which one to use and hence the conflict
You can solve it via defining a iproute2_%.bbappend file in meta-openwrt where this file gets deleted from iproute2 package and preference is given to the one openwrt provides
do_install_append() {
rm -rf ${D}${sysconfdir}/iproute2/rt_protos
}
should help.

Could not find rake-12.3.0 in any of the sources (Bundler::GemNotFound) - Bitnami Redmine Stack 3.3.1-0 on Ubuntu 16.04.2 LTS

I am using the Bitnami Redmine Stack 3.3.1-0 on Ubuntu 16.04.2 LTS.
I recently installed a plugin (Issue Templates - http://www.redmine.org/plugins/redmine_issue_templates).
In the process, I updated the gems using bundle install and bundle update.
After performing this update, the Redmine website no longer works. I get the error:
"We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly."
Upon analyzing the apache error log, I find the error:
"Could not find rake-12.3.0 in any of the sources (Bundler::GemNotFound)"
However, I have checked /opt/bitnami/apps/redmine/htdocs/vendor/ and /opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems and rake-12.3.0 is included in both locations. I am not sure why this issue is occuring.
I uninstalled the plugin and removed the files, but I still have the issue. I tried bundle install, bundle update, gem install rake -v '12.3.0', bundle exec rake rails:update:bin in the /opt/bitnami/apps/redmine/htdocs/ folder, and I also tried ./gem update in the /opt/bitnami/ruby/bin folder, but I still have the issue.
Please advise me what to do.
[ 2018-03-15 15:35:23.8349 28957/7f4ce96ec700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 4-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 35671c4a. Please see earlier logs for details about the error.
App 4445 stdout:
App 4445 stderr: /opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/config/system_metrics_command.rb:34: warning: Insecure world writable dir /opt/bitnami/ruby/bin in PATH, mode 040757
App 4445 stdout:
[ 2018-03-15 15:35:29.9175 28957/7f4ce86a9700 App/Implementation.cpp:287 ]: Could not spawn process for application /opt/bitnami/apps/redmine/htdocs/: An error occured while starting up the preloader.
Error ID: 16a39427
Error details saved to: /tmp/passenger-error.3ZEVOb
Message from application: <p>It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:</p>
<pre class="commands">bundle install</pre>
<p>If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. Please check the following:</p>
<ol>
<li>Is this app supposed to be run as the <code>daemon</code> user?</li>
<li>Is this app being run on the correct Ruby interpreter? Below you will
see which Ruby interpreter Phusion Passenger attempted to use.</li>
</ol>
<p>-------- The exception is as follows: -------</p>
Could not find rake-12.3.0 in any of the sources (Bundler::GemNotFound)
<pre> /opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/spec_set.rb:88:in `block in materialize'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/spec_set.rb:82:in `map!'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/spec_set.rb:82:in `materialize'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/definition.rb:170:in `specs'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/definition.rb:237:in `specs_for'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/definition.rb:226:in `requested_specs'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:108:in `block in definition_method'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:20:in `setup'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler.rb:107:in `setup'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/setup.rb:20:in `<top (required)>'
/opt/bitnami/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
/opt/bitnami/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/opt/bitnami/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:278:in `block in run_load_path_setup_code'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:381:in `running_bundler'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:276:in `run_load_path_setup_code'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:99:in `preload_app'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:157:in `<module:App>'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:28:in `<main>'</pre>
[ 2018-03-15 15:35:29.9342 28957/7f4ceaeef700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 1-2] Cannot checkout session because a spawning error occurred. The identifier of the error is 16a39427. Please see earlier logs for details about the error.
Did you load the Bitnami environment before running the "bundle" commands? There's a script at /opt/bitnami/ called "use_redmine". Please run it before running the commands.
For instance:
/opt/bitnami/use_redmine
cd /opt/bitnami/apps/redmine/htdocs/
bundle ...
Note: if you installed the Redmine Stack as superuser "root" on your Ubuntu, you need to load the environment using sudo /opt/bitnami/use_redmine

Chef recipes not working for Orion

Testing Orion Context Broker GE in FIWARE Labs, using a new blueprint template with just orion 0.9.1 software in the tier (tested in centos and ubuntu), it does not work.
After launching a new template instance and entering into the virtual machine:
[root#orion63-orion1-1-005760 ~]# cat /etc/redhat-release
CentOS release 6.3 (Final)
[root#orion63-orion1-1-005760 ~]# chef-client
Starting Chef Client, version 11.14.6
resolving cookbooks for run list: ["orion-dbcluster::0.8.1_install"]
Synchronizing Cookbooks:
- apt
- yum
- orion-dbcluster
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /var/cache/chef/cookbooks/orion-dbcluster/recipes/0.8.1_install.rb
================================================================================
NoMethodError
-------------
undefined method `[]' for nil:NilClass
Cookbook Trace:
---------------
/var/cache/chef/cookbooks/orion-dbcluster/recipes/0.8.1_install.rb:10:in `from_file'
Relevant File Content:
----------------------
/var/cache/chef/cookbooks/orion-dbcluster/recipes/0.8.1_install.rb:
3: package node[:oriondbcluster][:package_name] do
4: version "0.8.1-dev"
5: action :install
6: end
7:
8: shardnode = search(
9: :node,
10>> "mongodb_cluster_name:#{node['mongodb']['cluster_name']} AND \
11: recipes:mongodbshard\\:\\:2.2.3_install AND \
12: chef_environment:#{node.chef_environment}"
13: )
14:
15:
16: # context init
17: template "/opt/contextini.sh" do
18: action :create
19: source "contextbroker.init.erb"
Running handlers:
Running handlers complete
Chef Client failed. 0 resources updated in 4.055387918 seconds
Yes. It was an old version. If you want to use the newer version, you should create again the blueprint template with the new orion version. In addition, you can try to execute chef-client in your VM. The older versions should be linked now to the newer ones, to avoid this kind of errors. Sorry for any incovenience