Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP 5.0.0
    • Fix Version/s: EAP_EWP 5.1.0
    • Component/s: System
    • Labels:
      None
    • Environment:
      Linux
    • Affects:
      Compatibility/Configuration, Release Notes
    • Similar Issues:
      Show 8 results 

      Description

      run.sh should create a pid file making it easier to obtain a pid in the event that there is a need to generate thread dumps, heap histograms, heap dumps e.t.c

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            mladen.turk Mladen Turk added a comment -

            Please specify exactly for which branches in
            http://anonsvn.jboss.org/repos/jbossas/branches/
            this needs to be applied.

            Show
            mladen.turk Mladen Turk added a comment - Please specify exactly for which branches in http://anonsvn.jboss.org/repos/jbossas/branches/ this needs to be applied.
            Hide
            mladen.turk Mladen Turk added a comment -

            Fixed in all active SVN branches by using JBOSS_PIDFILE environment variable
            If set the pid will be recorded inside the file pointed by that variable

            Show
            mladen.turk Mladen Turk added a comment - Fixed in all active SVN branches by using JBOSS_PIDFILE environment variable If set the pid will be recorded inside the file pointed by that variable
            Hide
            juraci.costa Juraci Paixão Kröhling added a comment -

            Mladen,

            I'm reopening this, as this is working as expected only when launching the process in background (by setting LAUNCH_JBOSS_IN_BACKGROUND). If this is the intended behaviour, please "Resolve" this issue again. Otherwise, please move the "Fix version" to a future release.

            Show
            juraci.costa Juraci Paixão Kröhling added a comment - Mladen, I'm reopening this, as this is working as expected only when launching the process in background (by setting LAUNCH_JBOSS_IN_BACKGROUND). If this is the intended behaviour, please "Resolve" this issue again. Otherwise, please move the "Fix version" to a future release.
            Hide
            mladen.turk Mladen Turk added a comment -

            Right, this is intended (well technically only possible solution).
            Shell can return a pid file only for a detached processes. If we stay in the same shell we don't know what's the child's pid
            which is case for interactive processes.
            The solution would be that JBoss itself creates a pid file by reading the property we would provide during startup
            e.g. We would call
            exec java -Djboss.pid=$$ -Djboss.pidfile=$JBOSS_PIDFILE ...

            JBoss itself would need to read those properties and create a
            System.getProperty("jboss.pidfile") file with System.getProperty("jboss.pid") content.

            However think this is out of scope of this ticket.

            Show
            mladen.turk Mladen Turk added a comment - Right, this is intended (well technically only possible solution). Shell can return a pid file only for a detached processes. If we stay in the same shell we don't know what's the child's pid which is case for interactive processes. The solution would be that JBoss itself creates a pid file by reading the property we would provide during startup e.g. We would call exec java -Djboss.pid=$$ -Djboss.pidfile=$JBOSS_PIDFILE ... JBoss itself would need to read those properties and create a System.getProperty("jboss.pidfile") file with System.getProperty("jboss.pid") content. However think this is out of scope of this ticket.
            Hide
            juraci.costa Juraci Paixão Kröhling added a comment -

            I'm adding a flag to include it on the release notes, as I think it's worth.

            Show
            juraci.costa Juraci Paixão Kröhling added a comment - I'm adding a flag to include it on the release notes, as I think it's worth.
            Hide
            juraci.costa Juraci Paixão Kröhling added a comment -

            Laura,

            I'm assigning it to you, in case we still have time to add this to the release notes. If not (or once it's done for verification), please assign it back to me. Thanks!

            Show
            juraci.costa Juraci Paixão Kröhling added a comment - Laura, I'm assigning it to you, in case we still have time to add this to the release notes. If not (or once it's done for verification), please assign it back to me. Thanks!
            Hide
            laubai Laura Bailey added a comment -

            Assigning back to you, Juca.

            Documented like so in EAP/EWP 5.1 release notes:
            The <filename>run.sh</filename> script now creates a file to track processes and make it easier
            to obtain process IDs, <filename>jboss.pidfile</filename>. See the JIRA for further details.

            It would be good to include instructions about how this works or how to set it up. I don't understand the comment above.

            Show
            laubai Laura Bailey added a comment - Assigning back to you, Juca. Documented like so in EAP/EWP 5.1 release notes: The <filename>run.sh</filename> script now creates a file to track processes and make it easier to obtain process IDs, <filename>jboss.pidfile</filename>. See the JIRA for further details. It would be good to include instructions about how this works or how to set it up. I don't understand the comment above.
            Hide
            juraci.costa Juraci Paixão Kröhling added a comment -

            When starting JBossAS, we have the possibility to start it as a background process. To do that, we should set the environment variable "LAUNCH_JBOSS_IN_BACKGROUND" to any value. The run.sh script will still "block" the shell, as it waits for the JBoss process to finish and dispatch any received signals (including ctrl+c) to the JBoss process. So, I don't see any side effect (or different behaviour than without the env var set), but Mladen can comment better on this.

            So, in case one needs to create a PID file for JBossAS, all is needed is to export two environment variables before starting JBossAS via run.sh:
            export LAUNCH_JBOSS_IN_BACKGROUND=true
            export JBOSS_PIDFILE=/path/to/file.pid

            Show
            juraci.costa Juraci Paixão Kröhling added a comment - When starting JBossAS, we have the possibility to start it as a background process. To do that, we should set the environment variable "LAUNCH_JBOSS_IN_BACKGROUND" to any value. The run.sh script will still "block" the shell, as it waits for the JBoss process to finish and dispatch any received signals (including ctrl+c) to the JBoss process. So, I don't see any side effect (or different behaviour than without the env var set), but Mladen can comment better on this. So, in case one needs to create a PID file for JBossAS, all is needed is to export two environment variables before starting JBossAS via run.sh: export LAUNCH_JBOSS_IN_BACKGROUND=true export JBOSS_PIDFILE=/path/to/file.pid
            Hide
            juraci.costa Juraci Paixão Kröhling added a comment -

            By the way, I would change the description of this in the Release Notes, as I think it's misleading. A reader may (wrongly) deduce that run.sh will always create a "jboss.pidfile". I suggest this:

            The <filename>run.sh</filename> script now have the ability to create a PID file to track processes and make it easier
            to obtain process IDs. See the JIRA for further details on how to enable this.

            Show
            juraci.costa Juraci Paixão Kröhling added a comment - By the way, I would change the description of this in the Release Notes, as I think it's misleading. A reader may (wrongly) deduce that run.sh will always create a "jboss.pidfile". I suggest this: The <filename>run.sh</filename> script now have the ability to create a PID file to track processes and make it easier to obtain process IDs. See the JIRA for further details on how to enable this.

              People

              • Assignee:
                laubai Laura Bailey
                Reporter:
                lakagwu Lami Akagwu
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development