<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Dear Gerald,</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div> outputs["Result"]["generated_file"]=conf["main"]["tmpPath"]+"S2_NDVI_USING_FTEP_B4_B8_20160629_12345"+".tif"</div><div><br></div><div> </div><div>POST request:</div><div><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"></div><div> <ows:Identifier>HelloPy</ows:Identifier></div><div> <wps:Input id="a"></div><div> <wps:Data>example</wps:Data></div><div> </wps:Input> </div><div> <wps:Output id="Result" transmission="reference"/></div><div></wps:Execute></div><div><br></div><div><br></div><div>GetStatus:</div><div><wps:GetStatus service="WPS" version="2.0.0"</div><div>xmlns:wps="http://www.opengis.net/wps/2.0.0"</div><div>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</div><div>xsi:schemaLocation="http://www.opengis.net/wps/2.0.0</div><div>../wpsStatusInfo.xsd "></div><div><wps:JobID>8acfc052-48cb-11e6-86ec-005056011a8d</wps:JobID></div><div></wps:GetStatus></div><div><br></div><div>Thanks</div><div>Rakesh</div><br><div>> Subject: Re: [Zoo-discuss] Length of Output filename and service completion<br>> From: gerald.fenoy@geolabs.fr<br>> Date: Wed, 13 Jul 2016 08:27:03 +0200<br>> CC: zoo-discuss@lists.osgeo.org<br>> To: rakeshuk@outlook.com<br>> <br>> Dear Rakesh,<br>> sorry for late reply.<br>> <br>> After some testing, I cannot reproduce the issue locally.<br>> <br>> I have the following defined in the main section of the main.cfg file:<br>> <br>> tmpPath=/tmp/<br>> tmpUrl = http://localhost/mpPathRelativeToServerAdress/<br>> <br>> Using the following source for the HelloPy service:<br>> <br>> import zoo<br>> <br>> def HelloPy(conf,inputs,outputs):<br>> outputs["Result"]["generated_file"]=conf["main"]["tmpPath"]+"S2_NDVI_USING_FTEP_B4_B8_20160629_1234567"+conf["lenv"]["usid"]+".tif"<br>> f=open(outputs["Result"]["generated_file"],"wb")<br>> f.write(bytearray(512))<br>> f.close()<br>> return zoo.SERVICE_SUCCEEDED<br>> <br>> Running Execute request never failed. You have noticed that the name is even longer than the one you used.<br>> <br>> 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 ?<br>> <br>> I hope to hear back from you and we can solve this issue.<br>> <br>> Best regards,<br>> <br>> > Le 30 juin 2016 à 12:51, rakesh prithiviraj <rakeshuk@outlook.com> a écrit :<br>> > <br>> > Hi,<br>> > <br>> > 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. <br>> > <br>> > 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. <br>> > <br>> > This is how i set the output in Java at the end of processing.<br>> > <br>> > HashMap result = (HashMap) (outputs.get("Result"));<br>> > result.put("generated_file", outputFilename);<br>> > <br>> > 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.<br>> > <br>> > regards<br>> > Rakesh<br>> > _______________________________________________<br>> > Zoo-discuss mailing list<br>> > Zoo-discuss@lists.osgeo.org<br>> > http://lists.osgeo.org/mailman/listinfo/zoo-discuss<br>> <br></div> </div></body>
</html>