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:
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:
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:
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:
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:
3. remove hard coded port configuration from the apache-felix-karaf-1.4.0-fuse-01-00-features.xml: