Hi Steinar,

1. It sounds like a mistake i the karaf-wrapper script. I gonna check that.

2. As a workaround, you can use the systemd scripts in the contrib folder. However, one feature of the karaf-wrapper is the respawn of the JVM in case of failure or process exit.

Regards
JB

On 11/16/2016 05:30 PM, Steinar Bang wrote:
Hi,

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?)

The messages I got on startup, were:

rainey:~# systemctl status karaf.service
● karaf.service - LSB: Starts karaf server
   Loaded: loaded (/etc/init.d/karaf)
   Active: failed (Result: exit-code) since Mon 2016-11-14 21:51:42 GMT; 22h ago
  Process: 16796 ExecStart=/etc/init.d/karaf start (code=exited, status=2)

Nov 14 21:51:41 rainey.bang.priv.no su[16838]: Successful su for karaf by root
Nov 14 21:51:41 rainey.bang.priv.no su[16838]: + ??? root:karaf
Nov 14 21:51:41 rainey.bang.priv.no su[16838]: pam_unix(su:session): session 
opened for user karaf by (uid=0)
Nov 14 21:51:42 rainey.bang.priv.no karaf[16796]: Starting karaf...
Nov 14 21:51:42 rainey.bang.priv.no karaf[16796]: /usr/local/karaf/bin/karaf-wrapper: 1: 
/usr/local/karaf/bin/karaf-wrapper: Syntax error: "(" unexpected
Nov 14 21:51:42 rainey.bang.priv.no systemd[1]: karaf.service: control process 
exited, code=exited status=2
Nov 14 21:51:42 rainey.bang.priv.no systemd[1]: Failed to start LSB: Starts 
karaf server.
Nov 14 21:51:42 rainey.bang.priv.no systemd[1]: Unit karaf.service entered 
failed state.
rainey:~#


Karaf was installed from a .deb package I created for karaf 4.0.7 using
this build setup
 https://github.com/steinarb/karaf-deb-packaging

I forked the build setup from:
 https://github.com/DemisR/karaf-deb-packaging

What I've done since the fork is:
 - Change the JDK to openjdk-8-jdk (installed from debian backports)
 - Change the data directory to /var/lib/karaf (to be more debian-ish)
 - Go back to the standard maven settings making karaf find maven
   dependencies under ~karaf/.m2/repository

The .deb package was created on an Intel i5 skylake computer, also
running debian "jessie" and worked fine on that machine.

However on the VM karaf installed from the .deb package failed tp start,
and I think it may be related to the CPU...?  When I googled the error
message all hits were failures to run karaf on the raspberry-pi and
problems with the arm version.

However both the i5 and the VM are presumably amd64 CPUs, so I don't
know how relevant this is?

If actually it is a CPU incompatibility with the VMs CPU and an actual
Intel CPU, it is the first one I've seen for the 6+ years I have been
running this VM, so I'm thinking it could be something else...?

Thanks!


- Steinar



--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to