Cannot add data to DB in stardog 7.8.3

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.txt worked but /opt/stardog/bin/stardog doc put mydb --rdf-extractors <name-of-our-entityExtractor> -v /var/opt/testdata/input.txt fails 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.

You should see details on that in the documentation at Use Docker | Stardog Documentation Latest

yes, that's what I am doing.

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.

docker run -d -v /../stardog7.8.3docker-home/:/var/opt/stardog -e STARDOG_EXT=/var/opt/stardog-ext -v /../ext_jars_stardog7.8.3/:/var/opt/stardog-ext -v /../testdata/:/var/opt/testdata -p 5820:5820 -e STARDOG_SERVER_JAVA_ARGS="-Xmx8g -Xms8g -XX:MaxDirectMemorySize=12g" stardog/stardog:7.8.3-java11-preview

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.txt worked but /opt/stardog/bin/stardog doc put mydb --rdf-extractors <name-of-our-entityExtractor> -v /var/opt/testdata/input.txt fails ---

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)

just to confirm what permissions should the jar have?
can see it passed inside docker but maybe wrong permission?

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.

Happy to try any potential fixes you have in mind, thanks

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?

can find logs in a bit.

yes, after custom extractor fails, can then doc put with text extractor and that works

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.

yes, turns out our custom extractor has a bug which may be overwriting some IP info leading to the error. need to check internally.

Rectified that but still getting connection refused fyi for custom extractor, text extractor works fine.

Can you send the Stardog.log?

Thanks, will check and share shortly

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?