[Geoserver-users] Geoserver's zipped shapefile corrupted

For some reason I cannot download data from our Geoserver as a zipped shapefile. The file I get, is always only 397 bytes, and it cannot be opened. Any idea what has been gone wrong. Downloading worked well at least 5-6 months ago, and Geoserver version is still the same, old 2.3.1. We don’t update it, until we get a new server. Booting Geoserver does not help. Java version is Oracle 1.7.0_01 64-bit.

Any ideas? Which file is responsible for producing a zipped shape?

Oiva

On Wed, Oct 15, 2014 at 8:35 AM, Hakala Oiva (MTT) <oiva.hakala@anonymised.com>
wrote:

For some reason I cannot download data from our Geoserver as a zipped
shapefile. The file I get, is always only 397 bytes, and it cannot be
opened. Any idea what has been gone wrong. Downloading worked well at least
5-6 months ago, and Geoserver version is still the same, old 2.3.1. We
don't update it, until we get a new server. Booting Geoserver does not
help. Java version is Oracle 1.7.0_01 64-bit.

Any ideas? Which file is responsible for producing a zipped shape?

Here:
https://github.com/geoserver/geoserver/blob/master/src/wfs/src/main/java/org/geoserver/wfs/response/ShapeZipOutputFormat.java

About ideas, don't you get anything interesting in the GeoServer logs?

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Hi,
probably the file is an error from geoserver in xml format. Have you tried opening the file with a text editor and see if it contains the description of the error?

Regards,
Mauro

···

2014-10-15 8:35 GMT+02:00 Hakala Oiva (MTT) <oiva.hakala@anonymised.com383…>:

For some reason I cannot download data from our Geoserver as a zipped shapefile. The file I get, is always only 397 bytes, and it cannot be opened. Any idea what has been gone wrong. Downloading worked well at least 5-6 months ago, and Geoserver version is still the same, old 2.3.1. We don’t update it, until we get a new server. Booting Geoserver does not help. Java version is Oracle 1.7.0_01 64-bit.

Any ideas? Which file is responsible for producing a zipped shape?

Oiva


Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi,
probably the file is an error from geoserver in xml format. Have you tried opening the file with a text editor and see if it contains the description of the error?

Regards,
Mauro

···

Her is the content of the zip-file. Don’t understand where the “Permission denied” comes from. I was logged as an admin to Geoserver, and tried to get data from Layer preview > WFS > shapefile

Oiva

<?xml version="1.0" ?>



java.io.IOException: Permission denied
Permission denied

On Wed, Oct 15, 2014 at 10:09 AM, Hakala Oiva (MTT) <oiva.hakala@anonymised.com>
wrote:

Her is the content of the zip-file. Don't understand where the
"Permission denied" comes from. I was logged as an admin to Geoserver, and
tried to get data from Layer preview > WFS > shapefile

GeoServer needs to write the shapefile on disk before it can turn it into a
zip file, the permission issue is about that file system write, which is
evidently
not allowed.
I guess either the user running GeoServer changed, and has less privileges
than before, or the file system changed somehow.

GeoServer does these writes in the java temp directory, which is different
depending on the container
used to run GeoServer, for example in the case of Tomcat it would be
$TOMCAT_HOME/temp

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Thank you Andrea and Mauro!

Maybe our system admin has changed privileges somewhere. Our Geoserver is still running under Jetty, and what would be the right folder, where Geoserver writes the shape first? I have also geoserver installed on my own computer, but I cannot find, what would be the right folder.

Oiva

GeoServer needs to write the shapefile on disk before it can turn it into a zip file, the permission issue is about that file system write, which is evidently
not allowed.
I guess either the user running GeoServer changed, and has less privileges than before, or the file system changed somehow.

GeoServer does these writes in the java temp directory, which is different depending on the container
used to run GeoServer, for example in the case of Tomcat it would be $TOMCAT_HOME/temp

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Hi Oiva,

A thought – was the error message actually a file with a “.zip” extension?

If so I’d posit this seems like a bug – the error should be in a .xml for various reasons including so users don’t wonder why their .zip is “corrupt”.

Cheers,

Jonathan

···

From: Hakala Oiva (MTT) [mailto:oiva.hakala@anonymised.com]
Sent: Wednesday, October 15, 2014 11:56 AM
To: GeoServer Mailing List List
Subject: Re: [Geoserver-users] Geoserver’s zipped shapefile corrupted

Thank you Andrea and Mauro!

Maybe our system admin has changed privileges somewhere. Our Geoserver is still running under Jetty, and what would be the right folder, where Geoserver writes the shape first? I have also geoserver installed on my own computer, but I cannot find, what would be the right folder.

Oiva

GeoServer needs to write the shapefile on disk before it can turn it into a zip file, the permission issue is about that file system write, which is evidently

not allowed.

I guess either the user running GeoServer changed, and has less privileges than before, or the file system changed somehow.

GeoServer does these writes in the java temp directory, which is different depending on the container

used to run GeoServer, for example in the case of Tomcat it would be $TOMCAT_HOME/temp

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/NWWaa2 for more information.

==

This message has been scanned for viruses by MailControl, a service from BlackSpider Technology

Click here to report this email as spam.

Hi Oiva,

A thought – was the error message actually a file with a “.zip” extension?

If so I’d posit this seems like a bug – the error should be in a .xml for various reasons including so users don’t wonder why their .zip is “corrupt”.

Cheers,

Jonathan

···

From: Hakala Oiva (MTT) [mailto:oiva.hakala@anonymised.com]
Sent: Wednesday, October 15, 2014 11:56 AM
To: GeoServer Mailing List List
Subject: Re: [Geoserver-users] Geoserver’s zipped shapefile corrupted

Thank you Andrea and Mauro!

Maybe our system admin has changed privileges somewhere. Our Geoserver is still running under Jetty, and what would be the right folder, where Geoserver writes the shape first? I have also geoserver installed on my own computer, but I cannot find, what would be the right folder.

Oiva

GeoServer needs to write the shapefile on disk before it can turn it into a zip file, the permission issue is about that file system write, which is evidently

not allowed.

I guess either the user running GeoServer changed, and has less privileges than before, or the file system changed somehow.

GeoServer does these writes in the java temp directory, which is different depending on the container

used to run GeoServer, for example in the case of Tomcat it would be $TOMCAT_HOME/temp

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/NWWaa2 for more information.

==

This message has been scanned for viruses by MailControl, a service from BlackSpider Technology

Click here to report this email as spam.