[Zoo-discuss] Length of Output filename and service completion
rakesh prithiviraj
rakeshuk at outlook.com
Wed Jul 13 00:52:30 PDT 2016
Dear Gerald,
Thanks a ton for looking into this. I reproduced the problem with your python service. It happens only in Async mode. Please note that the service is not failing. WPS server is not able to recognize the completion of the service. GetStatus always returns "Running" even though the output file is generated and the service execution is complete. As a consequence you will see files ending in "_error.log" still lying in the destination directory.
Also when I changed one line in your code to the following (i.e. reduced the file name length), i have no issues with the Async mode. outputs["Result"]["generated_file"]=conf["main"]["tmpPath"]+"S2_NDVI_USING_FTEP_B4_B8_20160629_12345"+".tif"
POST request:<wps:Execute xmlns:wps="http://www.opengis.net/wps/2.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WPS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wps/2.0.0 http://schemas.opengis.net/wps/2.0.0/wpsExecute_request.xsd" mode="async"> <ows:Identifier>HelloPy</ows:Identifier> <wps:Input id="a"> <wps:Data>example</wps:Data> </wps:Input> <wps:Output id="Result" transmission="reference"/></wps:Execute>
GetStatus:<wps:GetStatus service="WPS" version="2.0.0"xmlns:wps="http://www.opengis.net/wps/2.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.opengis.net/wps/2.0.0../wpsStatusInfo.xsd "><wps:JobID>8acfc052-48cb-11e6-86ec-005056011a8d</wps:JobID></wps:GetStatus>
ThanksRakesh
> Subject: Re: [Zoo-discuss] Length of Output filename and service completion
> From: gerald.fenoy at geolabs.fr
> Date: Wed, 13 Jul 2016 08:27:03 +0200
> CC: zoo-discuss at lists.osgeo.org
> To: rakeshuk at outlook.com
>
> Dear Rakesh,
> sorry for late reply.
>
> After some testing, I cannot reproduce the issue locally.
>
> I have the following defined in the main section of the main.cfg file:
>
> tmpPath=/tmp/
> tmpUrl = http://localhost/mpPathRelativeToServerAdress/
>
> Using the following source for the HelloPy service:
>
> import zoo
>
> def HelloPy(conf,inputs,outputs):
> outputs["Result"]["generated_file"]=conf["main"]["tmpPath"]+"S2_NDVI_USING_FTEP_B4_B8_20160629_1234567"+conf["lenv"]["usid"]+".tif"
> f=open(outputs["Result"]["generated_file"],"wb")
> f.write(bytearray(512))
> f.close()
> return zoo.SERVICE_SUCCEEDED
>
> Running Execute request never failed. You have noticed that the name is even longer than the one you used.
>
> I would like to have more details about your setup and the value you have set in outputFilename, does this last contain the tmpPath as expected ?
>
> I hope to hear back from you and we can solve this issue.
>
> Best regards,
>
> > Le 30 juin 2016 à 12:51, rakesh prithiviraj <rakeshuk at outlook.com> a écrit :
> >
> > Hi,
> >
> > I had a strange behavior of ZOO-kernel for certain processing requests. The GetStatus is always returning status as "Running" even though the processing is completed and returns with integer 3 (success) and GetResult file is generated. This does not happen always and it happens only certain times. My observation after several testing is that the length of output file name affects the behaviour of service completion.
> >
> > If the length of the output file name exceeds 44 characters (including the extension e.g. "S2_NDVI_USING_FTEP_B4_B8_20160629_1234567.tif"), then the processing never completes even though the processor return status "3" to WPS-server.
> >
> > This is how i set the output in Java at the end of processing.
> >
> > HashMap result = (HashMap) (outputs.get("Result"));
> > result.put("generated_file", outputFilename);
> >
> > In the above code, "outputFilename" points to absolute path and note that it is not the length of the absolute path that affects the behaviour but just the length of the filename.
> >
> > regards
> > Rakesh
> > _______________________________________________
> > Zoo-discuss mailing list
> > Zoo-discuss at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/zoo-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20160713/e7112ff2/attachment.html>
More information about the Zoo-discuss
mailing list