glassfish
  1. glassfish
  2. GLASSFISH-2918

launch link in web app ignore virtual server

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.1pe
    • Fix Version/s: 9.1pe
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      2,918

      Description

      Currently if a web app is deployed only to a specific virtual server, the launch
      link for that web app still uses the DAS in forming the launch link for PE.
      The current semantic for VS in deployment is such that if no virtual server is
      specified, then it means the deployment applies to ALL VS.
      If VS is specified, it will only deploy to the specified VS.
      So, if you create a VS, and then deploy only to this new VS, the launch link
      still uses the host name in forming the URL, thus, it won't work. user gets a
      404 error.

      Besides fixing the launch link, we should also show the VS in the application
      edit screen for PE. otherwise, user has no idea which VS this app is deployed to.

      1. domain.xml
        23 kB
        cchidamb
      2. hosts
        0.3 kB
        cchidamb

        Activity

        Hide
        cchidamb added a comment -

        Created an attachment (id=974)
        domain.xml

        Show
        cchidamb added a comment - Created an attachment (id=974) domain.xml
        Hide
        cchidamb added a comment -

        Created an attachment (id=975)
        hosts file

        Show
        cchidamb added a comment - Created an attachment (id=975) hosts file
        Hide
        cchidamb added a comment -

        Jan,
        You might have seen the emails I, and Sankar sent to you. I'm assigning this
        issue to you for now. If you think there is something wrong either in my
        /etc/hosts file, or domain.xml, pls let me know. I'm attaching my /etc/hosts,
        and domain.xml with this, please look at the app hello associated to VS
        testapp.com in domain.xml. I tried changing <http-listener acceptor-threads="1"
        address="127.0.1.2" to address="0.0.0.0", still getting 404. telnet with host
        header testapp.com returns 404 as well.

        Show
        cchidamb added a comment - Jan, You might have seen the emails I, and Sankar sent to you. I'm assigning this issue to you for now. If you think there is something wrong either in my /etc/hosts file, or domain.xml, pls let me know. I'm attaching my /etc/hosts, and domain.xml with this, please look at the app hello associated to VS testapp.com in domain.xml. I tried changing <http-listener acceptor-threads="1" address="127.0.1.2" to address="0.0.0.0", still getting 404. telnet with host header testapp.com returns 404 as well.
        Hide
        jluehe added a comment -

        Your domain.xml contains these virtual-server entries:

        <virtual-server hosts="vshost" id="newvs"
        log-file="$

        {com.sun.aas.instanceRoot}/logs/server.log" state="on">
        ...
        </virtual-server>
        <virtual-server hosts="127.0.1.2" id="testapp.com"
        log-file="${com.sun.aas.instanceRoot}

        /logs/server.log" state="on">
        ...
        </virtual-server>

        Notice how neither entry specifies any http-listeners attribute. This
        means that none of the HTTP listeners know anything about the virtual
        servers you added (since your virtual servers are also not referenced
        as the default-virtual-server from any of the HTTP listeners).

        In this case, a 404 is expected.

        Show
        jluehe added a comment - Your domain.xml contains these virtual-server entries: <virtual-server hosts="vshost" id="newvs" log-file="$ {com.sun.aas.instanceRoot}/logs/server.log" state="on"> ... </virtual-server> <virtual-server hosts="127.0.1.2" id="testapp.com" log-file="${com.sun.aas.instanceRoot} /logs/server.log" state="on"> ... </virtual-server> Notice how neither entry specifies any http-listeners attribute. This means that none of the HTTP listeners know anything about the virtual servers you added (since your virtual servers are also not referenced as the default-virtual-server from any of the HTTP listeners). In this case, a 404 is expected.
        Hide
        cchidamb added a comment -

        http-listeners is not a required attribute for VS. The description in DTD for
        http-listeners attribute in VS says, it is required only if the VS is not a
        default VS, but the check is not enforced strictly during VS creation, meaning
        you can create a VS without any listeners specified (which is not a default VS
        also, bcz we're creating it for the first time), then associate it to a deployed
        app. Now when you hit the app, it's going to return 404. I would say we should
        make it available on all listeners if the none is specified.

        Anyway I discussed with Anissa, there are two issues here, one is the launch
        link, and another is using listbox for VS configuration during deployment. This
        issue is addressed, and I've some questions to be answered in launch link. I'll
        mark this issue as fixed, and open another issue specific to launch link.

        Show
        cchidamb added a comment - http-listeners is not a required attribute for VS. The description in DTD for http-listeners attribute in VS says, it is required only if the VS is not a default VS, but the check is not enforced strictly during VS creation, meaning you can create a VS without any listeners specified (which is not a default VS also, bcz we're creating it for the first time), then associate it to a deployed app. Now when you hit the app, it's going to return 404. I would say we should make it available on all listeners if the none is specified. Anyway I discussed with Anissa, there are two issues here, one is the launch link, and another is using listbox for VS configuration during deployment. This issue is addressed, and I've some questions to be answered in launch link. I'll mark this issue as fixed, and open another issue specific to launch link.

          People

          • Assignee:
            cchidamb
            Reporter:
            Anissa Lam
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: