Menu

#307 Allow running a second process

v3.5.5
open
nobody
None
5
2021-09-21
2021-09-20
No

I'm looking for a way to allow my service to temporarily start a second process. For instance to have the process start with a specific command-line flag, --status for example. The process should start, and dump some status info and quit again.

Obviously the Wrapper does not allow this, since the main process is already running. Any idea how we could accomplish this?

Related

Support Requests: #307

Discussion

  • Leif Mortenson

    Leif Mortenson - 2021-09-21

    Can you explain a bit more what you are wanting to do? How is the second process triggered?

    The Wrapper lets you launch managed child processes with the WrapperManager.exec method. Similar to the Runtime.exec, but you have more control over forking, and the Wrapper will manage the lifecycles of the child processes. It is also possible to trigger child processes in response to events. These are both Pro features however.

     
    • Mark de Groot

      Mark de Groot - 2021-09-25

      For instance say I'd want to run my Java process to dump some status
      information and then exit, while the main application keeps running. Since
      the entire startup of the application is configured in the service-wrapper,
      with alle dependencies, jar files, etc., it would be ideal to have the
      wrapper start the process. I'd run something like /path-to/myapp.sh status
      or even sudo service myapp mystatus.

      But since the main process is already running, the wrapper won't let me
      start it again, which makes sense. I only wonder if there is a way around
      this.

      Hope this makes sense.

      Op di 21 sep. 2021 om 02:57 schreef Leif Mortenson mortenson@users.sourceforge.net:

      Can you explain a bit more what you are wanting to do? How is the second
      process triggered?

      The Wrapper lets you launch managed child processes with the
      WrapperManager.exec method. Similar to the Runtime.exec, but you have more
      control over forking, and the Wrapper will manage the lifecycles of the
      child processes. It is also possible to trigger child processes in response
      to events. These are both Pro features however.


      Status: open
      Group: v3.5.5
      Created: Mon Sep 20, 2021 11:05 AM UTC by Mark de Groot
      Last Updated: Mon Sep 20, 2021 11:05 AM UTC
      Owner: nobody

      I'm looking for a way to allow my service to temporarily start a second
      process. For instance to have the process start with a specific
      command-line flag, --status for example. The process should start, and dump
      some status info and quit again.

      Obviously the Wrapper does not allow this, since the main process is
      already running. Any idea how we could accomplish this?


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/wrapper/support-requests/307/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #307

      • Leif Mortenson

        Leif Mortenson - 2021-09-29

        Mark,

        In order to run a second service, you will need to have a second
        wrapper.conf file which specifies its own service name, log file name, pid
        file name, etc.
        If the majority of the configuration between the two wrapper.confs will be
        the same then you can take advantage of the #include functionality to move
        all of the common properties into a wrapper-common.conf file.
        https://wrapper.tanukisoftware.com/doc/english/props-cascading.html

        It is possible to specify the included file names based on any of the
        WRAPPER_* environment variables as well if you need to include anything
        based on the platform for example.
        https://wrapper.tanukisoftware.com/doc/english/props-envvars.html

        Missing include files are silenty ignored unless you turn on
        include debugging

        include.debug

        Please let me know how this works for you.
        Cheers,
        Leif

        On Sat, Sep 25, 2021 at 9:57 PM Mark de Groot markdegroot@users.sourceforge.net wrote:

        For instance say I'd want to run my Java process to dump some status
        information and then exit, while the main application keeps running. Since
        the entire startup of the application is configured in the service-wrapper,
        with alle dependencies, jar files, etc., it would be ideal to have the
        wrapper start the process. I'd run something like /path-to/myapp.sh status
        or even sudo service myapp mystatus.

        But since the main process is already running, the wrapper won't let me
        start it again, which makes sense. I only wonder if there is a way around
        this.

        Hope this makes sense.

        Op di 21 sep. 2021 om 02:57 schreef Leif Mortenson mortenson@users.sourceforge.net:

        Can you explain a bit more what you are wanting to do? How is the second
        process triggered?

        The Wrapper lets you launch managed child processes with the
        WrapperManager.exec method. Similar to the Runtime.exec, but you have
        more
        control over forking, and the Wrapper will manage the lifecycles of the
        child processes. It is also possible to trigger child processes in
        response
        to events. These are both Pro features however.


        Status: open
        Group: v3.5.5
        Created: Mon Sep 20, 2021 11:05 AM UTC by Mark de Groot
        Last Updated: Mon Sep 20, 2021 11:05 AM UTC
        Owner: nobody

        I'm looking for a way to allow my service to temporarily start a second
        process. For instance to have the process start with a specific
        command-line flag, --status for example. The process should start, and
        dump
        some status info and quit again.

        Obviously the Wrapper does not allow this, since the main process is
        already running. Any idea how we could accomplish this?


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/wrapper/support-requests/307/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/


        ** [support-requests:#307] Allow running a second process**

        Status: open
        Group: v3.5.5
        Created: Mon Sep 20, 2021 11:05 AM UTC by Mark de Groot
        Last Updated: Tue Sep 21, 2021 12:56 AM UTC
        Owner: nobody

        I'm looking for a way to allow my service to temporarily start a second
        process. For instance to have the process start with a specific
        command-line flag, --status for example. The process should start, and dump
        some status info and quit again.

        Obviously the Wrapper does not allow this, since the main process is
        already running. Any idea how we could accomplish this?

         

        Related

        Support Requests: #307


Log in to post a comment.

MongoDB Logo MongoDB