>>>>> Steinar Bang <[email protected]>:

> I tried to install apache karaf 4.0.7 on my VPS (Virtual Private
> Server), running debian "jessie" on a virtual amd64 CPU, but karaf
> failed to start.

> I was wondering if anyone on the list has an idea what caused the
> startup problem? And if anyone know about a possible workaround? 
> (e.g. is it possible to start karaf without the karaf-wrapper?)

Ok, now I've googled up on the karaf-wrapper
  http://stackoverflow.com/a/27667824
  https://wrapper.tanukisoftware.com/doc/english/download.jsp

So the question is now: is it possible to do without the karaf-wrapper?

There are some scripts in the apache-karaf-4.0.7/bin/contrib directory
of the tar.gz linux binary distribution:
  -rwxr-xr-x 1 sb sb  1234 Sep 26 07:07 karaf-service-template.conf
  -rwxr-xr-x 1 sb sb  4821 Sep 26 07:07 karaf-service-template.init
  -rwxr-xr-x 1 sb sb  6474 Sep 26 07:07 karaf-service-template.init-debian
  -rwxr-xr-x 1 sb sb  4534 Sep 26 07:07 karaf-service-template.init-redhat
  -rwxr-xr-x 1 sb sb  3398 Sep 26 07:07 karaf-service-template.solaris-smf
  -rwxr-xr-x 1 sb sb  1268 Sep 26 07:07 karaf-service-template.systemd
  -rwxr-xr-x 1 sb sb  1534 Sep 26 07:07 karaf-service-template.systemd-instances
  -rwxr-xr-x 1 sb sb 59392 Sep 26 07:07 karaf-service-win.exe
  -rwxr-xr-x 1 sb sb  1732 Sep 26 07:07 karaf-service-win.xml
  -rwxr-xr-x 1 sb sb  7683 Sep 26 07:07 karaf-service.sh

What is the state of these scripts? Are they actually currently used by
anyone?  Or are they historical scripts that have been kept around?
The only file that contains the text "wrapper" is the
karaf-service-win.exe file.

(There is a debian init.d script that would have looked promising prior
to the arrival of systemd.  Now there are two systemd files that I have
no idea what to do with.  I find systemd very confusing...)

Hm... it looks like the karaf-service.sh script will set karaf up as a
service in the system it detects it is running in...?  Without the use
of karaf-wrapper...?

Looking at the history of the 4.0.7 version of the karaf-service.sh
file, it was last modified on May 16 2016, so my guess is that these
scripts are fairly recent, and that people are using them...?
  
https://github.com/apache/karaf/commits/karaf-4.0.x/assemblies/features/base/src/main/resources/resources/bin/contrib/karaf-service.sh

Ah, this is why they exist:
 https://github.com/apache/karaf/commit/4f600555c986d18990f884512e8d1fdaa2ca8c35

(And the karaf-service.sh script first checks for the existence of
systemd and picks that, before it checks for whether the system is
redhat or debian, so that was the answer to what to pick first between
systemd and the debian initd for a debian "jessie" system... "jessie"
has systemd, so systemd is what should be used)

On a side note: Would it be possible to use apache commons procrun
as an alternative to the service wrapper, I wonder?
 http://commons.apache.org/proper/commons-daemon/procrun.html
(ie. as a third option, in addition to "with wrapper" and "without
wrapper")

And would running under procrun have any advantages wrt. "without
wrapper"?

Reply via email to