# Federated query

**URL:** https://community.stardog.com/t/federated-query/2121
**Category:** Support
**Created:** [November 27, 2019, 6:31pm UTC](https://community.stardog.com/t/federated-query/2121 "2019-11-27T18:31:54Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![s5uybw](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@s5uybw](https://community.stardog.com/u/s5uybw)
#### Post date: [November 27, 2019, 6:31pm UTC](https://community.stardog.com/t/federated-query/2121/1 "2019-11-27T18:31:54Z")

</div>

Hello,  
I am trying to run the following federated queries to access lei.info via stardog studio

```
PREFIX voc: <http://lei.info/voc/l1/>

SELECT *
WHERE {
    SERVICE <https://lei.info/sparql> {
    GRAPH ?g {
        ?s a voc:LegalEntity .
    }
}
}
LIMIT 100

```

Got errors:

```
{
  "message": "Network is unreachable (connect failed)"
  "code": "QueryEval"
}

```

However, I am able to connect using Python Sparql-client and retrieve data in the same machine.

Stardog is running behind a proxy. We have setup using -Dhttp.proxyHost -Dhttp.proxyPort. We are able to connect dbpedia via stardog studio.

Stardog server:7.0.1

---

<div class="post-metadata">

### Author: ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)
#### Post date: [November 27, 2019, 7:12pm UTC](https://community.stardog.com/t/federated-query/2121/2 "2019-11-27T19:12:17Z")

</div>

Is there any additional information in stardog.log?

---

<div class="post-metadata">

### Author: ![s5uybw](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@s5uybw](https://community.stardog.com/u/s5uybw)
#### Post date: [November 27, 2019, 8:58pm UTC](https://community.stardog.com/t/federated-query/2121/3 "2019-11-27T20:58:08Z")

</div>

here is extraction from the log:  
ERROR 2019-11-27 15:59:56,790 [stardog-user-1] com.complexible.stardog.protocols.http.server.StardogHttpServiceLoader:accept(231): An unexpected exception was handled by the server  
com.stardog.stark.query.QueryExecutionFailure: Network is unreachable (connect failed)  
at com.complexible.common.rdf.query.IteratorAsTupleQueryResult.hasNext(IteratorAsTupleQueryResult.java:82) ~[stardog-utils-rdf-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.TransactionManagedQueryResult.hasNext(TransactionManagedQueryResult.java:61) ~[stardog-7.0.1.jar:?]  
at com.stardog.stark.query.ClosingSpliterator.forEachRemaining(ClosingSpliterator.java:37) ~[stardog-stark-query-api-7.0.1.jar:?]  
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[?:1.8.0\_222]  
at com.stardog.stark.query.io.QueryResultWriters.write(QueryResultWriters.java:142) ~[stardog-stark-query-io-7.0.1.jar:?]  
at com.stardog.stark.query.io.QueryResultWriters.write(QueryResultWriters.java:127) ~[stardog-stark-query-io-7.0.1.jar:?]  
at com.complexible.stardog.protocols.http.server.ProtocolUtils.writeTupleResponse(ProtocolUtils.java:570) ~[stardog-protocols-http-server-7.0.1.jar:?]  
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:480) ~[stardog-protocols-http-server-7.0.1.jar:?]  
at com.complexible.stardog.protocols.http.server.ProtocolUtils.executeReadQuery(ProtocolUtils.java:464) ~[stardog-protocols-http-server-7.0.1.jar:?]  
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.executeQuery(SPARQLProtocol.java:127) ~[stardog-protocols-http-server-7.0.1.jar:?]  
at com.complexible.stardog.protocols.http.server.SPARQLProtocol.post(SPARQLProtocol.java:92) ~[stardog-protocols-http-server-7.0.1.jar:?]  
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.0.1.jar:?]  
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]  
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0\_222]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0\_222]  
at java.lang.Thread.run(Thread.java:748) [?:1.8.0\_222]  
Caused by: com.complexible.stardog.plan.eval.operator.OperatorException: Network is unreachable (connect failed)  
at com.complexible.stardog.plan.eval.service.SPARQLService$SparqlServiceQuery.evaluateBatch(SPARQLService.java:138) ~[stardog-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.service.BatchingJoinArgServiceQuery.evaluate(BatchingJoinArgServiceQuery.java:59) ~[stardog-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:82) ~[stardog-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.operator.impl.ServiceOperatorImpl.computeNext(ServiceOperatorImpl.java:33) ~[stardog-7.0.1.jar:?]  
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.0.1.jar:?]  
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:82) ~[stardog-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.operator.impl.SingleProjectionOp.computeNext(SingleProjectionOp.java:29) ~[stardog-7.0.1.jar:?]  
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.0.1.jar:?]  
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:114) ~[stardog-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.operator.util.AutoCloseOperator.computeNext(AutoCloseOperator.java:26) ~[stardog-7.0.1.jar:?]  
at com.complexible.common.collect.AbstractSkippingIterator.tryToComputeNext(AbstractSkippingIterator.java:147) ~[stardog-utils-common-7.0.1.jar:?]  
at com.complexible.common.collect.AbstractSkippingIterator.hasNext(AbstractSkippingIterator.java:134) ~[stardog-utils-common-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:119) ~[stardog-7.0.1.jar:?]  
at com.complexible.stardog.plan.eval.operator.util.OpBasedBindingSetIteration.computeNext(OpBasedBindingSetIteration.java:40) ~[stardog-7.0.1.jar:?]  
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) ~[guava-26.0-jre.jar:?]  
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) ~[guava-26.0-jre.jar:?]  
at com.complexible.common.rdf.query.IteratorAsTupleQueryResult.hasNext(IteratorAsTupleQueryResult.java:78) ~[stardog-utils-rdf-7.0.1.jar:?]  
... 16 more

---

<div class="post-metadata">

### Author: ![jess](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/jess/32/10_2.png) [@jess](https://community.stardog.com/u/jess)
#### Post date: [November 27, 2019, 9:00pm UTC](https://community.stardog.com/t/federated-query/2121/4 "2019-11-27T21:00:29Z")

</div>

Please use the HTTPS proxy settings as described in section 2.2 of [Java Networking and Proxies](https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html).

---

<div class="post-metadata">

### Author: ![s5uybw](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@s5uybw](https://community.stardog.com/u/s5uybw)
#### Post date: [November 27, 2019, 10:18pm UTC](https://community.stardog.com/t/federated-query/2121/5 "2019-11-27T22:18:13Z")

</div>

Hi Jess, i do have proxy setting for STARDOG\_JAVA\_ARGS

-Dhttp.proxyHost=xxxx -Dhttp.proxyPort=xxxx

---

<div class="post-metadata">

### Author: ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)
#### Post date: [November 27, 2019, 11:14pm UTC](https://community.stardog.com/t/federated-query/2121/6 "2019-11-27T23:14:10Z")

</div>

The endpoint us using http **s**

---

<div class="post-metadata">

### Author: ![s5uybw](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@s5uybw](https://community.stardog.com/u/s5uybw)
#### Post date: [November 28, 2019, 12:09am UTC](https://community.stardog.com/t/federated-query/2121/7 "2019-11-28T00:09:19Z")

</div>

thanks!  
I did not notice that there is Dhttps.proxyHost setting. it works now.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)
#### Post date: [December 12, 2019, 12:09am UTC](https://community.stardog.com/t/federated-query/2121/8 "2019-12-12T00:09:26Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
