Cook book error

Hi,

We are trying to copy files from chef server to chef client nodes and
having some problem. example code:

cookbook_file “/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm” do
source "oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm"
mode "0644"
end

and we receive these errors

[2013-02-07T02:06:44-06:00] ERROR:
cookbook_file[/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm]
(sqlplus::default line 11) has had an error
[2013-02-07T02:06:44-06:00] ERROR:
cookbook_file[/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm]
(/var/chef/cache/cookbooks/sqlplus/recipes/default.rb:11:in
`from_file’) had an error:
cookbook_file[/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm]
(sqlplus::default line 11) had an error:
Chef::Exceptions::FileNotFound: Cookbook ‘sqlplus’ (0.0.1) does not
contain a file at any of these locations:
files/redhat-5.3/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm
files/redhat/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm

However, we already have files there in cookbook sqlplus location :

receipe location:

03:10:59 # ls -lrt /var/chef/cookbooks/sqlplus/recipes
total 8
-rw-r–r-- 1 root root 1086 Jan 5 11:50 fifer.rb
-rw-r–r-- 1 root root 1086 Jan 5 11:50 default.rb

Location of files/default:

03:12:16 # ls -lrt /var/chef/cookbooks/sqlplus/files/default
total 46356
-rw-r–r-- 1 root root 851443 Dec 17 12:06
oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm
-rw-r–r-- 1 root root 46613626 Dec 17 12:18
oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm

Please help me figure this out.

Thanks,
Goutam

Post the debug logs and the chef-server debug logs (if you can).
Hosted Chef or private or host-your-own?

I notice that you're pasting the output of 'ls /var/chef/cookbooks'..
Can you instead show 'knife cookbook show sqlplus 0.0.1 files' so that
we might verify the cookbook manifest contains the correct
information?

Cheers,

AJ

On 13 February 2013 06:11, GOUTAM CHIRANIA goutamchiraniya@gmail.com wrote:

Hi,

We are trying to copy files from chef server to chef client nodes and
having some problem. example code:

cookbook_file "/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm" do
source "oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm"
mode "0644"
end

and we receive these errors

[2013-02-07T02:06:44-06:00] ERROR:
cookbook_file[/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm]
(sqlplus::default line 11) has had an error
[2013-02-07T02:06:44-06:00] ERROR:
cookbook_file[/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm]
(/var/chef/cache/cookbooks/sqlplus/recipes/default.rb:11:in
`from_file') had an error:
cookbook_file[/root/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm]
(sqlplus::default line 11) had an error:
Chef::Exceptions::FileNotFound: Cookbook 'sqlplus' (0.0.1) does not
contain a file at any of these locations:
files/redhat-5.3/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm
files/redhat/oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm

However, we already have files there in cookbook sqlplus location :

receipe location:

03:10:59 # ls -lrt /var/chef/cookbooks/sqlplus/recipes
total 8
-rw-r--r-- 1 root root 1086 Jan 5 11:50 fifer.rb
-rw-r--r-- 1 root root 1086 Jan 5 11:50 default.rb

Location of files/default:

03:12:16 # ls -lrt /var/chef/cookbooks/sqlplus/files/default
total 46356
-rw-r--r-- 1 root root 851443 Dec 17 12:06
oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm
-rw-r--r-- 1 root root 46613626 Dec 17 12:18
oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm

Please help me figure this out.

Thanks,
Goutam

Thanks AJ, i’ve attached server.log file and while executing your
command i see these warnings. Please let me know if you need any more
specific info on this ?

11:50:11 # knife cookbook show sqlplus 0.0.1 files
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/yaml.rb:56:in
`<top (required)>’:
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.

Regards,
Goutam

Hi AJ,

Do you have the chance to look at it ?

Thanks,
Goutam

On Wed, Feb 13, 2013 at 11:48 PM, GOUTAM CHIRANIA
goutamchiraniya@gmail.com wrote:

Thanks AJ, i've attached server.log file and while executing your
command i see these warnings. Please let me know if you need any more
specific info on this ?

11:50:11 # knife cookbook show sqlplus 0.0.1 files
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/yaml.rb:56:in
`<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.

Regards,
Goutam