Sling
  1. Sling
  2. SLING-954

Add suppport for TCP/IP based control connection for Sling standalone app

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Launchpad Base 2.0.4
    • Fix Version/s: Launchpad Base 2.0.4
    • Component/s: Launchpad
    • Labels:
      None

      Description

      Currently the Sling standalone application can only be stopped by stopping the system bundle or by killing the Sling process. To better control Sling control connection support based on TCP/IP would be nice. This way the same sling standalone application may be used to start sling, to check a running sling instance and to stop a running sling instance.

      The following command line arguments are added:

      "start" - Sling opens a TCP/IP server socket for the control conneciton
      "status" - Checks whether a Sling instance is listening on a TCP/IP socket
      "stop" - Stops a Sling instance listening on a TCP/IP socket
      none of the above - starts Sling without listening on a TCP/IP socket

      The socket to listen on (start option) or to send the command to (status, stop) is configured with the "-j" command line option. This option takes an argument of the following form:

      host:port – host name or ip address and port number of the socket
      port – port number on localhost (InetAddress.getLocalHost()) of the socket
      none or -j not specified – defaults to port 63000 on localhost

      Note, that setting any host name or IP address, which is reachable from remote systems may be considered as security issue, since the connection is not secured by password or such. For this reason the default interface to listen on is local host and the server socket is only created if explicitly asked for with the start parameter.

        Activity

        Hide
        Felix Meschberger added a comment -

        Implemented control connection support as described in Rev. 771647

        Show
        Felix Meschberger added a comment - Implemented control connection support as described in Rev. 771647
        Hide
        Felix Meschberger added a comment -

        Updated the launchpad documentation at http://cwiki.apache.org/SLING/the-sling-launchpad.html

        Show
        Felix Meschberger added a comment - Updated the launchpad documentation at http://cwiki.apache.org/SLING/the-sling-launchpad.html
        Hide
        Felix Meschberger added a comment -

        -j option prevents MainDelegate from operating. The Main class should probably remove that option from the internal map.

        Reported by Bertrand Delacretaz in http://markmail.org/message/btsfd3an5o5wcf3u

        Show
        Felix Meschberger added a comment - -j option prevents MainDelegate from operating. The Main class should probably remove that option from the internal map. Reported by Bertrand Delacretaz in http://markmail.org/message/btsfd3an5o5wcf3u
        Hide
        Felix Meschberger added a comment -

        Implemented fix in Rev. 771696:

        • -h option support moved to Main class to not clutter usage output with log messages
        • streamlined logging in MainDelegate class
        • Remove all Main specific options (start, stop, status, -j, -h) before calling MainDelagate
        Show
        Felix Meschberger added a comment - Implemented fix in Rev. 771696: -h option support moved to Main class to not clutter usage output with log messages streamlined logging in MainDelegate class Remove all Main specific options (start, stop, status, -j, -h) before calling MainDelagate

          People

          • Assignee:
            Felix Meschberger
            Reporter:
            Felix Meschberger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development