Have stardog running via docker, trying to add a 1-line test .txt file into an empty new DB fails (using an rdf extractor)
in docker via doc put: /opt/stardog/bin/stardog doc put mydb --rdf-extractors <extractorname_without_path> -v /var/opt/testdata/input.txt
error:
... failed: Connection refused (Connection refused)
The detailed stack trace for the error is:
com.complexible.stardog.cli.CliException: org.apache.http.conn.HttpHostConnectException
at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:87)
at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:56)
at com.complexible.stardog.cli.CLI.main(CLI.java:121)
Caused by: com.complexible.stardog.protocols.http.client.BaseHttpClient$HttpClientException: org.apache.http.conn.HttpHostConnectException: Connection refused (Connection refused)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.errorCodeToException(BaseHttpClient.java:563)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:520)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:382)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:128)
at com.complexible.stardog.protocols.http.docs.client.HttpBitesConnection.putDocument(HttpBitesConnection.java:91)
at com.complexible.stardog.docs.cli.DocPut.execute(DocPut.java:111)
at com.complexible.stardog.cli.impl.ConnectionCommand.execute(ConnectionCommand.java:95)
at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:75)
... 2 more
Caused by: com.complexible.stardog.StardogException: org.apache.http.conn.HttpHostConnectException: Connection refused (Connection refused)
at com.complexible.stardog.ErrorCodes.parseToThrowable(ErrorCodes.java:59)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.errorCodeToException(BaseHttpClient.java:548)
... 9 more
I made the DB as same user (stardog) (via /opt/stardog/bin/stardog-admin db create -n mydb) and that worked and can see it in browser in stardog studio (as user: admin). Any ideas why adding to same DB is failing now? thanks
also, can use text rdfExtractor to add data but not a custom extractor whose .jar I have.
in docker: /opt/stardog/bin/stardog doc put my-database --rdf-extractors text -v /var/opt/testdata/input.txtworked but /opt/stardog/bin/stardog doc put mydb --rdf-extractors <name-of-our-entityExtractor> -v /var/opt/testdata/input.txtfails with Connection Refused.
So if I understand you correctly, you're running Stardog from docker and you can successfully run builtin extractors but can't run your own custom extractor?
Can you send the exact docker command you're using to run the container? You would need to have either copied the jar into the running container or have included the STARDOG_EXT env variable,
the volume mount for the extensions directory, and copied the jar file into there with the correct permissions so that it can be read.
can run docker (and pass env and volume to stardog, ext and test data) but running general rdfExtractor: text works but my custom extractor (that a colleague showed me as working) fails on my instance. using v7.8.3 as that is what is being used for this task.
container launches fine. and can connect via docker exec and go to /var/opt/ and see the 3 mounted volumes contents.
once inside, then /opt/stardog/bin/stardog doc put my-database --rdf-extractors text -v /var/opt/testdata/input.txtworked but /opt/stardog/bin/stardog doc put mydb --rdf-extractors <name-of-our-entityExtractor> -v /var/opt/testdata/input.txtfails ---
Connection refused (Connection refused)
The detailed stack trace for the error is:
com.complexible.stardog.cli.CliException: org.apache.http.conn.HttpHostConnectException
at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:87)
at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:56)
at com.complexible.stardog.cli.CLI.main(CLI.java:121)
Caused by: com.complexible.stardog.protocols.http.client.BaseHttpClient$HttpClientException: org.apache.http.conn.HttpHostConnectException: Connection refused (Connection refused)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.errorCodeToException(BaseHttpClient.java:563)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.checkResponseCode(BaseHttpClient.java:520)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:382)
at com.complexible.stardog.protocols.http.client.BaseHttpClient.execute(BaseHttpClient.java:128)
at com.complexible.stardog.protocols.http.docs.client.HttpBitesConnection.putDocument(HttpBitesConnection.java:91)
at com.complexible.stardog.docs.cli.DocPut.execute(DocPut.java:111)
at com.complexible.stardog.cli.impl.ConnectionCommand.execute(ConnectionCommand.java:95)
at com.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:75)
... 2 more
Caused by: com.complexible.stardog.StardogException: org.apache.http.conn.HttpHostConnectException: Connection refused (Connection refused)
World readable should be fine (444) but I don't think that's the problem here or if it is a problem we haven't gotten to that point yet. Seems more likely to be a networking issue.
Wasn’t going to leave you hanging, still looking into it. Can you send any errors or warnings in stardog.log and after getting the failed custom extractor can you still go back and successfully run the native extractor?
Thanks. Just checking if running the custom extractor has Stardog totally borked or if it's just when running that one custom one and everything else keeps working as expected. I suspect that the logs will provide a much better idea of what's happening. It didn't occur to me last night that was the client side you were sending. Something probably happened on the server side and it said, "Nope!" to the connection. That something should be in the logs.
Following up to see if you were able to get those logs and are still experiencing the problem. You mentioned that it was "rectified" but you're still having a problem. Can you provide some information on what was fixed and what problems remain?