Unable to run federated queries

Hi,

I am trying to run the following federated queries for testing purposes, since later on I would need more complex and concrete ones:

SELECT  ?s ?type WHERE {
 
    SERVICE <http://dbpedia.org/sparql> {
            ?s rdf:type ?type  
    }
} Limit 100

and

SELECT  ?s ?type WHERE {
 
    SERVICE <https://query.wikidata.org/> {
            ?s rdf:type ?type  
    }
} Limit 100

but, I am receiving errors as below:

  • At Stardog Studio:

QueryEval: dbpedia.org: Name or Service not known
QueryEval: query.wikidata.org: Name or Service not known

  • At Stardog Web Interface:

Error! Internal Server Error

The correct Wikidata URL for the SPARQL service is https://query.wikidata.org/sparql, your URL is just the web interface.

Right, sorry. I used that before. The error was/is the same.

In principle, no matter what kind of URL you put within < > , it is not able to resolve. You can put an arbitrary string as well.

The big question is, how do you run the queries? I tried it with Stardog 6.1.3 in the standard web console in my browser and it works as expected.

SELECT ?s ?type WHERE {
    SERVICE <http://dbpedia.org/sparql> {
        ?s rdf:type ?type  
    }
} Limit 100

This query works for me locally. Is something appearing in your stardog.log? And as @lorenz_b asks, are you using the CLI, the webconsole, Stardog Studio, or some other method of running the query?

Hi,

I am using the WebConsole and Stardog Studio, as I described in the initial post.

Since our Stardog server is running behind a Proxy, we solved the problem based on the following link:
Stardog Connection via HTTP_PROXY - #2 by zachary.whitley , via putting the following command into STARDOG_JAVA_ARGS:

STARDOG_JAVA_ARGS="-Xmx2g -Xms2g -XX:MaxDirectMemorySize=1g -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=53128"

Please note, in the original link there is a tiny misspell error, instead of "-Dhttp.protyPort=53128", it should be "-Dhttp.proxyPort=53128".

Running behind a proxy caused the problem of not being able to contact a PostgreSQL Server, as described in the following link: https://community.stardog.com/t/unable-to-create-a-virtualgraph-with-a-postgresql-server/1649/3 . Basically, both problems are solved using the above command. I interlinked these two problems in case some else encounters them in the future.

Thank you for your support.

Oh, I should learn reading carefully. Glad it works now.

I'm just wondering why you get two different error messages between Web console and Stardog Studio. Or is the Error! Internal Server Error message in the Web Console just the parent Java error and the details can be found just in the logs?

I'm just wondering why you get two different error messages between Web console and Stardog Studio. Or is the Error! Internal Server Error message in the Web Console just the parent Java error and the details can be found just in the logs?

This is just because Studio extracts the more informative error message from the response body that is sent back from Stardog (when it is available), whereas the web console just displays the more generic HTTP status text.

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