Apologies if I'm missing something obvious. I've been trying to create a docker image for Stardog 5.0.1, and am running into a segfault error when I try to start it up:
There was an error initializing Stardog; one or more dependencies could not be satisfied. Please verify your classpath is correct.
The initialization errors were:
* Error in custom provider, java.lang.RuntimeException: Could not load system index: system
The ADD step references a tarred/gzipped version of the stardog zip to make it easier for Docker - ADD automatically extracts tar files but not zips. That command can be replaced with the ADD resources/stardog-${STARDOG_VER}.zip followed by an unzip command to produce the same behaviour.
The step 8 stardog-admin-server-start was my typo in my post - running the corrected command gives the error I showed.
Thanks - unfortunately that makes no difference - get exactly the same error as before. Have tried it as an ENV line in the Dockerfile, and doing export STARDOG=/stardog-5.0.1 manually. I'll have a go at replicating it on another machine in the morning!
Now that I’m looking at it that won’t make any difference. For anyone following $STARDOG_HOME is where the db files and license will be located. $STARDOG gets set under the hood to where the Stardog installation actually is. If you don’t set it $STARDOG will be set based on the location of the stardog-admin command. You were executing the script with the full path and I thought something might have been getting messed up there causing classpath issues. You’d have to set $STARDOG if for some reason you relocated the stardog-admin command to some place like /usr/bin
Is there a possibility that you didn’t get everything when you went to make your tarball?
@pdmars That worked, thanks! Is there a way of telling Stardog / the JVM how much memory to use? I tried -Xmx1536m to try and limit the JVM to 1.5GB (inside a max for docker of 2GB) but it didn’t seem to work. The fact it’s working now is great, it’d just be nice if I could make it more predictable.
@zachary.whitley I’ll leave $STARDOG set anyway in case I end up symlinking the stardog-adming command somewhere. Thanks for your help too!
Great, I'm glad that worked! Beyond adjusting those STARDOG_JAVA_ARGS the documentation also has a good section on memory management and how you might want to adjust those settings based on your requirements: Home | Stardog Documentation Latest