Ticket #156 (new task)

Opened 7 years ago

Last modified 7 years ago

Trying to chain services together

Reported by: surf9 Owned by:
Priority: minor Milestone:
Component: Development platform Version:
Keywords: Cc:


Hi there

I am trying to get working chaining of services.

This is my current code:

function testChainJS(conf,inputs,outputs) {

var inputs = {S:'james'}; var inputs = {S: { type: 'complex', value: 'james', mimeType: "application/json"} };

var myProcess = new ZOO.Process('http://localhost/cgi-bin/zoo_loader.cgi','javascript.test.hello-world.hellojs'); var myExecuteResult=myProcess.Execute(inputs);

return {result: ZOO.SERVICE_SUCCEEDED, outputs: [ {name:"Result", value: long} ] };


However, when I execute that in terminal I get the following:

./zoo_loader.cgi 'ServiceProvider?=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=javascript.chaining.testChainJS&DataInputs?=name=smith

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>ZOO Kernel failed to process your request, receiving signal 11 = SIGSEGV</ows:ExceptionText>



Any ideas how to resolve this?


Change History

  Changed 7 years ago by djay

Hello, I suppose that this ticket is the same than #154.

Can you try after changing the following:

return {result: ZOO.SERVICE_SUCCEEDED, outputs: [ {name:"Result", value: long} ] };

By this:

return {result: ZOO.SERVICE_SUCCEEDED, outputs: {"Result":{ value: long } }  };

  Changed 7 years ago by surf09

Thanks. That helped.

When I execute the service such as the following it works.

./zoo_loader.cgi 'ServiceProvider??=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=javascript.chaining.testChainJS&DataInputs??=name=smith

However, when I execute through a web server such as nginx I get the following error:

[error] 29440#0: *35 upstream timed out (110: Connection timed out) while reading response header from upstream, client:, server: localhost, request: "POST /cgi-bin/zoo_loader.cgi HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket", host: "localhost"

When I use service using localhost and identifier (javascript.test.hello-world.hellojs) via web server directly (without going through chaining service) it works fine.

  Changed 7 years ago by surf09

It doesn't like users accessing the service via a web server when the chaining process host is localhost.

  Changed 7 years ago by djay

I am not sure to understand your last comment. There should not be a problem to use any hostname to access the ZOO-Kernel until your web server is able to communicate with the target host.

  Changed 7 years ago by surf9

Are you able to test on your end using a similar simple example as I've done? What web server are you using? Apache?

  Changed 7 years ago by djay

I use Apache, but it should not make any difference here I suppose.

  Changed 7 years ago by surf9

Hi there. You are right. We created a VM through puppet which set ups the environment. It works etc. However, we encounter the same issue even when using apache. I'm not sure where the problem is originating from. I'm hoping you can help out. Are you able to test on your end if you are also encountering the same issue as it seems I've followed instructions but still receiving the same error message? Thanks.

  Changed 7 years ago by djay

Sorry for so late reply, I was attending the FOSS4G-Europe last week and was not able to come back to you earlier.

When you has submitted this ticket I have tried the scenario you have provided, it was the reason why I can fix the issue. Still I don't get the final issue, meaning that I am not able to reproduce the issue on my side. Maybe you can provide more details that may help me to understand better what happened. One thing that may be causing the issue is if you have tried to use from the command line, and it implies cache file creation, then when running from the web server, the user privileges may differ, meaning that your web server user is not allowed to read some files created by the previous execution from the command line.

Still, if you can give more details I hope I can help.

follow-up: ↓ 10   Changed 7 years ago by surf09

Thanks for your response. Where are the cache files created so I can delete them? Thanks.

in reply to: ↑ 9   Changed 7 years ago by djay

Replying to surf09:

Thanks for your response. Where are the cache files created so I can delete them? Thanks.

The cache files depend on the main.cfg file content. In case you have a cacheDir variable defined in the [main] section it means that the cache files will be located in this directory. In other case it should use the value of the tmpPath variable to store the cache files.

I hope this helps.

  Changed 7 years ago by surf9

Hi. After re-testing switching to Apache instead of using Nginx resolved my issue. Thanks for your help.

Note: See TracTickets for help on using tickets.


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