Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2772

setting http.port=-1 should disable service rather than throw exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • http-2.0.4
    • http-2.2.0
    • HTTP Service
    • None

    Description

      I want to stop http.jetty from starting automatically, as I want to ensure the correct port is first explicitly configured using config admin.

      I can currently do this by setting org.apache.felix.http.enable=false, but this then complicates starting the service, as I have to set both http.enable=true and http.port=PORT

      It would be useful if setting http.port=-1 effectively disabled the service, then just by using config admin to set a valid port the service would start. Currently setting http.port=-1 results in the following exception:

      [WARNING] failed SelectChannelConnector@0.0.0.0:-1: java.lang.IllegalArgumentException: port out of range:-1
      [WARNING] failed Server@1f195fc: java.lang.IllegalArgumentException: port out of range:-1

      [ERROR] Exception while initializing Jetty.
      java.lang.IllegalArgumentException: port out of range:-1
      at java.net.InetSocketAddress.<init>(InetSocketAddress.java:83)

      The Equinox http service is disabled if http.port=-1

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            db82407 Derek Baum
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: