Installed Java 8 and added as export JAVA_HOME=/usr/lib/jvm/java-8-oracle
Set export STARDOG_HOME=/data/stardog
Also added JAVA_HOME and STARDOG_HOME to \etc\environment
Unpacked the stardog-5.0.1.zip into /data/stardog.
Moved the license into /data/stardog.
Set ownership of /data/stardog to user running start command
When I run ./bin/stardog-admin server start inside the stardog directory I get this error:
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
com.complexible.stardog.BaseStardogModule.configure(BaseStardogModule.java:132) (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)
com.complexible.stardog.virtual.DefaultVirtualGraphRegistry
com.complexible.stardog.virtual.VirtualGraphService.<init>()
com.complexible.stardog.BaseStardogModule.getSecurityManager() (via modules: com.google.inject.util.Modules$OverrideModule -> com.complexible.stardog.BaseStardogModule)...
There are 7 errors total, and all mention the inability to load the system index: system. Any ideas?
I’ll start with the most likely problems and work down to less likely (some probably aren’t the problem based on the error you’re seeing but couldn’t hurt to check)
stardog-5.0.1.zip should unpack to a directory stardog-5.0.1 make sure you don’t have Stardog in /data/stardog/stardog-5.0.1. You can either move everything in stardog-5.0.1 into /data/stardog and delete the /data/stardog/stardog-5.0.1 directory and move the license file as well or update STARDOG_HOME to point to /data/stardog/stardog-5.0.1
You said that you set ownership of /data/stardog but it wasn’t clear if you set everything under there as well. Try chown with -R
Make sure your environment picked up STARDOG_HOME with $> echo $STARDOG_HOME
Make sure you’re running the JRE that you think you are with java -version (would have given you a different error but couldn’t hurt to check)
Hopefully that fixes it up. Let me know if you’re successful or still haveing problems.
Everything from stardog-5.0.1 was moved into /data/stardog as well as the license.
I’ve ran chown -R $USER:$USER /data/stardog
echo $STARDOG_HOME returns /data/stardog
java -version
java version "1.8.0_131"
Java™ SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot™ 64-Bit Server VM (build 25.131-b11, mixed mode)
Reran ./bin/stardog-admin server start and got the same error.
Unfortunately, this error could mask a number of different things that may be the real problem. If you send the full trace that might provide more detail buried in it.
Along the same lines as what Zach suggested, a few more things you can check:
Make sure there is enough memory on the system for the default memory args -Xmx2g -Xms2g -XX:MaxDirectMemorySize=1g. For example, if running inside Docker make sure the containers have more than 2gb of RAM available (or reduce those args).
Check that whatever java.io.tmpdir is set to exists and has the appropriate permissions for the process to write to.
Double check that openjdk-8-jre isn’t accidentally being used.
Don’t forget to set swapiness to 0, 1 or disable swap especially if you’re on a resource constrained system. The default is 60 and I’m sure swapping would kill performance. I often forget to do that.