You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Fernando Morgenstern <fe...@consultorpc.com> on 2010/07/09 15:21:09 UTC

Error: Invalid or unreadable WAR file : error in opening zip file

Hello,

I'm running the following version of tomcat:

Server version: Apache Tomcat/6.0-snapshot
Server built:   Nov 15 2009 11:02:53
Server number:  6.0.0.0
OS Name:        Linux
OS Version:     2.6.24-9-pve
Architecture:   i386
JVM Version:    1.6.0_12-b04
JVM Vendor:     Sun Microsystems Inc.

And i have a shared mount between 4 tomcat servers. All of them run the same OS and tomcat version.

For some reason, one of the tomcat servers stopped working and i can't start it anymore. At catalina.out, i get this error:

INFO: Deploying web application archive Box.war
mmap failed for CEN and END part of zip file
Jul 9, 2010 2:42:27 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in opening zip file


I've verified and tomcat user does have read permissions to war file. Also, i don't think this is a problem with the war file ( actually, all of them ), since other tomcat servers can deploy applications normally.

Do you know what might be causing this issue?

Best Regards,
---

Fernando Marcelo
www.consultorpc.com
fernando@consultorpc.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by Markus Schönhaber <to...@list-post.mks-mail.de>.
09.07.2010 15:38, Caldarale, Charles R:

>> From: Fernando Morgenstern [mailto:fernando@consultorpc.com]
>> Subject: Error: Invalid or unreadable WAR file : error in opening zip
>> file
>>
>> I'm running the following version of tomcat:
>>
>> Server version: Apache Tomcat/6.0-snapshot
>> Server built:   Nov 15 2009 11:02:53
>> Server number:  6.0.0.0
> 
> That is not a good version number for Tomcat, being many, many years old.

Not necessarily that old - the "Server built" seems to indicate that
it's roughly 9 month.
To me, this looks like a Tomcat built from source. IIRC the
build.properties.default does set the various version.<foo> properties
like that (version.suffix is "-dev" not "-snapshot" nowadays, though).

> That makes the rest of the report extremely suspect.

Seconded. At least it should be tested if a recent official Tomcat
binary shows the same behaviour.

-- 
Regards
  mks

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Fernando Morgenstern [mailto:fernando@consultorpc.com]
> Subject: Error: Invalid or unreadable WAR file : error in opening zip
> file
> 
> I'm running the following version of tomcat:
> 
> Server version: Apache Tomcat/6.0-snapshot
> Server built:   Nov 15 2009 11:02:53
> Server number:  6.0.0.0

That is not a good version number for Tomcat, being many, many years old.  That makes the rest of the report extremely suspect.

> And i have a shared mount between 4 tomcat servers.

Shared mount of what?  You must never, never share the appBase (webapps), work, temp, or logs directories across multiple Tomcat instances.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by Rainer Jung <ra...@kippdata.de>.
On 09.07.2010 15:21, Fernando Morgenstern wrote:
> Hello,
>
> I'm running the following version of tomcat:
>
> Server version: Apache Tomcat/6.0-snapshot
> Server built:   Nov 15 2009 11:02:53
> Server number:  6.0.0.0
> OS Name:        Linux
> OS Version:     2.6.24-9-pve
> Architecture:   i386
> JVM Version:    1.6.0_12-b04
> JVM Vendor:     Sun Microsystems Inc.
>
> And i have a shared mount between 4 tomcat servers. All of them run the same OS and tomcat version.
>
> For some reason, one of the tomcat servers stopped working and i can't start it anymore. At catalina.out, i get this error:
>
> INFO: Deploying web application archive Box.war
> mmap failed for CEN and END part of zip file
> Jul 9, 2010 2:42:27 PM org.apache.catalina.core.StandardContext resourcesStart
> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in opening zip file
>
>
> I've verified and tomcat user does have read permissions to war file. Also, i don't think this is a problem with the war file ( actually, all of them ), since other tomcat servers can deploy applications normally.
>
> Do you know what might be causing this issue?

This one?

http://scarybeastsecurity.blogspot.com/2008/08/ode-to-bug-that-almost-was.html

http://bugs.sun.com/view_bug.do?bug_id=6740544

Or possibly glusterfs doesn't support mmap:

http://gluster.org/pipermail/gluster-users/2009-November/003458.html

