Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-3470

Fabric Pax-Web port range ignored when creating a child container

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jboss-fuse-6.2.1
    • jboss-fuse-6.1
    • Fabric8 v1
    • None
    • % %
    • Hide

      1. Install Fuse 6.1.1 build 423 (or some later, pre-patch distribution; this problem can't be demonstrated on an installation that requires patching, because we need to create containers before patching, and then it's too late to see the bug)
      2. In the 'default' profile, change the value of org.osgi.service.http.port from its default of

      {port:8181,8281}

      to some different value, e.g.,

      {port:10000,12000}

      3. Create a new child container
      4. Note that the Pax-Web port of the child container is not in the specific range – it is probably 8182 (if the root container had 8181).
      5. Clone the 'default' profile, and in the new profile set a static Pax-Web port, e.g., 10000
      6. Create a new child container based on the clone profile
      7. Note that the new container has a Pax-Web port of 10000.

      Steps 5-7 show that the http.port property is read and used at container-creation time; but only a static, single value is acted on. Note also that if we specific a port range and the numbers are invalid (e.g., not digits) then an exception is thrown when trying to create a container. So the port range seems to be parsed, but then ignored.

      Show
      1. Install Fuse 6.1.1 build 423 (or some later, pre-patch distribution; this problem can't be demonstrated on an installation that requires patching, because we need to create containers before patching, and then it's too late to see the bug) 2. In the 'default' profile, change the value of org.osgi.service.http.port from its default of {port:8181,8281} to some different value, e.g., {port:10000,12000} 3. Create a new child container 4. Note that the Pax-Web port of the child container is not in the specific range – it is probably 8182 (if the root container had 8181). 5. Clone the 'default' profile, and in the new profile set a static Pax-Web port, e.g., 10000 6. Create a new child container based on the clone profile 7. Note that the new container has a Pax-Web port of 10000. Steps 5-7 show that the http.port property is read and used at container-creation time; but only a static, single value is acted on. Note also that if we specific a port range and the numbers are invalid (e.g., not digits) then an exception is thrown when trying to create a container. So the port range seems to be parsed, but then ignored.

      In a newly-created fabric, in the default profile, the default value of

      org.osgi.service.http.port

      is

      ${port:8181,8281}

      I take this to mean that fabric would assign a port in a range within those limits.

      However, if I change this setting to a different range, and then create a child container, I don't get a port in my specified range – I get the next free port after 8181. It seems that the port range is simply ignored.

      If I clone the default profile and assign the new profile to a child container, and then I change the port value to a static number, then the port I specify is used.

      If I clone the default profile and assign the new profile to a child container, and then I change the port value to a range of the form ${port:x,y}, then my settings are not used. However, if I put stupid non-numeric values in for the port numbers, I get an exception in the log, suggesting that the string is at least being parsed.

      In short, it seems that a port range is ignored when creating a child container, where a single static port is accepted.

            yfang@redhat.com Freeman(Yue) Fang
            rhn-support-kboone Kevin Boone
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: