Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hitting Knox Gateway ERROR : Unable to connect to websocket server: java.io.IOException: Timeout while performing WebSocket Upgrade

Hitting Knox Gateway ERROR : Unable to connect to websocket server: java.io.IOException: Timeout while performing WebSocket Upgrade

We are on HDP 2.6.5 and while using Knox gateway to send requests to create multiple kernels via theJEG I am hitting an error in the gateway.log.

I have used the suggestions given here and it improved the situation.

https://community.hortonworks.com/content/supportkb/153880/hive-connection-through-knox-disconnects-...

After using the suggestion I am still hitting the issue but the issue now occurs when I DON'T keep a sleep-time (ranging between 3 to 15) seconds and send continuous kernel creation requests.

Note : When I put the sleep time (ranging between 3 to 15) seconds between my requests.Knox Gateway is able to handle it gracefully with 98% success.

In gateway.log in erratic condition I observe this

Unable to connect to websocket server: java.io.IOException: Timeout while performing WebSocket Upgrade
1305 2018-10-03 17:07:23,449 DEBUG client.WebSocketClient (WebSocketClient.java:doStop(266)) - Stopping org.eclipse.jetty.websocket.client.WebSocketClient@4f329bc9
11306 2018-10-03 17:07:23,449 DEBUG component.AbstractLifeCycle (AbstractLifeCycle.java:setStopping(194)) - stopping org.eclipse.jetty.websocket.client.io.ConnectionManager@743f8f5a
11307 2018-10-03 17:07:23,449 ERROR gateway.websockets (ProxyWebSocketAdapter.java:onWebSocketConnect(93)) - Unable to connect to websocket server: java.io.IOException: Timeout while performing WebSocket Upgrade
11308 java.io.IOException: Timeout while performing WebSocket Upgrade
11309 at org.eclipse.jetty.websocket.client.io.UpgradeConnection.onReadTimeout(UpgradeConnection.java:201)
11310 at org.eclipse.jetty.io.AbstractConnection.onFillInterestedFailed(AbstractConnection.java:173)
11311 at org.eclipse.jetty.io.AbstractConnection$ReadCallback$1.run(AbstractConnection.java:586)
11312 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
11313 at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
11314 at java.lang.Thread.run(Thread.java:745)
11315 2018-10-03 17:07:23,449 DEBUG component.AbstractLifeCycle (AbstractLifeCycle.java:setStopping(194)) - stopping org.eclipse.jetty.websocket.client.io.WebSocketClientSelectorManager@140618c2
11316 2018-10-03 17:07:23,449 DEBUG component.AbstractLifeCycle (AbstractLifeCycle.java:setStopping(194)) - stopping org.eclipse.jetty.io.SelectorManager$ManagedSelector@dcef46f keys=1 selected=0
11317 2018-10-03 17:07:23,449 DEBUG io.SelectorManager (SelectorManager.java:doStop(432)) - Stopping org.eclipse.jetty.io.SelectorManager$ManagedSelector@dcef46f keys=1 selected=0
11318 2018-10-03 17:07:23,449 DEBUG io.SelectorManager (SelectorManager.java:submit(480)) - Queued change org.eclipse.jetty.io.SelectorManager$ManagedSelector$Stop@71c319da
11319 2018-10-03 17:07:23,449 WARN websockets.ProxyWebSocketAdapter (AbstractEventDriver.java:unhandled(245)) - Unhandled Error (closing connection)
11320 org.eclipse.jetty.io.RuntimeIOException: java.io.IOException: Timeout while performing WebSocket Upgrade
11321 at org.apache.hadoop.gateway.websockets.ProxyWebSocketAdapter.onWebSocketConnect(ProxyWebSocketAdapter.java:94)
11322 at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onConnect(JettyListenerEventDriver.java:87)

Don't have an account?
Coming from Hortonworks? Activate your account here