Uploaded image for project: 'FUSE ESB'
  1. FUSE ESB
  2. ESB-1197

The "org.osgi.service.http.port" in "etc\system.properties" is ignored

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 4.2.0-fuse-01-00
    • Component/s: None
    • Labels:
      None

      Description

      The "org.osgi.service.http.port" in "etc\system.properties" is ignored. It does not have any effect at all. There is one way to change Pax Web HTTP port by creating a "etc\org.ops4j.pax.web.cfg" file and configure "org.osgi.service.http.port" in the new file like:

      org.osgi.service.http.port=8080

      However, It only works the second time when we start Fuse ESB. The Pax Web Http listening port is aways on default 8181 in the first time when I start Fuse ESB even with the new file "etc\org.ops4j.pax.web.cfg" created.

      Here is instruction to reproduce the behaviour:
      1. Extract the FUSE ESB 4.2 zip file into a new location;
      2. create a "etc\org.ops4j.pax.web.cfg" file and add following line:

      org.osgi.service.http.port=8080

      3. start the Fuse ESB by "bin\karaf".

      You will see that the http port is still on default 8181. If you restart the Fuse ESB, the http port will change to 8080 that is configured in "etc\org.ops4j.pax.web.cfg".

      Here is Felix Karaf features.xml file for "http" feature:

      <feature name="http" version="1.4.0-fuse-01-00">
      <config name="org.ops4j.pax.web">
      org.osgi.service.http.port=8181
      </config>
      <bundle>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2</bundle>
      <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jetty-bundle/6.1.22_1</bundle>
      <bundle>mvn:org.ops4j.pax.web/pax-web-api/0.7.2</bundle>
      <bundle>mvn:org.ops4j.pax.web/pax-web-spi/0.7.2</bundle>
      <bundle>mvn:org.ops4j.pax.web/pax-web-runtime/0.7.2</bundle>
      <bundle>mvn:org.ops4j.pax.web/pax-web-jetty/0.7.2</bundle>
      </feature>

      It looks like hard coded "org.osgi.service.http.port=8181" in Felix Karaf somehow overwrite configuration from "etc\xxx" when it is deployed. Only restart of Fuse ESB will make the configuration from "etc\xxx" works.

      Here is a suggested fix:
      1. remove two lines from "etc\system.properties" file as the port configuration in this file does not make any difference:

      # Default port for the OSGI HTTP Service
      org.osgi.service.http.port=8181

      This step is optional but it would reduce confusion caused to users.

      2. create a new "etc\org.ops4j.pax.web.cfg" file and add two lines in this file:

      # Default port for the OSGI HTTP Service
      org.osgi.service.http.port=8181

      3. remove hard coded port configuration from the apache-felix-karaf-1.4.0-fuse-01-00-features.xml:

      <feature name="http" version="1.4.0-fuse-01-00">
      <bundle>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2</bundle>
      <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jetty-bundle/6.1.22_1</bundle>
      <bundle>mvn:org.ops4j.pax.web/pax-web-api/0.7.2</bundle>
      <bundle>mvn:org.ops4j.pax.web/pax-web-spi/0.7.2</bundle>
      <bundle>mvn:org.ops4j.pax.web/pax-web-runtime/0.7.2</bundle>
      <bundle>mvn:org.ops4j.pax.web/pax-web-jetty/0.7.2</bundle>
      </feature>

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gnodet Guillaume Nodet
                Reporter:
                joe.luo Joe Luo
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: