openHAB stuck after killing process

I’m running openHAB 1.8.3, on Raspbian 8.0.
I didn’t install it with ‘apt-get’, but rather unzipped the .zip files from openHAB website.
Started the server with
./start_debug.sh &

Then, killed the java and start_debug processes with kill <id>

When trying to rerun, with ./start_debug.sh &, it’s just stuck at:
pi@raspberrypi:/opt/openhab $ ./start_debug.sh & [1] 1287 pi@raspberrypi:/opt/openhab $ Launching the openHAB runtime in debug mode... Listening for transport dt_socket at address: 8001 osgi>
(EDITED with more information)
First time it happened - reboot helped.
But now, even reboot doesn’t help…

What did I do wrong?
How can I gracefully kill the server?
Should I kill something else as well?
Remove some files?
Thanks

This doesn’t look faulty to me. What are you expecting? You might want to read a bit more about launching processes in the background.

Thomas

Thanks.
I assume I wasn’t clear enough.
Every Linux process can be stopped, in some way, and re-started.

My question is - what’s the ‘official’ way of stopping the openHAB server?
I tried killing the java process, but then I didn’t succeed on re-running openHAB.

BTW,
Sometimes reboot help, sometimes not.

openHAB is usually considered a service which will be automatically launched after boot and then run in the background. There is a sample script which would also allow you to cleanly stop openHAB.
However, you might run it in the foreground for debugging purposes but then you wouldn’t launch it with the trailing ampersand. You will get a prompt then on which you can enter commands. To stop openHAB then, you will have to enter ‘exit’ or ‘quit’, I don’t recall as I haven’t done that for quite a while.

Thomas

Makes sense.

But in my case it was even more complicated :slight_smile:
I run it in the foreground, but then my SSH session crashed, but openHAB continued running.

How can I re-connect to the running session?

Try this!

To summarize for future visitors of this topic:

It’s ok to kill the process.
It appears that my mistake was running the process in the background.
On other distro (SLES11) it failed even on the first run in the background.
On raspbian, somehow the first time works, but it’s doing problems on the second time…

Just running it without ampersand, or fg-ing it does the job.