file decompression error during kafka installation with chef

笑着哭i 提交于 2020-06-23 14:49:48

问题


I'm trying to install kafka using the supermarket recipe as my starting point. But when I run kitchen converge it gives me the following error. It should be something inherent in the archive. What do you think?platform kitchen ubuntu 14.04 tar version 1.27.1

execute 'kafka-install' do
    cwd node['kafka']['install_dir']
    command <<-EOH
    wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz && \
    tar -zxf kafka_2.12-2.5.0.tgz && \
    useradd -M #{node['kafka']['user']} && \
    chown #{node['kafka']['user']}:#{node['kafka']['group']} -R #{node['kafka']['install_dir']} && \
    chown +x /kafka/bin/*.sh
  EOH
end

I get the following error

Error executing action `run` on resource 'execute[kafka-install]'
       ================================================================================

       Mixlib::ShellOut::ShellCommandFailed
       ------------------------------------
       Expected process to exit with [0], but received '2'
       ---- Begin output of     wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz &&     tar -zxf kafka_2.12-2.5.0.tgz &&     useradd -M kafka &&     chown kafka:kafka -R /kafka &&     chown +x /kafka/bin/*.sh


 ----
   STDOUT:
   STDERR: --2020-06-09 18:21:40--  http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz


 tar: Skipping to next header
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Skipping to next header

       gzip: stdin: invalid compressed data--format violated
       tar: Child returned status 1
       tar: Error is not recoverable: exiting now
       ---- End output of     wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz &&     tar -zxf kafka_2.12-2.5.0.tgz &&     useradd -M kafka &&     chown kafka:kafka -R /kafka &&     chown +x /kafka/bin/*.sh
        ----
       Ran     wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz &&     tar -zxf kafka_2.12-2.5.0.tgz &&     useradd -M kafka &&     chown kafka:kafka -R /kafka &&     chown +x /kafka/bin/*.sh
        returned 2

I tried the tar command in ubuntu 18.04 and it works, tar version 1.29

来源:https://stackoverflow.com/questions/62289559/file-decompression-error-during-kafka-installation-with-chef

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!