glassfish
  1. glassfish
  2. GLASSFISH-12359

OSGi web console gets bound to 4848 first time and then to 8080 after restart

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: OSGi-JavaEE
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      12,359

      Description

      cd $WS/v3
      cp
      packager/glassfish-osgi-http/target/stage/glassfishv3/glassfish/modules/autostart/osgi-http.jar
      packager/glassfish-osgi-admin-console/target/stage/glassfishv3/glassfish/modules/autostart/*.jar
      $GLASSFISH_HOME/modules/autostart/

      Open http://localhost:8080/osgi/system/console/bundles/
      This does not work. Change port to 4848, it works. Restart server. Just the
      opposite behavior. 8080 works, but 4848 does not.

      There seems to be something wrong with the order in which Apache Felix Web
      console is tracking HTTP Service. I am investigating. For information sake, we
      actually register multiple OSGi/HTTP Service - one for each virtual server. We
      set the service ranking to maximum value for default virtual server.

        Activity

        Hide
        Sanjeeb Sahoo added a comment -

        We need an enhancement to web console. See:

        https://issues.apache.org/jira/browse/FELIX-2240

        Once it is fixed, we can make a configuration like the following available in
        autostart/ dir:
        cat
        /space/ss141213/WS/gf/v3/publish/glassfishv3/glassfish/modules/autostart/org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg
        http.service.filter=VirtualServer=server

        This cfg file has to be part of the packager module containing web console bundle.

        Show
        Sanjeeb Sahoo added a comment - We need an enhancement to web console. See: https://issues.apache.org/jira/browse/FELIX-2240 Once it is fixed, we can make a configuration like the following available in autostart/ dir: cat /space/ss141213/WS/gf/v3/publish/glassfishv3/glassfish/modules/autostart/org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg http.service.filter=VirtualServer=server This cfg file has to be part of the packager module containing web console bundle.
        Hide
        Sanjeeb Sahoo added a comment -

        Although the right way to distribute this would have been to create a
        distribution fragment containing this single cfg file and adding dependency on
        the distribution fragment from osgi-admin-console packager module, I am too lazy
        to do so. So, I am adding this file to Felix distribution fragment. There may be
        a packager change needed for which I will send a note to Snjezana.

        ss141213@Sahoo:/space/ss141213/WS/gf/v3$ svn commit -m "Issue #12359: Tie
        Webconsole to HTTP service on virtual server=server"
        osgi-platforms/felix/src/main/resources/glassfish/modules/autostart/org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg
        Adding
        osgi-platforms/felix/src/main/resources/glassfish/modules/autostart/org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg
        Transmitting file data .
        Committed revision 40200.

        Show
        Sanjeeb Sahoo added a comment - Although the right way to distribute this would have been to create a distribution fragment containing this single cfg file and adding dependency on the distribution fragment from osgi-admin-console packager module, I am too lazy to do so. So, I am adding this file to Felix distribution fragment. There may be a packager change needed for which I will send a note to Snjezana. ss141213@Sahoo:/space/ss141213/WS/gf/v3$ svn commit -m "Issue #12359: Tie Webconsole to HTTP service on virtual server=server" osgi-platforms/felix/src/main/resources/glassfish/modules/autostart/org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg Adding osgi-platforms/felix/src/main/resources/glassfish/modules/autostart/org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg Transmitting file data . Committed revision 40200.
        Hide
        Snjezana Sevo-Zenzerovic added a comment -

        FWIW, required packager changes were limited to setting preserve flag value for
        this configuration file in felix package manifest and this is checked in.

        Show
        Snjezana Sevo-Zenzerovic added a comment - FWIW, required packager changes were limited to setting preserve flag value for this configuration file in felix package manifest and this is checked in.
        Hide
        Sanjeeb Sahoo added a comment -

        This bug may have to be reopened as modules/autostart is no longer a fileinstall monitored dir, hence the config admin file glassfish/modules/autostart/org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg is not taking effect in 3.1.1 and above releases. User has to copy this file to domain1/autodeploy/bundles/ to get desired behavior.

        Show
        Sanjeeb Sahoo added a comment - This bug may have to be reopened as modules/autostart is no longer a fileinstall monitored dir, hence the config admin file glassfish/modules/autostart/org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg is not taking effect in 3.1.1 and above releases. User has to copy this file to domain1/autodeploy/bundles/ to get desired behavior.
        Hide
        Sanjeeb Sahoo added a comment -

        A new bug has been filed as a regression to this issue. See:
        http://java.net/jira/browse/GLASSFISH-18228

        Show
        Sanjeeb Sahoo added a comment - A new bug has been filed as a regression to this issue. See: http://java.net/jira/browse/GLASSFISH-18228

          People

          • Assignee:
            Sanjeeb Sahoo
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: