karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4260) Setting karaf.clean.all = true breaks service wrapper service script
Date Mon, 27 Mar 2017 09:36:41 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15942933#comment-15942933

ASF GitHub Bot commented on KARAF-4260:

GitHub user vladimirfx opened a pull request:


    [KARAF-4260] Rename Service Wrapper pid file to not clash with Karaf JVM pid file

    When service name is 'karaf' PID file created by Service Wrapper clashes with PID file
created from Karaf JVM. As result service is started, PID file overridden by Karaf Java code
and service can't be controlled by OS "service" command.
    Example output:
    [root@smosesb02 java]# service karaf stop
    Stopping karaf...
    Removed stale pid file: /opt/apache-karaf-4.0.9-SNAPSHOT/karaf.pid
    karaf was not running.
    [root@smosesb02 java]# ps -ef | grep java
    root      5184 17242  0 12:24 pts/0    00:00:00 grep java
    karaf    27269 27267 24 12:19 ?        00:01:06 /usr/java/jdk1.8.0_92/bin/java -Dkaraf.home=/opt/apache-karaf-4.0.9-SNAPSHOT
-Dkaraf.base=/opt/apache-karaf-4.0.9-SNAPSHOT -Dkaraf.data=/opt/apache-karaf-4.0.9-SNAPSHOT/data
-Dkaraf.etc=/opt/apache-karaf-4.0.9-SNAPSHOT/etc -Dcom.sun.management.jmxremote -Dkaraf.startLocalConsole=false
-Dkaraf.startRemoteShell=true -Djava.endorsed.dirs=/usr/java/jdk1.8.0_92/jre/lib/endorsed:/usr/java/jdk1.8.0_92/lib/endorsed:/opt/apache-karaf-4.0.9-SNAPSHOT/lib/endorsed
-Djava.io.tmpdir=/opt/apache-karaf-4.0.9-SNAPSHOT/data/tmp -XX:MaxPermSize=128m -Djava.io.tmpdir=/opt/apache-karaf-4.0.9-SNAPSHOT/data/tmp
-XX:-HeapDumpOnOutOfMemoryError -Xms512m -Xmx512m -Djava.library.path=/opt/apache-karaf-4.0.9-SNAPSHOT/lib/wrapper/
-classpath /opt/apache-karaf-4.0.9-SNAPSHOT/lib/boot/org.apache.karaf.diagnostic.boot-4.0.8.CITC_8.jar:/opt/apache-karaf-4.0.9-SNAPSHOT/lib/boot/org.apache.karaf.jaas.boot-4.0.8.CITC_8.jar:/opt/apache-karaf-4.0.9-SNAPSHOT/lib/boot/org.osgi.core-6.0.0.jar:/opt/apache-karaf-4.0.9-SNAPSHOT/lib/boot/org.apache.karaf.main-4.0.8.CITC_8.jar:/opt/apache-karaf-4.0.9-SNAPSHOT/lib/wrapper/karaf-wrapper-main.jar:/opt/apache-karaf-4.0.9-SNAPSHOT/lib/wrapper/karaf-wrapper.jar
-Dwrapper.key=755NX7xqehWEZrWs -Dwrapper.port=32001 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999
-Dwrapper.pid=27267 -Dwrapper.version=3.2.3 -Dwrapper.native_library=wrapper -Dwrapper.service=TRUE
-Dwrapper.cpu.timeout=30 -Dwrapper.jvmid=1 org.apache.karaf.wrapper.internal.service.Main

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cit-consulting/karaf KARAF-4260

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #292
commit e6dc731f86440dd19c466c20afc83ba36fb62c16
Author: Vladimir Konkov <vkonkov@citc.ru>
Date:   2017-03-27T08:30:52Z

    [KARAF-4260] Rename Service Wrapper pid file to not clash with Karaf JVM pid file


> Setting karaf.clean.all = true breaks service wrapper service script
> --------------------------------------------------------------------
>                 Key: KARAF-4260
>                 URL: https://issues.apache.org/jira/browse/KARAF-4260
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 4.0.3
>            Reporter: Ralf Steppacher
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 4.0.9, 4.1.1
> The Karaf service wrapper script is generated such that the PID file is created in {{$KARAF_HOME/data}}.
When setting {{karaf.clean.all = true}} then the PID file created by the service script gets
deleted together with the data directory. As a result of this the service script reports Karaf
as not running and it is not possible to stop the process via the script.
> The PID file location probably should be outside the data directory by default.

This message was sent by Atlassian JIRA

View raw message