When I executed hops__nn.sh, I encountered the two errors:
Error executing action
run
on resource ‘bash[mk-dir-/tmp]’
Error executing action
create_as_superuser
on resource ‘hops_hdfs_directory[/tmp]’
Some of the error messages are as follows :
ruby_block[wait_until_nn_started] action run
- execute the ruby block wait_until_nn_started
hops_hdfs_directory[/tmp] action create_as_superuser
bash[mk-dir-/tmp] action run
================================================================================
Error executing actionrun
on resource ‘bash[mk-dir-/tmp]’Mixlib::ShellOut::ShellCommandFailed
Expected process to exit with [0], but received ‘1’
---- Begin output of “bash” “/tmp/chef-script20210526-35426-if9my9” ----
STDOUT:
STDERR: mkdir: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
mkdir: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
chown: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
chgrp: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
chmod: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
---- End output of “bash” “/tmp/chef-script20210526-35426-if9my9” ----
Ran “bash” “/tmp/chef-script20210526-35426-if9my9” returned 1Resource Declaration:
In /tmp/chef-solo/cookbooks/hops/providers/hdfs_directory.rb
87: bash “mk-dir-#{new_resource.name}” do
88: user node[‘hops’][‘hdfs’][‘user’]
89: group node[‘hops’][‘group’]
90: retries 1
91: code <<-EOF
92: . #{node[‘hops’][‘base_dir’]}/sbin/set-env.sh
93: #{node[‘hops’][‘base_dir’]}/bin/hdfs dfs -mkdir #{recursive} #{new_resource.name}
94: if [ $? -ne 0 ] ; then
95: sleep 10
96: #{node[‘hops’][‘base_dir’]}/bin/hdfs dfs -mkdir #{recursive} #{new_resource.name}
97: fi
98: #{node[‘hops’][‘base_dir’]}/bin/hdfs dfs -chown #{new_resource.owner} #{new_resource.name}
99: #{node[‘hops’][‘base_dir’]}/bin/hdfs dfs -chgrp #{new_resource.group} #{new_resource.name}
100: if [ “#{new_resource.mode}” != “” ] ; then
101: #{node[‘hops’][‘base_dir’]}/bin/hadoop fs -chmod #{new_resource.mode} #{new_resource.name}
102: fi
103: EOF
104: not_if “su #{node[‘hops’][‘hdfs’][‘user’]} -c “. #{node[‘hops’][‘base_dir’]}/sbin/set-env.sh && #{node[‘hops’][‘base_dir’]}/bin/hdfs dfs -test -d #{new_resource.name}””
105: end
106:Compiled Resource:
Declared in /tmp/chef-solo/cookbooks/hops/providers/hdfs_directory.rb:87:in `block in class_from_file’
bash(“mk-dir-/tmp”) do
action [:run]
default_guard_interpreter :default
command nil
backup 5
interpreter “bash”
declared_type :bash
cookbook_name “hops”
user “hdfs”
group “hadoop”
code " . /srv/hops/hadoop/sbin/set-env.sh\n /srv/hops/hadoop/bin/hdfs dfs -mkdir -p /tmp\n if [ $? -ne 0 ] ; then\n sleep 10\n /srv/hops/hadoop/bin/hdfs dfs -mkdir -p /tmp\n fi\n /srv/hops/hadoop/bin/hdfs dfs -chown hdfs /tmp\n /srv/hops/hadoop/bin/hdfs dfs -chgrp hadoop /tmp\n if [ “1775” != “” ] ; then\n /srv/hops/hadoop/bin/hadoop fs -chmod 1775 /tmp\n fi\n"
domain nil
retries 1
not_if “su hdfs -c “. /srv/hops/hadoop/sbin/set-env.sh && /srv/hops/hadoop/bin/hdfs dfs -test -d /tmp””
endSystem Info:
chef_version=14.10.9
platform=centos
platform_version=7.9.2009
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
program_name=/bin/chef-solo
executable=/opt/chefdk/bin/chef-solo================================================================================
Error executing actioncreate_as_superuser
on resource ‘hops_hdfs_directory[/tmp]’Mixlib::ShellOut::ShellCommandFailed
bash[mk-dir-/tmp] (/tmp/chef-solo/cookbooks/hops/providers/hdfs_directory.rb line 87) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of “bash” “/tmp/chef-script20210526-35426-if9my9” ----
STDOUT:
STDERR: mkdir: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
mkdir: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
chown: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
chgrp: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
chmod: Could not authenticate client with CN aicore.goldwind.com.cn remote IP /10.12.3.189 and username hdfs for protocol org.apache.hadoop.hdfs.protocol.ClientProtocol
---- End output of “bash” “/tmp/chef-script20210526-35426-if9my9” ----
Ran “bash” “/tmp/chef-script20210526-35426-if9my9” returned 1Resource Declaration:
In /tmp/chef-solo/cookbooks/hops/recipes/nn.rb
178: hops_hdfs_directory d do
179: action :create_as_superuser
180: owner node[‘hops’][‘hdfs’][‘user’]
181: group node[‘hops’][‘group’]
182: mode “1775”
183: end
184: endCompiled Resource:
Declared in /tmp/chef-solo/cookbooks/hops/recipes/nn.rb:178:in `block in from_file’
hops_hdfs_directory("/tmp") do
action [:create_as_superuser]
default_guard_interpreter :default
declared_type :hops_hdfs_directory
cookbook_name “hops”
recipe_name “nn”
owner “hdfs”
group “hadoop”
mode “1775”
endSystem Info:
chef_version=14.10.9
platform=centos
platform_version=7.9.2009
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
program_name=/bin/chef-solo
executable=/opt/chefdk/bin/chef-soloservice[namenode] action enable
- enable service service[namenode]
service[namenode] action restart
- restart service service[namenode]
Has anyone ever had this problem? Any comments will be much appreciated.