Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-10091

Thor or ESP does not recognize failure of service deployed to eclagent

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 4.0.2
    • Fix Version/s: None
    • Component/s: ESP
    • Labels:
    • Environment:
      USLM Infrastructure

      Description

      I have some services that run on hthor that get called from thor processes using SOAPCALL. When I migrated from OSS 3.10.2 to 4.0.2, the behavior on a failure of the workunit service on hthor and its interaction with thor changed. The failed service call no longer results in the thor process failing. It just silently continues, I think working off an empty result from the service.

      My expectation is the calling workunit should fail but could be convinced that a better configuration would be for it to require an ONFAIL to do so.

      A simplified example that reproduces the issue:

      First, I’ll provide the driver code. If you change the esp_server (and doxie_wsecl_port if necessary), this should be standalone.
      I give it first because if you run this on a thor before publishing the service, you get:

      -1: System error: -1: <Error><text>HTTP error (500) in processQuery</text><soapresponse><?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&#32;xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&#32;xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&#32;xmlns:wsse=&quot;http://schem as.xmlsoap.org/ws/2002/04/secext"><soap:Body><soap:Fault><faultcode>-1</faultcode><faultstring>&#32;-1:&#32;Query&#32;hthor/TestModule.testSOAP&#32;not&#32;found </faultstring><faultactor>Esp</faultactor><detail><Exceptions xmlns="urn:hpccsystems:ecl:soap" xsi:schemaLocation="urn:hpccsystems:ecl:soap http://10.144.84.12:8002/WsEcl/soap?xsd&quot;&gt;&lt;Source&gt;Esp&lt;/Source&gt;&lt;Exception&gt;&lt;Code&gt;-1&lt;/Code&gt;&lt;Audience&gt;user&lt;/Audience&gt;&lt;Message&gt;Query&#32;hthor/TestModule.testSOAP&#32;not&#32;found&lt;/Message&gt;&lt;/Exception&gt;&lt;/Exceptions&gt;&lt;/detail&gt;&lt;/soap:Fault&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;</soapresponse><url>http://10.144.84.12:8002/WsEcl/soap/query/hthor/TestModule.testSOAP</url></Error> (in SOAP dataset G1 E2)

      The driver code:

      esp_server := '10.144.84.12';
      doxie_wsecl_port := '8002';

      doxie1_url := 'http://' + esp_server + ':' + doxie_wsecl_port;

      srvcModule := 'TestModule';
      srvcAttr := 'testSOAP';

      // filename := 'dummy'; // Should succeed
      filename := '~joe::does_not_exist'; // Fails

      isOSS := true;

      url := if(isOSS,
      doxie1_url + '/WsEcl/soap/query/hthor' + '/' + srvcModule + '.' + srvcAttr,
      doxie1_url + '/' + srvcModule + '?ver_=0');
      srvc := if(isOSS,
      srvcModule + '.' + srvcAttr,
      srvcAttr);

      soapcall(url,
      srvc,
      {string50 inputFilename

      {xpath('inputFilename')}

      := filename},
      {unsigned8 last_unique {xpath('last_unique')}},
      timeout(5), retry(0)
      , literal
      ,xpath(srvc + 'Response/Results/Result/Dataset[@name="last_unique"]/Row')
      // this ONFAIL didn't solve the problem of causing the thor WU to fail when the SOAPCALL does.
      // ,onfail(transform({unsigned8 last_unique {xpath('last_unique')}},
      // self.last_unique := error('TestSoap Failed. '
      // + 'filename[' + filename + ']')))
      ).last_unique;

      Now, for the service code. I had to create the Folder/File for TestModule.testSOAP. In it I put:

      /*-SOAP-
      <message name="wsUniqueSequential" wuTimeout="300000">
      <part name="inputFilename" type="xsd:string" required="1"/>
      </message>
      */
      export testSOAP() := function
      string filename := '': stored('inputFileName');

      layout :=

      { unsigned8 last_unique_id, }

      ;

      uniqueSet := if(filename = 'dummy',
      dataset([

      {11}

      ],layout),
      dataset(filename, layout, thor));

      unsigned8 lastUnique := uniqueSet[1].last_unique_id : independent;

      return output(lastUnique, named('last_unique'));

      end;

      // Put in builder window and "compile" (): TestModule.testSOAP()
      // Pulish as: TestModule.testSOAP

      As the comments show, I then opened a builder window with the contents:

      TestModule.testSOAP()

      I hit “compile” with a target of hthor.

      I then went to the ECLWatch output tab, pasted TestModule.testSOAP into the Jobname and hit published. I received a “Workunit successfully published.” pop-up message for my efforts.

      Going back to driver code, I ran it as-is on a thor. If I go out to ECLWatch, I see my completed thor workunit and the failed hthor workunit.

      I then changed the driver to toggle the lines:

      filename := 'dummy'; // Should succeed
      // filename := '~joe::does_not_exist'; // Fails

      Run this on thor. Both the thor and hthor workunits completed and I received the expected result.

        Attachments

          Activity

            People

            • Assignee:
              afishbeck Anthony Fishbeck
              Reporter:
              joecella Joe Cella
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: