I have managed to successfully run stardog 7 on Windows using docker, using the following command,
docker run -it -p 5820:5820 -v C:/Docker/stardog-home:/var/opt/stardog stardog/stardog
I am trying to run stardog-admin now so I can call Virtual graph command.
Any ideas how to do that?
Many thanks
P.S Spent hours reading about linking dockers and none of that worked.
You have a couple of options. You can run it from withing the container with
docker exec -it <container id> /opt/stardog/bin/stardog ...
and for the admin commands
docker exec -it <container id> /opt/stardog/bin/stardog-admin ...
If you wanted to run it from another account that doesn't have permission to access docker or another machine that doesn't have docker installed you can download the .zip distro and run the cli commands from there. You'll just need to add the --server arg to point to your docker container. As long as you don't try and start Stardog it should be pure Java.
One last thing you could do to make it a little easier. You don't have to run those commands from the running container. You can run a new container overriding ENTRYPOINT just to execute those commands passing the --server arg. That way you can alias the commands to stardog and stardog-admin and they should still work after you restart the container and behave just like they do when they're locally installed. Which way you do it is up to you.
Sorry to hear you spent so much time on linking docker containers. I've been there. Usually figure it out, promptly forget it and then find myself reading it all over again in six months. There should be a name for stuff like that, like groundhog day config. I'd put git and maven in that category.
Zack
Thank you very much. Worked like a charm.
I got passed that and now I hit another snag trying to get the call to the DB to work from Star Dog Studio.
I have set up postgresql db on my machine running on local host.
I know I can connect to it with postgre cmd line.
Then use the following connection string from SD Studio
jdbc:postgresql://localhost:5432/postgres
org.postgresql.Driver
with user name and passwd
I have configured the SD for the driver for postgresql correctly I believe
The SD server throws the following error
May 04, 2020 2:20:52 PM org.apache.tomcat.jdbc.pool.ConnectionPool init
SEVERE: Unable to create initial connections of pool.
org.postgresql.util.PSQLException: Connection to 127.0.0.1:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Thank you very much.
You don't want to connect to localhost since that will be in the Stardog container and you're not running postgres there. You need to point it at the actual machine it's running on.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.