Checking for valid license

Having same issue: Cannot start Stardog server

printenv STARDOG_HOME
/Users/pdpark/stardog

Ran stardog-admin server start command and a stardog-license-key.bin file was created. (Note: on the first run of the command, the STARDOG_HOME was incorrectly set to my $HOME directory; I fixed the STARDOG_HOME env var, copied the various stardog bin, pid, and log files to the correct STARDOG_HOME directory, then re-ran the command to start the server).

Error when running the command:
/usr/local/bin/stardog-admin: line 153: 17348 Killed: 9 "java" -Dstardog.home=/Users/pdpark/stardog/ -Xmx2g -Xms2g -XX:MaxDirectMemorySize=1500m -Djava.library.path=/usr/local/Cellar/stardog/7.4.5/bin/../lib -XX:SoftRefLRUPolicyMSPerMB=1 -XX:+UseParallelOldGC -XX:+UseCompressedOops -Djavax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl -Dapple.awt.UIElement=true -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=/usr/local/Cellar/stardog/7.4.5/bin/../server/dbms/log4j2.xml -Dstardog.install.location=/usr/local/Cellar/stardog/7.4.5/bin/.. -server -classpath /usr/local/Cellar/stardog/7.4.5/bin/../client/ext/:/usr/local/Cellar/stardog/7.4.5/bin/../client/api/:/usr/local/Cellar/stardog/7.4.5/bin/../client/cli/:/usr/local/Cellar/stardog/7.4.5/bin/../client/http/:/usr/local/Cellar/stardog/7.4.5/bin/../client/pack/:/usr/local/Cellar/stardog/7.4.5/bin/../server/ext/:/usr/local/Cellar/stardog/7.4.5/bin/../server/dbms/:confused: com.complexible.stardog.cli.admin.CLI server start >> /Users/pdpark/stardog//stardog.log 2>&1

stardog.log:

INFO  2021-01-04 11:51:20,660 [main] com.complexible.stardog.StardogLicense:main(441): Checking for valid license...
INFO  2021-01-04 11:51:20,665 [main] com.complexible.stardog.StardogLicense:main(447): No license found
INFO  2021-01-04 12:23:07,087 [main] com.complexible.stardog.StardogLicense:main(441): Checking for valid license...
INFO  2021-01-04 12:24:45,019 [main] com.complexible.stardog.StardogLicense:main(441): Checking for valid license...
INFO  2021-01-04 12:24:45,028 [main] com.complexible.stardog.StardogLicense:main(447): No license found
INFO  2021-01-04 12:50:29,310 [main] com.complexible.stardog.StardogLicense:main(441): Checking for valid license...
INFO  2021-01-04 13:10:10,477 [main] com.complexible.stardog.StardogLicense:main(441): Checking for valid license...
INFO  2021-01-04 13:38:43,720 [main] com.complexible.stardog.StardogLicense:main(441): Checking for valid license...

MacOS: Catalina 10.15.7 (19H15)

java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode)

Try setting. the env var STARDOG to your installation directory. It appears this would be STARDOG=/use/local/Cellar/stardog and there shouldn’t be any need to redirect the output to stardog.log

Thanks! After doing that, now getting: Error: Could not find or load main class com.complexible.stardog.StardogLicense

When I set STARDOG to /usr/local/Cellar/stardog/7.4.5 I'm now getting the original error message:

/usr/local/bin/stardog-admin: line 153: 44379 Killed: 9 "java" -Dstardog.home=/Users/pdpark/stardog/ -Xmx2g -Xms2g -XX:MaxDirectMemorySize=1500m -Djava.library.path=/usr/local/Cellar/stardog/7.4.5/lib -XX:SoftRefLRUPolicyMSPerMB=1 -XX:+UseParallelOldGC -XX:+UseCompressedOops -Djavax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl -Dapple.awt.UIElement=true -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=/usr/local/Cellar/stardog/7.4.5/server/dbms/log4j2.xml -Dstardog.install.location=/usr/local/Cellar/stardog/7.4.5 -server -classpath /usr/local/Cellar/stardog/7.4.5/client/ext/*:/usr/local/Cellar/stardog/7.4.5/client/api/*:/usr/local/Cellar/stardog/7.4.5/client/cli/*:/usr/local/Cellar/stardog/7.4.5/client/http/*:/usr/local/Cellar/stardog/7.4.5/client/pack/*:/usr/local/Cellar/stardog/7.4.5/server/ext/*:/usr/local/Cellar/stardog/7.4.5/server/dbms/*:/* com.complexible.stardog.cli.admin.CLI server start >> /Users/pdpark/stardog//stardog.log 2>&1

Note: unsetting STARDOG_HOME env var results in the original prompts to download a trial license, but then it fails again with the same error message.

I think there's something wrong with your install with moving things around. I'd recommend removing everything and starting fresh. How did you do the original install. I noticed that you have stardog-admin located in /usr/local/bin . There's nothing wrong with that but I'm just trying to get a feel for what you've done.

@zachary.whitley thanks for the reply. I used homebrew per the instructions here:

brew install stardog-union/tap/stardog

Note: the stardog-admin file in /usr/local/bin is a symbolic link to ../Cellar/stardog/7.4.5/bin/stardog-admin

I uninstalled via homebrew and re-installed with homebrew. Same result.

I was able to get this to work by following the instructions here - I used "curl" to download the files.

I really wanted to get this install working with homebrew as that makes our setup for developers easier.

Homebrew is performing the same steps as the curl command would be. I wonder if there is a permission issue with the user running the brew install, since on my local machine I have full admin rights

There's also the possibility that you need to open a new shell so that the env vars get picked up.

I checked my command history: I'm running brew install stardog-union/tap/stardog with the same user I run the stardog-admin command. I suspect you're right, that it is a permissions issue, just not sure how it's happening.

I opened new terminals several times during the process of troubleshooting, and also set the env vars by running the export cmds directly in the shell I was using. It's not an issue with finding the stardog-admin command after the homebrew install - that's fine. It seems to not "see" (or cannot access) the license file even with the STARDOG_HOME env var set.

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