Closed saif-17 closed 7 years ago
This error is telling you that a directory already exists in that location. Take a look at /usr/local/maven as it already exists as a directory so Chef can't manage.
Yeah Thanks a ton!!. I actually figured that out yesterday, after posting the issue. But thanks anyways!
Glad you figured it out. Thanks for updating the issue.
Cookbook version
5.0.1
Chef-client version
13.3.42
Platform Details
Ubuntu: 14.04LTS
Scenario:
Trying to Install Maven.
Steps to Reproduce:
1) Knife site the cookbook 2) Upload the cookbook to the server 3) Configure the run-list to run Maven 4) Run the Chef-Client
Expected Result:
Maven to be installed on the given System
Actual Result:
Starting Chef Client, version 13.3.42 resolving cookbooks for run list: ["maven"] Synchronizing Cookbooks:
ark[maven] action install
link[/usr/local/maven] action create
================================================================================ Error executing action
create
on resource 'link[/usr/local/maven]'Errno::EISDIR
Is a directory @ unlink_internal - /usr/local/maven
Resource Declaration:
In /var/chef/cache/cookbooks/ark/resources/default.rb
96: link new_resource.home_dir do 97: to new_resource.path 98: end 99:
Compiled Resource:
Declared in /var/chef/cache/cookbooks/ark/resources/default.rb:96:in `block in class_from_file'
link("/usr/local/maven") do action [:create] default_guard_interpreter :default to "/usr/local/maven-3.5.0" link_type :symbolic target_file "/usr/local/maven" declared_type :link cookbook_name "maven" owner nil group nil end
System Info:
chef_version=13.3.42 platform=ubuntu platform_version=14.04 ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] program_name=chef-client worker: ppid=5016;start=14:53:02; executable=/opt/chef/bin/chef-client
================================================================================ Error executing action
install
on resource 'ark[maven]'Errno::EISDIR
link[/usr/local/maven] (/var/chef/cache/cookbooks/ark/resources/default.rb line 96) had an error: Errno::EISDIR: Is a directory @ unlink_internal - /usr/local/maven
Resource Declaration:
In /var/chef/cache/cookbooks/maven/recipes/default.rb
26: ark 'maven' do 27: version node['maven']['version'] 28: url node['maven']['url'] 29: checksum node['maven']['checksum'] 30: home_dir node['maven']['m2_home'] 31: win_install_dir node['maven']['m2_home'] 32: append_env_path node['maven']['setup_bin'] 33: end 34:
Compiled Resource:
Declared in /var/chef/cache/cookbooks/maven/recipes/default.rb:26:in `from_file'
ark("maven") do action [:install] default_guard_interpreter :default declared_type :ark cookbook_name "maven" recipe_name "default" version "3.5.0" url "http://apache.mirrors.tds.net/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz" checksum "beb91419245395bd69a4a6edad5ca3ec1a8b64e41457672dc687c173a495f034" home_dir "/usr/local/maven" win_install_dir "/usr/local/maven" append_env_path true extension "tar.gz" prefix_bin "/usr/local/bin" prefix_root "/usr/local" owner "root" path "/usr/local/maven-3.5.0" release_file "/var/chef/cache/maven-3.5.0.tar.gz" end
System Info:
chef_version=13.3.42 platform=ubuntu platform_version=14.04 ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] program_name=chef-client worker: ppid=5016;start=14:53:02; executable=/opt/chef/bin/chef-client
Running handlers: [2017-09-04T14:53:03+05:30] ERROR: Running exception handlers Running handlers complete [2017-09-04T14:53:03+05:30] ERROR: Exception handlers complete Chef Client failed. 0 resources updated in 01 seconds [2017-09-04T14:53:03+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2017-09-04T14:53:03+05:30] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2017-09-04T14:53:03+05:30] ERROR: ark[maven] (maven::default line 26) had an error: Errno::EISDIR: link[/usr/local/maven] (/var/chef/cache/cookbooks/ark/resources/default.rb line 96) had an error: Errno::EISDIR: Is a directory @ unlink_internal - /usr/local/maven [2017-09-04T14:53:03+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)