What is the name of the server process?


(Bonnie MacKellar) #1

This may be a silly question - what is the name of the server process? I am trying to figure out if the Stardog server is running on a Linux machine or not. The installation, I believe, was seriously messed up and I am trying to figure out what is happening on the machine. Something seems to be waking up every 5 minutes and trying to start Stardog and failing.
If I need to completely uninstall every trace of Stardog on that machine, how would I do it? This is a Red Hat machine.


(Jess Balint) #2

You just need to delete the Stardog binaries. Stardog runs as a Java process. You can use tools like jps, ps or netstat (to find a process listening on port 5820) to identify the Stardog server process.


(Bonnie MacKellar) #3

Hi, there is nothing listening on 5820.

I have a major mystery on my hands. A number of months ago, I tried to install Stardog 5.2 on a Red Hat machine that I do not have full control over. I had previously installed it on Ubuntu, and it works fine on that machine. I have to admit that I am not very familiar with Red Hat or yum, so perhaps I did something wrong. I followed the instructions in the quick start section, and ended up with what I thought was a correct installation. But I never could get the server to run - it starts and then stops immediately with no error message. I thought it was a problem with the port being blocked. Our networking group which controls ports finally unblocked it today, so I went back to try to make it run, and realized that I have a weird mess on my hands.

Stardog was installed into /var/opt/stardog-5.2.0. That is where I am trying to start the server with
sudo bin/stardog-admin server start
But, I discovered today, there is another mysterious directory
/var/opt/stardog
which contains only these files
stardog.log, stardog.pid, zookeeper.log
and nothing else.
Something is trying to start stardog every 5 minutes, and writing to stardog.log in this mystery folder, which logs this error message
“A valid Stardog license was not found. The license file ‘stardog-license-key.bin’ should be in your S
tardog Home directory ‘/var/opt/stardog’.”

which of course makes sense because there is no license file in /var/opt/stardog. The license file is in the correct installation directory /var/opt/stardog-5.2.0
Why was this strange alternative directory created, and what is trying to access it, every 5 minutes?
I hunted around some more, and discovered this file
/etc/stardog.env.sh
which contains one line
export STARDOG_HOME=/var/opt/stardog

This is clearly part of the problem. Why would this line be in this file? What is the role of this file? It is not really documented.

Worse yet, I found that there are more stardog files in yet another folder: /opt/stardog.

So at this point, all I can assume is that there was something very wrong with the yum installation setup. I have stardog files all over my system in all sorts of unexpected places, and some kind of mystery process which tries to run the stardog server in the wrong folder, every 5 minutes. I have no idea how to figure out what process this is or how to get rid of it.

I need to completely uninstall every trace of this mess and start again. And hopefully, it will install correctly this time. Are there other people who have successfully installed Stardog on a Red Hat machine? And can anyone tell me what I need to do to completely remove this thing?? Thanks!


(John Bresnahan) #4

There are two directories in play here:

  1. The installation directory: This is where the binary files needed to run Stardog are placed. This is /opt/stardog when using the package managers defaults.
  2. STARDOG_HOME. This is the directory where the data files which represent the various databases are held. The default for STARDOG_HOME is /var/opt/stardog. If you would like to change that edit the file /etc/stardog.env.sh.

systemd is controlling the startup of Stardog. You can find its configuration here: /etc/systemd/system/stardog.service. By default if Stardog fails to start it will wait 10 seconds and then try to start it again.

note: This is when using an rpm or deb package. If you are using the zip file these things are controlled differently.

I am not sure where /var/opt/stardog-5.2.0 came from but that appears to be the installation path of the binaries and not the home of the data files (STARDOG_HOME). The licenses must be put in STARDOG_HOME.

I hope that helps!
John


(Bonnie MacKellar) #5

Thanks! That really is helpful. Is this documented on the manual page anywhere? It is exactly what I was hunting for.

So do you recommend keeping the defaults?

Now, what do I need to do to completely uninstall everything? I want to do a clean reinstall of the latest version, so I want nothing hanging around from this mess. I realize I can simply delete all the directories, but I would like to make sure I get rid of everything, including the systemd stuff.

Thanks again!


(system) #6

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