Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6290

Karaf Wrapper does not properly manage process on Solaris

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.2.5
    • 4.3.0, 4.2.6
    • karaf
    • Solaris
      HP

    Description

      On Solaris platform, the restriction of ps command does not allow the Karaf Service Wrapper to properly manage associated karaf process:

      [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-
      

      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:

      [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
      

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

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              baptistedaroit Baptiste DA ROIT
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: