Details

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

      Operating System: Linux
      Platform: Linux

    • Issuezilla Id:
      11,539

      Description

      When accessing a web service using basic authentication over HTTPS glassfish
      seems to leak sockets, which in turn leads to a crash because of too many open
      files. When running lsof -p [pid of the glassfish process] we see a lot of rows
      like this:

      java 18737 user 415u sock 0,4 1262098 can't identify protocol
      java 18737 user 416u sock 0,4 1262099 can't identify protocol
      java 18737 user 417u sock 0,4 1262100 can't identify protocol

      If we run the same web service using only HTTP then there is no socket leak.

      We have reproduced this with this web service:

      @Stateless
      @WebService(serviceName = "test")
      @RolesAllowed("customer")
      public class TestApi {
      @WebMethod(action="sayHello")
      public String sayHello(String str)

      { return "Hello " + str; }

      }

      This is the sun-ejb-jar.xml
      [...]
      <sun-ejb-jar>
      <security-role-mapping>
      <role-name>customer</role-name>
      <group-name>customer</group-name>
      </security-role-mapping>
      <enterprise-beans>
      <ejb>
      <ejb-name>TestApi</ejb-name>
      <webservice-endpoint>
      <port-component-name>TestApi</port-component-name>
      <transport-guarantee>CONFIDENTIAL</transport-guarantee>
      <login-config>
      <auth-method>BASIC</auth-method>
      <realm>file</realm>
      </login-config>
      </webservice-endpoint>
      </ejb>
      </enterprise-beans>
      </sun-ejb-jar>

        Activity

        Hide
        kumarjayanti added a comment -

        Thanks for the steps.

        Can you also help us by telling whether the problem occurs on V3.0.1

        http://dlc.sun.com.edgesuite.net/glassfish/v3.0.1/promoted/

        Also can you run netstat to see the socket(s) state.

        Show
        kumarjayanti added a comment - Thanks for the steps. Can you also help us by telling whether the problem occurs on V3.0.1 http://dlc.sun.com.edgesuite.net/glassfish/v3.0.1/promoted/ Also can you run netstat to see the socket(s) state.
        Hide
        a1ex07 added a comment -

        Netstat results :
        While the client script is being executed, netstat -aen -o|grep 8181 shows
        Proto Recv-Q Send-Q Local Address Foreign Address State
        User Inode Timer
        tcp6 0 0 :::8181 :::* LISTEN
        106 5806384 off (0.00/0/0)
        tcp6 0 0 appserver_host:8181 client_host:50234
        ESTABLISHED 106 5897195 off (0.00/0/0)
        tcp6 0 0 appserver_host:8181 client_host:50233
        CLOSE_WAIT 106 5897186 off (0.00/0/0)

        In a few seconds, only the first line remains:

        tcp6 0 0 :::8181 :::* LISTEN
        106 5806384 off (0.00/0/0)

        I haven't tried v.3.0.1 yet, I'll do it soon and let you know the results.

        Show
        a1ex07 added a comment - Netstat results : While the client script is being executed, netstat -aen -o|grep 8181 shows Proto Recv-Q Send-Q Local Address Foreign Address State User Inode Timer tcp6 0 0 :::8181 :::* LISTEN 106 5806384 off (0.00/0/0) tcp6 0 0 appserver_host:8181 client_host:50234 ESTABLISHED 106 5897195 off (0.00/0/0) tcp6 0 0 appserver_host:8181 client_host:50233 CLOSE_WAIT 106 5897186 off (0.00/0/0) In a few seconds, only the first line remains: tcp6 0 0 :::8181 :::* LISTEN 106 5806384 off (0.00/0/0) I haven't tried v.3.0.1 yet, I'll do it soon and let you know the results.
        Hide
        a1ex07 added a comment -

        I've just tried it with glassfish-3.0.1-b20. I cannot reproduce the bug anymore;
        it seems to be fixed. lsof shows that sockets get released. Thanks a lot.

        Could you also tell when the release of Glassfish 3.1 is planned? Or maybe you can
        include the fix to one of the Glassfish 3 updates?

        Thanks once again.

        Show
        a1ex07 added a comment - I've just tried it with glassfish-3.0.1-b20. I cannot reproduce the bug anymore; it seems to be fixed. lsof shows that sockets get released. Thanks a lot. Could you also tell when the release of Glassfish 3.1 is planned? Or maybe you can include the fix to one of the Glassfish 3 updates? Thanks once again.
        Show
        Dhiru Pandey added a comment - Draft schedule for GlassFish 3.0.1 at: http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishV3Schedule#section-GlassFishV3Schedule-GlassFishServerOpenSourceEdition3.0.1 Draft schedule for GlassFish 3.1 at: http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishV3Schedule#section-GlassFishV3Schedule-GlassFishServerOpenSourceEdition3.1
        Hide
        kumarjayanti added a comment -

        closing

        Show
        kumarjayanti added a comment - closing

          People

          • Assignee:
            kumarjayanti
            Reporter:
            pdervall
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: