# Unarchive faild with spring boot war archive

**URL:** <https://forum.ansible.com/t/unarchive-faild-with-spring-boot-war-archive/26874>\
**Category:** Ansible Project\
**Created:** [March 1, 2018, 7:25am UTC](https://forum.ansible.com/t/unarchive-faild-with-spring-boot-war-archive/26874 "2018-03-01T07:25:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan-Philipp\_Bolle](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@Jan-Philipp\_Bolle](https://forum.ansible.com/u/Jan-Philipp_Bolle)\
**Post date:** [March 1, 2018, 7:25am UTC](https://forum.ansible.com/t/unarchive-faild-with-spring-boot-war-archive/26874/1 "2018-03-01T07:25:14Z")

</div>

Hi there

I try to unarchive several war archives. Mysteriously this fails only with war achives created by the maven spring boot plug-in (I expect this is the problem).  
All my war achives can extract with the normal zip command.

I can reproduce this behavior with an ad-hoc command

`ansible localhost -m unarchive -a "src=/home/pbolle/Downloads/webapp-2018.6-SNAPSHOT.war dest=/tmp"`

The error message looks like

`  
The full traceback is:  
File “/tmp/ansible\_jJlffO/ansible\_module\_unarchive.py”, line 141, in   
from shlex import quote

localhost | FAILED! =\> {  
“changed”: false,  
“invocation”: {  
“module\_args”: {  
“attributes”: null,  
“backup”: null,  
“content”: null,  
“creates”: null,  
“delimiter”: null,  
“dest”: “/home/pbolle/temp”,  
“directory\_mode”: null,  
“exclude”: ,  
“extra\_opts”: ,  
“follow”: false,  
“force”: null,  
“group”: null,  
“keep\_newer”: false,  
“list\_files”: false,  
“mode”: null,  
“original\_basename”: “bpa-importer-infomaterial-2018.6-SNAPSHOT.war”,  
“owner”: null,  
“regexp”: null,  
“remote\_src”: false,  
“selevel”: null,  
“serole”: null,  
“setype”: null,  
“seuser”: null,  
“src”: “/home/pbolle/.ansible/tmp/ansible-tmp-1519888716.66-277418519655037/source”,  
“unsafe\_writes”: null,  
“validate\_certs”: true  
}  
},  
“msg”: “Failed to find handler for "/home/pbolle/.ansible/tmp/ansible-tmp-1519888716.66-277418519655037/source". Make sure the required command to extract the file is installed. Command "/bin/tar" could not handle archive. Command "/usr/bin/unzip" could not handle archive.”  
}

`

Any idea how to solve the problem?  
Is it possible to debug the unarchive module?

Tank you and regards  
Philipp

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [March 1, 2018, 9:42am UTC](https://forum.ansible.com/t/unarchive-faild-with-spring-boot-war-archive/26874/2 "2018-03-01T09:42:57Z")

</div>

I suggest running a zipinfo -v on the .war file and on something else that will unarchive and see if you can isolate any differences.

Also I wonder if it is generating a 64bit zip file and perhaps your /usr/bin/unzip doesn’t like that.

I found an old ant build on one of our projects that had zip64Mode=“never” set on its zip task in order to make sure resultant zip task could also be deployed on 32 bit systems, so maybe something like that is a possibility too.

Hope this helps.

Jon

---

<div class="post-metadata">

**Author:** ![Jan-Philipp\_Bolle](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@Jan-Philipp\_Bolle](https://forum.ansible.com/u/Jan-Philipp_Bolle)\
**Post date:** [March 1, 2018, 1:40pm UTC](https://forum.ansible.com/t/unarchive-faild-with-spring-boot-war-archive/26874/3 "2018-03-01T13:40:00Z")

</div>

Hi Jon,

zipinfo was a good tip. The difference to a normal war is that a spring boot war has  
“7932 extra bytes at beginning or within zipfile”

This is the reason for crashing the unarchive module.

I found a workaround for my problem. But I wondering why the unarchive has a problem with the zip if the normal zip command has no problem.

Regards Philipp
