glassfish
  1. glassfish
  2. GLASSFISH-20681

TimeoutException when delivering static web sites

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: 4.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      • Glassfish V4.0.1 B01
      • JDK V1.7.0_25 x64
      • Windows 2008R2

      Description

      GF needs a long time to deliver some static files and throws timeout-exceptions.

      Stacktrace:

      [2013-06-27T19:58:07.615+0200] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=21 _ThreadName=http-listener-1(4)] [timeMillis: 1372355887615] [levelValue: 900] [[
        StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
      java.io.IOException: java.util.concurrent.TimeoutException
      	at org.glassfish.grizzly.utils.Exceptions.makeIOException(Exceptions.java:81)
      	at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:958)
      	at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:682)
      	at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
      	at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
      	at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
      	at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:2069)
      	at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1092)
      	at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:518)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
      	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
      	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
      	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
      	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
      	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
      	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.util.concurrent.TimeoutException
      	at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:951)
      	... 36 more
      ]]
      

      Steps to reproduce the issue:

      1.) Set up a Win2008R2 Server

      2.) Install JDK 1.7.0_25 x64

      3.) Download the file http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/promoted/glassfish-4.0.1-b01.zip

      4.) Unzip the downloaded zip file to "c:\". This will result in a new folder "c:\glassfish4".

      5.) Download the file http://eching-feg.de/docroot.zip

      6.) The downloaded zip file contains a folder "docroot". Please replace the folder "c:\glassfish4\glassfish\domains\domain1\docroot" with the "docroot" folder from the zip file. After this step, you should have a folder "c:\glassfish4\glassfish\domains\domain1\docroot\ui".

      7.) open a command shlell (cmd.exe)

      8.) In the command shell, go to the folder "c:\glassfish4\glassfish\bin".

      9.) In the command shell, start glassfish with the command "startserv"

      10.) After glassfish has finished his startup process, open a web browser and go to http://127.0.0.1:4848/ and wait until the page has loaded

      11.) Check that there is a new Folder "generated" in the folder "C:\glassfish4\glassfish\domains\domain1" and that the folder "C:\glassfish4\glassfish\domains\domain1\config" contains a file ".consolestate".

      12.) Open http://127.0.0.1:8080/ui/index.html in your web browser

      13.) Clear your browser cache

      14.) reload the webpage from step 12

      15.) now you will see, that it takes a long time (up to one minute) to load the web page

      16.) After the page has loaded, you will see multiple timeoutexceptions in the console window.

        Activity

        Hide
        Ryan Lubke added a comment -

        Integrated Grizzly 2.3.7 into the 4.0.1 line. Should be available in the latest promoted builds.

        Show
        Ryan Lubke added a comment - Integrated Grizzly 2.3.7 into the 4.0.1 line. Should be available in the latest promoted builds.
        Hide
        wherisat added a comment -

        FWIW the patch worked for me and I don't see any exceptions out of the ordinary. I am using JDK 1.7_40 on win7 64-bit. Thank you so much!!!!

        Show
        wherisat added a comment - FWIW the patch worked for me and I don't see any exceptions out of the ordinary. I am using JDK 1.7_40 on win7 64-bit. Thank you so much!!!!
        Hide
        Ryan Lubke added a comment -

        I am seeing a new exception for:

        java.lang.ClassNotFoundException: com.sun.enterprise.security.Audit

        However, just after that it says "SEC1011: Security Service(s) started Successfully."

        Hmm, all the patch does is integrate a new version of Grizzly - no GF4 code is modified. Not sure what the relation is. Might be worth logging a new issue.

        I am running JDK1.7.0_40. Is this the right JDK?

        Should be fine. Though _45 was released this week.

        Also, will this patch be backported to the GlassFish 4.0 Community Edition? Currently it is on Build 89.

        I'm not sure what the current patch plans are for 4.0. So for the time being, you'll have to use this patch. If you have a support contract, I'm sure something more official would be offered.

        Show
        Ryan Lubke added a comment - I am seeing a new exception for: java.lang.ClassNotFoundException: com.sun.enterprise.security.Audit However, just after that it says "SEC1011: Security Service(s) started Successfully." Hmm, all the patch does is integrate a new version of Grizzly - no GF4 code is modified. Not sure what the relation is. Might be worth logging a new issue. I am running JDK1.7.0_40. Is this the right JDK? Should be fine. Though _45 was released this week. Also, will this patch be backported to the GlassFish 4.0 Community Edition? Currently it is on Build 89. I'm not sure what the current patch plans are for 4.0. So for the time being, you'll have to use this patch. If you have a support contract, I'm sure something more official would be offered.
        Hide
        bw22942 added a comment - - edited

        Yes! This works.

        I am seeing a new exception for:

        java.lang.ClassNotFoundException: com.sun.enterprise.security.Audit

        However, just after that it says "SEC1011: Security Service(s) started Successfully."

        I am running JDK1.7.0_40. Is this the right JDK?

        Also, will this patch be backported to the GlassFish 4.0 Community Edition? Currently it is on Build 89.

        I also have the same problem, I get the login screen and after trying to login, the browser times out. I have secure-admin enabled along with weak ciphers removed.

        Show
        bw22942 added a comment - - edited Yes! This works. I am seeing a new exception for: java.lang.ClassNotFoundException: com.sun.enterprise.security.Audit However, just after that it says "SEC1011: Security Service(s) started Successfully." I am running JDK1.7.0_40. Is this the right JDK? Also, will this patch be backported to the GlassFish 4.0 Community Edition? Currently it is on Build 89. – I also have the same problem, I get the login screen and after trying to login, the browser times out. I have secure-admin enabled along with weak ciphers removed.
        Hide
        Ryan Lubke added a comment - - edited

        Most likely used the wrong GF4 build (too many versions lying around). Uploaded a new patch with the proper version. Do clear out the osgi-cache before restarting the domain after putting the new jar in place.

        md5sums and shasums below.

        [595][catsnac.gonzo: /Users/catsnac]$ md5sum nucleus-grizzly-all.jar
        e8c22fc804f2b71210a208acd4c08abe nucleus-grizzly-all.jar

        [596][catsnac.gonzo: /Users/catsnac]$ shasum nucleus-grizzly-all.jar
        277d9a888ca8222fa6e448571979955cff5a5a43 nucleus-grizzly-all.jar

        Show
        Ryan Lubke added a comment - - edited Most likely used the wrong GF4 build (too many versions lying around). Uploaded a new patch with the proper version. Do clear out the osgi-cache before restarting the domain after putting the new jar in place. md5sums and shasums below. [595] [catsnac.gonzo: /Users/catsnac] $ md5sum nucleus-grizzly-all.jar e8c22fc804f2b71210a208acd4c08abe nucleus-grizzly-all.jar [596] [catsnac.gonzo: /Users/catsnac] $ shasum nucleus-grizzly-all.jar 277d9a888ca8222fa6e448571979955cff5a5a43 nucleus-grizzly-all.jar

          People

          • Assignee:
            Ryan Lubke
            Reporter:
            Wasomumba
          • Votes:
            8 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: