Geeting org.atmosphere.container.JSR356Endpoint.onError Error

Hi I’m getting the below error in production, I think this is something related with Websockets, did you face any king of this issue ? any idea.

PS: Using nginx as proxy

`
2017-01-04 09:45:51.267 DEBUG [http-nio-8080-exec-4/app/anonymous] com.haulmont.cuba.web.AbstractConnection - Logged in: user=anonymous, ip=127.0.0.1 clientInfo=Web (localhost:8080/app) Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
04-Jan-2017 09:45:52.585 INFO [http-nio-8080-exec-1] com.vaadin.server.communication.PushHandler.connectionLost No UI was found based on data in the request, but a slower lookup based on the AtmosphereResource succeeded. See http://dev.vaadin.com/ticket/14251 for more details.
04-Jan-2017 09:46:24.557 SEVERE [http-nio-8080-exec-1] org.atmosphere.container.JSR356Endpoint.onError 
 java.io.EOFException
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1224)
	at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1164)
	at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:62)
	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
	at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

04-Jan-2017 09:46:24.558 INFO [http-nio-8080-exec-1] com.vaadin.server.communication.PushHandler.connectionLost No UI was found based on data in the request, but a slower lookup based on the AtmosphereResource succeeded. See http://dev.vaadin.com/ticket/14251 for more details.

`

1 Like

Hi,

According to https://github.com/vaadin/framework/issues/5449 it is completely normal message that is occurred when user refreshes page using F5 key.

Also for NGINX I recommend to use following configuration:


location / {
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_read_timeout     3600;
    proxy_connect_timeout  240;
    proxy_set_header Host $host;
    proxy_set_header X-RealIP $remote_addr;

    proxy_pass http://127.0.0.1:8080/;
    proxy_set_header X-Forwarded-Proto $scheme;

    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

See also: https://doc.cuba-platform.com/manual-6.3/server_push_settings.html

Hi,

I added nginx configuration as recommended but still having the same SEVERE message : this is happening without refreshing with F5 key, the error throws every minute constantly.

In Chrome console I see


vaadinPush.js?v2017_01_06_09_53:26 Websocket closed, wasClean: false
log @ vaadinPush.js?v2017_01_06_09_53:26
warn @ vaadinPush.js?v2017_01_06_09_53:26
at.onclose @ vaadinPush.js?v2017_01_06_09_53:26 

Do you have the same error/war message in your cuba apps ? (using nginx as proxy)

Hi,

Do you have any additional proxies between client and server? What application server do you use?

As workaround you can try to use another Push strategy - long polling, set cuba.web.pushLongPolling application property to true to turn it on.

Hi Yuriy,

I’m using ELB AWS as well, maybe the issue is coming from there.

We have not yet tested WebSocket with Amazon ELB, but it seems that you have to configure its Proxy Protocol: https://blog.jverkamp.com/2015/07/20/configuring-websockets-behind-an-aws-elb/

We have the exact same issue, running Vaadin 7.7.6 and Spring on a Tomcat 8.5.3 w/ an Nginx proxy on a Jelastic PaaS.

For us it seems to be related to when a tab/UI is closed and then, after three heartbeats are missed, UI.detach() is called. At the same time, we get the Atmosphere error. For me, the “official” explanation is not OK, I don’t want to have severe warnings in my logs. There’s a lot of them since it’s basically one for every logged in user.

Have you found a workaround?

Hi,

In the new version of Atmosphere logging level has been decreased to debug: https://github.com/vaadin/atmosphere/blob/master/modules/runtime/src/main/java/org/atmosphere/container/JSR356Endpoint.java#L305

We are going do do the same thing in our Vaadin fork, so our users will not see this error in the future on ERROR level.

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/PL-8897