You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christof Doll <ch...@fortis-it.de> on 2012/09/04 09:13:44 UTC

Atmosphere Chat sample throws exception upon page reload in IE 9

Hi,

I would like to use the Atmosphere framework which supports websockets and long-polling. On their page they have a little chat application exampIe that is based on Guice (see attachment). I run it on Tomcat 7. Loading the chat page in IE 9 works fine. However, upon reloading the page there is a tomcat exception (see stacktrace). This problem only occurs in IE9. Using Firefox, the page can be reloaded without server side exceptions.


Sep 04, 2012 8:49:28 AM org.apache.catalina.core.AprLifecycleListener init
Information: Loaded APR based Apache Tomcat Native library 1.1.24 using APR version 1.4.6.
Sep 04, 2012 8:49:28 AM org.apache.catalina.core.AprLifecycleListener init
Information: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Sep 04, 2012 8:49:30 AM org.apache.catalina.core.AprLifecycleListener initializeSSL
Information: OpenSSL successfully initialized (OpenSSL 1.0.1c 10 May 2012)
Sep 04, 2012 8:49:30 AM org.apache.coyote.AbstractProtocol init
Information: Initializing ProtocolHandler ["http-apr-8080"]
Sep 04, 2012 8:49:30 AM org.apache.coyote.AbstractProtocol init
Information: Initializing ProtocolHandler ["ajp-apr-8009"]
Sep 04, 2012 8:49:30 AM org.apache.catalina.startup.Catalina load
Information: Initialization processed in 1930 ms
Sep 04, 2012 8:49:30 AM org.apache.catalina.core.StandardService startInternal
Information: Starting service Catalina
Sep 04, 2012 8:49:30 AM org.apache.catalina.core.StandardEngine startInternal
Information: Starting Servlet Engine: Apache Tomcat/7.0.29
Sep 04, 2012 8:49:30 AM org.apache.catalina.startup.HostConfig deployDescriptor
Information: Deploying configuration descriptor C:\Users\Anna Fohlmeister\.IntelliJIdea11\system\tomcat\Unnamed_atmosphere-guice-chat\conf\Catalina\localhost\ROOT.xml
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Sep 04, 2012 8:49:33 AM com.sun.jersey.api.core.PackagesResourceConfig init
Information: Scanning for root resource and provider classes in the packages:
  org.atmosphere.samples.guice
Sep 04, 2012 8:49:33 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses
Information: Root resource classes found:
  class org.atmosphere.samples.guice.ResourceChat
Sep 04, 2012 8:49:33 AM com.sun.jersey.api.core.ScanningResourceConfig init
Information: No provider classes found.
Sep 04, 2012 8:49:33 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
Information: Registering org.atmosphere.samples.guice.ResourceChat as a root resource class
Sep 04, 2012 8:49:33 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
Information: Initiating Jersey application, version 'Jersey: 1.13 06/29/2012 05:14 PM'
Sep 04, 2012 8:49:33 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
Information: Adding the following classes declared in META-INF/services/jersey-server-components to the resource configuration:
  class org.atmosphere.jersey.AtmosphereResourceConfigurator
Sep 04, 2012 8:49:34 AM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
Information: Binding org.atmosphere.samples.guice.ResourceChat to GuiceManagedComponentProvider with the scope "PerRequest"
Sep 04, 2012 8:49:34 AM org.apache.coyote.AbstractProtocol start
Information: Starting ProtocolHandler ["http-apr-8080"]
Sep 04, 2012 8:49:34 AM org.apache.coyote.AbstractProtocol start
Information: Starting ProtocolHandler ["ajp-apr-8009"]
Sep 04, 2012 8:49:34 AM org.apache.catalina.startup.Catalina start
Information: Server startup in 4422 ms
Sep 04, 2012 8:50:39 AM org.apache.catalina.connector.CoyoteAdapter event
Schwerwiegend: null
org.apache.tomcat.jni.Error: 620015: APR does not understand this error code
                at org.apache.tomcat.jni.Socket.recvbb(Native Method)
                at org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:575)
                at org.apache.coyote.http11.InternalAprInputBuffer$SocketInputBuffer.doRead(InternalAprInputBuffer.java:642)
                at org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuffer.java:532)
                at org.apache.coyote.Request.doRead(Request.java:422)
                at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290)
                at org.apache.catalina.connector.Request.read(Request.java:555)
                at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:166)
                at org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:133)
                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:581)
                at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(Thread.java:722)

Sep 04, 2012 8:50:39 AM org.apache.coyote.http11.Http11AprProcessor event
Schwerwiegend: Error processing request
java.lang.NullPointerException
                at org.apache.coyote.http11.Http11AprProcessor.actionInternal(Http11AprProcessor.java:277)
                at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:846)
                at org.apache.coyote.Request.action(Request.java:346)
                at org.apache.catalina.connector.Request.getRemoteAddr(Request.java:1281)
                at org.apache.catalina.connector.Request.getRemoteHost(Request.java:1296)
                at org.apache.catalina.valves.AccessLogValve$HostElement.addElement(AccessLogValve.java:1327)
                at org.apache.catalina.valves.AccessLogValve.log(AccessLogValve.java:953)
                at org.apache.catalina.core.AccessLogAdapter.log(AccessLogAdapter.java:51)
                at org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1263)
                at org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1270)
                at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:250)
                at org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:133)
                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:581)
                at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(Thread.java:722)

Sep 04, 2012 8:50:39 AM org.apache.catalina.connector.CoyoteAdapter log
Warnung: Exception while attempting to add an entry to the access log
java.lang.NullPointerException
                at org.apache.coyote.http11.Http11AprProcessor.actionInternal(Http11AprProcessor.java:277)
                at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:846)
                at org.apache.coyote.Request.action(Request.java:346)
                at org.apache.catalina.connector.Request.getRemoteAddr(Request.java:1281)
                at org.apache.catalina.connector.Request.getRemoteHost(Request.java:1296)
                at org.apache.catalina.valves.AccessLogValve$HostElement.addElement(AccessLogValve.java:1327)
                at org.apache.catalina.valves.AccessLogValve.log(AccessLogValve.java:953)
                at org.apache.catalina.core.AccessLogAdapter.log(AccessLogAdapter.java:51)
                at org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1263)
                at org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1270)
                at org.apache.catalina.connector.CoyoteAdapter.log(CoyoteAdapter.java:502)
                at org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:141)
                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:581)
                at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(Thread.java:722)


Do you have any ideas how to solve this bug?

Best regards,
Christof



Re: Atmosphere Chat sample throws exception upon page reload in IE 9

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/9/4 Christof Doll <ch...@fortis-it.de>:
>

There are two different issues:

> Sep 04, 2012 8:50:39 AM org.apache.catalina.connector.CoyoteAdapter event
>
> Schwerwiegend: null
>
> org.apache.tomcat.jni.Error: 620015: APR does not understand this error code
>
>                 at org.apache.tomcat.jni.Socket.recvbb(Native Method)

1) Issue in Tomcat-Native (1.1.24) or in APR library it uses (1.4.6)

I do not know what it actually is.
I guess it does not understand some error code from OS. It would be
nice to know what that code actually means.

>
>                 at
> org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:575)
>
>                 at
> org.apache.coyote.http11.InternalAprInputBuffer$SocketInputBuffer.doRead(InternalAprInputBuffer.java:642)
>
>                 at
> org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuffer.java:532)
>
>                 at org.apache.coyote.Request.doRead(Request.java:422)
>
>                 at
> org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290)
>
>                 at
> org.apache.catalina.connector.Request.read(Request.java:555)
>
>                 at
> org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:166)
>
>                 at
> org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:133)
>
>                 at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:581)
>
>                 at
> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
>
>                 at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>
>                 at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>
>                 at java.lang.Thread.run(Thread.java:722)
>
>
>
> Sep 04, 2012 8:50:39 AM org.apache.coyote.http11.Http11AprProcessor event
>
> Schwerwiegend: Error processing request
>
> java.lang.NullPointerException
>
>                 at
> org.apache.coyote.http11.Http11AprProcessor.actionInternal(Http11AprProcessor.java:277)
>
>                 at
> org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:846)
>
>                 at org.apache.coyote.Request.action(Request.java:346)
>
>                 at
> org.apache.catalina.connector.Request.getRemoteAddr(Request.java:1281)
>
>                 at
> org.apache.catalina.connector.Request.getRemoteHost(Request.java:1296)
>
>                 at
> org.apache.catalina.valves.AccessLogValve$HostElement.addElement(AccessLogValve.java:1327)


2) An NPE when trying to get remote host address to write it into the
access log file. Tomcat has to ask the address on the socket.

It fails probably because the socket is already closed.

>                 at
> org.apache.catalina.valves.AccessLogValve.log(AccessLogValve.java:953)
>
>                 at
> org.apache.catalina.core.AccessLogAdapter.log(AccessLogAdapter.java:51)
>
>                 at
> org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1263)
>
>                 at
> org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1270)
>
>                 at
> org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:250)
>
>                 at
> org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:133)
>
>                 at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:581)
>
>                 at
> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
>
>                 at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>
>                 at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>
>                 at java.lang.Thread.run(Thread.java:722)
>
>  (...)
>
>
> Do you have any ideas how to solve this bug?
>

3) Looking into bugzilla, there is known issue in 7.0.29
https://issues.apache.org/bugzilla/show_bug.cgi?id=53697

Can you re-test this with 7.0.30?
There is download link in the VOTE thread on the dev mailing list.

If the problem persists, you may file an issue.
Please provide configuration and steps to reproduce it.

4). You may want to try running with Nio connector implementation
instead of APR one.
Maybe that one will behave better / differently.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org