The log message comes from JRE internal handling of zip resp. jar files 
which uses native mmap().

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mikolaj Rydzewski [mailto:miki@ceti.pl]
> Subject: Re: Error: Invalid or unreadable WAR file : error in opening
> zip file
> 
> > Once the file is fully present on the target, rename it with
> > the proper extension.
> 
> I know that, Chuck :-)

Sorry, didn't mean to imply you weren't aware of the technique.  The comment was intended for others with less experience.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
On 07/09/2010 03:45 PM, Caldarale, Charles R wrote:

> One way around that is to FTP the file with a different extension than 
> .war. Once the file is fully present on the target, rename it with the 
> proper extension.

I know that, Chuck :-) I made it once, then I used script to rsync and 
update war file properly.

-- 
Mikolaj Rydzewski<mi...@ceti.pl>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mikolaj Rydzewski [mailto:miki@ceti.pl]
> Subject: Re: Error: Invalid or unreadable WAR file : error in opening
> zip file
> 
> I used to FTP war files to server once. Doing that on local network was
> ok. But doing that to remote server caused similiar error to appear.
> Simply Tomcat discovered new war file before I finished my upload.

One way around that is to FTP the file with a different extension than .war.  Once the file is fully present on the target, rename it with the proper extension.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
On 07/09/2010 03:35 PM, Dave Cherkassky wrote:
> Just a wild guess -- whenever I've had problems with unreadable 
> WAR/JAR files, it was because they were checked into CVS as text 
> rather than binary.

Or...
I used to FTP war files to server once. Doing that on local network was 
ok. But doing that to remote server caused similiar error to appear. 
Simply Tomcat discovered new war file before I finished my upload.

-- 
Mikolaj Rydzewski<mi...@ceti.pl>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by Dave Cherkassky <dc...@djinnsoft.com>.
Fernando:

Just a wild guess -- whenever I've had problems with unreadable WAR/JAR files, it was because they were checked into CVS as text rather than binary.

So the first thing I'd do is verify the integrity of the WAR file -- did it get corrupted along the way?

Good luck...
-- 
Dave Cherkassky
   VP of Software Development
   DJiNN Software Inc.
   416.504.1354

On 09/07/2010 9:21 AM, Fernando Morgenstern wrote:
> Hello,
>
> I'm running the following version of tomcat:
>
> Server version: Apache Tomcat/6.0-snapshot
> Server built:   Nov 15 2009 11:02:53
> Server number:  6.0.0.0
> OS Name:        Linux
> OS Version:     2.6.24-9-pve
> Architecture:   i386
> JVM Version:    1.6.0_12-b04
> JVM Vendor:     Sun Microsystems Inc.
>
> And i have a shared mount between 4 tomcat servers. All of them run the same OS and tomcat version.
>
> For some reason, one of the tomcat servers stopped working and i can't start it anymore. At catalina.out, i get this error:
>
> INFO: Deploying web application archive Box.war
> mmap failed for CEN and END part of zip file
> Jul 9, 2010 2:42:27 PM org.apache.catalina.core.StandardContext resourcesStart
> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in opening zip file
>
>
> I've verified and tomcat user does have read permissions to war file. Also, i don't think this is a problem with the war file ( actually, all of them ), since other tomcat servers can deploy applications normally.
>
> Do you know what might be causing this issue?
>
> Best Regards,
> ---
>
> Fernando Marcelo
> www.consultorpc.com
> fernando@consultorpc.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by Tobias Crefeld <tc...@cataneo.eu>.
Am Fri, 9 Jul 2010 11:01:00 -0300
schrieb Fernando Morgenstern <fe...@consultorpc.com>:

> * Only webapps folder is shared between servers using glusterfs.

I don't think that it is a good idea if you put your webapps-directory
on a shared storage - especially if you use "funny things" like
setgid-flag. Tomcat expects an exclusive access to its
Tomcat-directory-structure.

We are using Tomcat-installations for the same application as well but
we use rsync to synchronize and avoid common storage. 

-- 
Mit freundlichen Grüßen,
 Tobias Crefeld.

+49 - 89 - 2190 964-15

Cataneo GmbH
Lilienstrasse 8, D-81669 Muenchen
Tel: +49 (0) 89-2190 964-0
Fax: +49 (0) 89-2190 964-48
Web: www.cataneo.de

Geschäftsführer: Michael Wölfle, Martin Gerull

HR: München HRB 144834



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by André Warnier <aw...@ice-sa.com>.
Fernando Morgenstern wrote:
> Em 09/07/2010, às 11:05, Caldarale, Charles R escreveu:
> 
>>> From: Fernando Morgenstern [mailto:fernando@consultorpc.com]
>>> Subject: Re: Error: Invalid or unreadable WAR file : error in opening
>>> zip file
>>>
>>> * Only webapps folder is shared between servers using glusterfs.
>> That's a problem.  Multiple Tomcats may try to expand .war files simultaneously, scribbling on each other.  You need to have a separate webapps directory for each instance.
> 
> Yes, we had this problem in the past. What we did was to change server.xml in a way that only one server have unpackWARS set to true, other servers have unpackWARS set to false  ( including the one that is having  problems ).

And what about the "autoDeploy" flag ?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by Fernando Morgenstern <fe...@consultorpc.com>.
Em 09/07/2010, às 11:05, Caldarale, Charles R escreveu:

>> From: Fernando Morgenstern [mailto:fernando@consultorpc.com]
>> Subject: Re: Error: Invalid or unreadable WAR file : error in opening
>> zip file
>> 
>> * Only webapps folder is shared between servers using glusterfs.
> 
> That's a problem.  Multiple Tomcats may try to expand .war files simultaneously, scribbling on each other.  You need to have a separate webapps directory for each instance.

Yes, we had this problem in the past. What we did was to change server.xml in a way that only one server have unpackWARS set to true, other servers have unpackWARS set to false  ( including the one that is having  problems ).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Fernando Morgenstern [mailto:fernando@consultorpc.com]
> Subject: Re: Error: Invalid or unreadable WAR file : error in opening
> zip file
> 
> * Only webapps folder is shared between servers using glusterfs.

That's a problem.  Multiple Tomcats may try to expand .war files simultaneously, scribbling on each other.  You need to have a separate webapps directory for each instance.

> * Tomcat version is a bit old

But what is the version?  6.0.0 was not functional.  If you can't identify what you've got, I would certainly replace it with a known, current one.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by Fernando Morgenstern <fe...@consultorpc.com>.
Hello,

Thanks for all replies!

Let me reply to some of them:

* Only webapps folder is shared between servers using glusterfs.

* Tomcat version is a bit old but it has been working for months without any issues. So i don't think it is a case of upgrading it.

* War files does not seem to be corrupted. Otherwise other servers wouldn't be able to deploy them, right?

* I can confirm that tomcat can write to webapps and webapps/Box/, just checked these permissions.

drwxrwsrwx 5 user tomcat 4.0K Jan 21 11:05 Box
-rw-r--r-- 1 user tomcat  27M Jan 21 11:04 Box.war



Regards,
---

Fernando Marcelo


Em 09/07/2010, às 10:47, Tobias Crefeld escreveu:

> Am Fri, 9 Jul 2010 10:21:09 -0300
> schrieb Fernando Morgenstern <fe...@consultorpc.com>:
> 
>> SEVERE: Error starting static Resources
>> java.lang.IllegalArgumentException: Invalid or unreadable WAR file :
>> error in opening zip file
>> 
>> 
>> I've verified and tomcat user does have read permissions to war file.
>> Also, i don't think this is a problem with the war file ( actually,
>> all of them ), since other tomcat servers can deploy applications
>> normally.
> 
> Just guessing: Tomcat user (of this particular machine) has no write
> permission on Tomcats directory webapps/ or webapps/Box/
> 
> Regards,
> Tobias.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error: Invalid or unreadable WAR file : error in opening zip file

Posted by Tobias Crefeld <tc...@cataneo.eu>.
Am Fri, 9 Jul 2010 10:21:09 -0300
schrieb Fernando Morgenstern <fe...@consultorpc.com>:

> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Invalid or unreadable WAR file :
> error in opening zip file
> 
> 
> I've verified and tomcat user does have read permissions to war file.
> Also, i don't think this is a problem with the war file ( actually,
> all of them ), since other tomcat servers can deploy applications
> normally.

Just guessing: Tomcat user (of this particular machine) has no write
permission on Tomcats directory webapps/ or webapps/Box/

Regards,
 Tobias.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org