Welcome! Log In Create A New Profile

Advanced

Tomcat EOFException when nginx is Reverse Proxy for WebSockets

Igal @ Lucee.org
March 21, 2017 02:42AM
I am getting an EOFException after a couple of minutes when connecting
via nginx that acts as reverse proxy.

I am running Windows 2008R2 server, with Tomcat 8.5.12, and nginx 1.11.10

When connecting directly to Tomcat I do not see this issue, but direct
connection is locally (i.e. network connection is not a factor) while
connection via nginx goes over the internet.

My nginx config is as follows:

## WebSocket begin
location /ws/ {

proxy_pass http://lucee_servers_81xx;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
## WebSocket end

Java Stack Trace: java.io.EOFException
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1228)
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1168)
org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:63)
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1441)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)

Any ideas?

I will post a similar question to the Tomcat mailing list. Thanks!
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Tomcat EOFException when nginx is Reverse Proxy for WebSockets

Igal @ Lucee.org March 21, 2017 02:42AM

Re: Tomcat EOFException when nginx is Reverse Proxy for WebSockets

itpp2012 March 21, 2017 03:18AM

Re: Tomcat EOFException when nginx is Reverse Proxy for WebSockets

Igal @ Lucee.org March 21, 2017 04:38AM

Re: Tomcat EOFException when nginx is Reverse Proxy for WebSockets

Reinis Rozitis March 21, 2017 05:34AM

Re: Tomcat EOFException when nginx is Reverse Proxy for WebSockets

Igal @ Lucee.org March 21, 2017 06:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 212
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready