You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Baptiste DA ROIT (JIRA)" <ji...@apache.org> on 2019/05/21 08:19:00 UTC
[jira] [Commented] (KARAF-6290) Karaf Wrapper does not properly
manage process on Solaris
[ https://issues.apache.org/jira/browse/KARAF-6290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16844620#comment-16844620 ]
Baptiste DA ROIT commented on KARAF-6290:
-----------------------------------------
Service file can be improved to better manage such situations using _*pargs*_ or *_/usr/ucb/ps_* (if available) on Solaris.
Also, *_ps_* command on HP-UX platforms has recently be patched to add a _*-x*_ option which will allow to get more characters on the output.
I can make a PR to adapt the script.
> Karaf Wrapper does not properly manage process on Solaris
> ---------------------------------------------------------
>
> Key: KARAF-6290
> URL: https://issues.apache.org/jira/browse/KARAF-6290
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.5
> Environment: Solaris
> HP
> Reporter: Baptiste DA ROIT
> Priority: Major
>
> On Solaris platform, the restriction of ps command does not allow the Karaf Service Wrapper to properly manage associated karaf process:
> {code}
> [root ~] # cat /opt/smartcollector-dev2/smartcollector-dist-5.7.5-SNAPSHOT/smartcollector-dev2.wrapper.pid
> 6043
> [root ~] # ps -p 6043 -o comm
> COMMAND
> /opt/smartcollector-dev2/smartcollector-dist-5.7.5-SNAPSHOT/bin/smartcollector-
> {code}
> As we can see, if the path to wrapper executable is too long, il will cause the service to fail to stop associated karaf instance, as detailed below:
> {code}
> [root ~] # /etc/init.d/smartcollector-dev2 status
> Removed stale pid file: /opt/smartcollector-dev2/smartcollector-dist-5.7.5-SNAPSHOT/smartcollector-dev2.wrapper.pid
> smartcollector-dev2 is not running.
> [root ~] # ps -ef | grep smartco
> smcdev 6043 1 0 02:20:27 ? 0:01 /opt/smartcollector-dev2/smartcollector-dist-5.7.5-SNAPSHOT/bin/smartcollector-
> smcdev 6044 6043 0 02:20:28 ? 4:11 /opt/smartcollector-dev2/smartcollector-java/bin/java -Djava.endorsed.dirs=/opt
> [root ~] # /etc/init.d/smartcollector-dev2 stop
> Stopping smartcollector-dev2...
> smartcollector-dev2 was not running.
> [root ~] # ps -ef | grep smartco
> smcdev 6043 1 0 02:20:27 ? 0:01 /opt/smartcollector-dev2/smartcollector-dist-5.7.5-SNAPSHOT/bin/smartcollector-
> smcdev 6044 6043 0 02:20:28 ? 4:11 /opt/smartcollector-dev2/smartcollector-java/bin/java -Djava.endorsed.dirs=/opt
> {code}
> This issue can also appears on HP-UX platform, where default ps command is also limited to a certain amount of characters (it seems to be 128).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)