Ticket #147 (new defect)

Opened 4 years ago

GetStatus transient failure

Reported by: landmark Owned by:
Priority: major Milestone:
Component: Development platform Version:
Keywords: Cc: espen.messel@…

Description

The Zoo GetStatus? service may fail when there is a latency in writing result files to disk. This failure occurs momentarily, and repeated calls to GetStatus? will succeed once the service being queried has run to completion.

The following example demonstrates this. The service TestLargeOutput? runs in a loop for a certain amount of time, then copies the contents of a large file to the Result variable. The first call to GetStatus? fails, while the second call returns the final ExecuteResponse? document:

>zoo_loader.cgi "service=WPS&version=1.0.0&request=Execute&Identifier=TestLargeOutput&DataInputs=input=123&ResponseDocument=Result@asReference=true&storeExecuteResponse=true&status=true"

Content-Type: text/xml; charset=utf-8
Status: 200 OK
<?xml version="1.0" encoding="utf-8"?>
<wps:ExecuteResponse xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs
i="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_response.xsd"
 service="WPS" version="1.0.0" xml:lang="en-US" serviceInstance="http://localhost" statusLocation="http://localhost?request=Execute&amp;service=WPS&amp;version=
1.0.0&amp;Identifier=GetStatus&amp;DataInputs=sid=572ce348-b201-4c1a-ba49-d916dabb8981&amp;RawDataOutput=Result">
  <wps:Process wps:processVersion="1">
    <ows:Identifier>TestLargeOutput</ows:Identifier>
    <ows:Title>Test PHP </ows:Title>
    <ows:Abstract>This service tests PHP embedding with binary output in ZOO WPS. </ows:Abstract>
  </wps:Process>
  <wps:Status creationTime="2017-03-09T10:33:03Z">
    <wps:ProcessAccepted>The service "TestLargeOutput" was accepted by the ZOO-Kernel and is running as a background task. Please access the URL in the statusLo
cation attribute provided in this document to get the up-to-date status and results.</wps:ProcessAccepted>
  </wps:Status>
</wps:ExecuteResponse>


>zoo_loader.cgi "request=Execute&service=WPS&version=1.0.0&Identifier=GetStatus&RawDataOutput=Result&DataInputs=sid=572ce348-b201-4c1a-ba49-d916dabb8981"

Content-Type: text/xml; charset=utf-8
Status: 501 Internal Server Error
<?xml version="1.0" encoding="utf-8"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net
/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" xml:lang="en-US" version="1.1.0">
  <ows:Exception exceptionCode="InternalError">
    <ows:ExceptionText>Unable to run the Service. The message returned back by the Service was the following: ZOO GetStatus Service was unable to parse the cach
e xml file available for the Service ID 572ce348-b201-4c1a-ba49-d916dabb8981.</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>


>zoo_loader.cgi "request=Execute&service=WPS&version=1.0.0&Identifier=GetStatus&RawDataOutput=Result&DataInputs=sid=572ce348-b201-4c1a-ba49-d916dabb8981"

Content-Type: text/xml; charset=UTF-8
Status: 200 OK
<?xml version="1.0" encoding="utf-8"?>
<wps:ExecuteResponse xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs
i="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_response.xsd"
 service="WPS" version="1.0.0" xml:lang="en-US" serviceInstance="http://localhost" statusLocation="http://localhost?request=Execute&amp;service=WPS&amp;version=
1.0.0&amp;Identifier=GetStatus&amp;DataInputs=sid=572ce348-b201-4c1a-ba49-d916dabb8981&amp;RawDataOutput=Result">
  <wps:Process wps:processVersion="1">
    <ows:Identifier>TestLargeOutput</ows:Identifier>
    <ows:Title>Test PHP </ows:Title>
    <ows:Abstract>This service tests PHP embedding with binary output in ZOO WPS. </ows:Abstract>
  </wps:Process>
  <wps:Status creationTime="2017-03-09T10:34:17Z">
    <wps:ProcessSucceeded>The service "TestLargeOutput" ran successfully.</wps:ProcessSucceeded>
  </wps:Status>
  <wps:ProcessOutputs>
    <wps:Output>
      <ows:Identifier>Result</ows:Identifier>
      <ows:Title>ExecuteResponse document</ows:Title>
      <ows:Abstract>The resulting ExecuteResponse document.</ows:Abstract>
      <wps:Reference href="http://localhost/html/TestLargeOutput_Result_572ce348-b201-4c1a-ba49-d916dabb8981_0.jpg" mimeType="image/jpg"/>
    </wps:Output>
  </wps:ProcessOutputs>
</wps:ExecuteResponse>

Attachments (2)

test.php (382 bytes) - added by landmark 4 years ago.
TestLargeOutput.zcfg (909 bytes) - added by landmark 4 years ago.

Download all attachments as: .zip

Change History

Changed 4 years ago by landmark

Changed 4 years ago by landmark

Note: See TracTickets for help on using tickets.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png