[
https://issues.apache.org/jira/browse/KNOX-2004?focusedWorklogId=345272&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-345272
]
ASF GitHub Bot logged work on KNOX-2004:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Nov/19 13:08
Start Date: 18/Nov/19 13:08
Worklog Time Spent: 10m
Work Description: goelrajat commented on pull request #200: KNOX-2004:
Adding changes for handling Ping/Pong message from backend…
URL: https://github.com/apache/knox/pull/200
… server on websocket connection
(It is very **important** that you created an Apache Knox JIRA for this
change and that the PR title/commit message includes the Apache Knox JIRA ID!)
## What changes were proposed in this pull request?
Changes add a new message handler for handling Ping/Pong messages from
backend websocket server and relay the same to Frontend. Ping/Pong messages are
control messages to keep websocket connection alive.
## How was this patch tested?
Changes were tested on a local test setup to check if websocket was indeed
kept alive and it was working. In absence of these changes, any Ping messages
received from backend server, were being responded by lower jetty server layer
and were propagated to front end. Because of this, Frontend connection was
getting timed out. With these changes, timeouts were not seen.
I have also a added a Unit Test for the same.
Please review [Knox Contributing
Process](https://cwiki.apache.org/confluence/display/KNOX/Contribution+Process#ContributionProcess-GithubWorkflow)
before opening a pull request.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 345272)
Remaining Estimate: 0h
Time Spent: 10m
> Websockets connections between UI frontend and Knox are timing out as idle
> connections even though backend server is sending PING messages to keep
> connections alive
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: KNOX-2004
> URL: https://issues.apache.org/jira/browse/KNOX-2004
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.0.0
> Environment: HDP 3.1.0
> Reporter: Rajat Goel
> Assignee: Rajat Goel
> Priority: Major
> Attachments: xx_cdap_timeout1.pcap
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Websocket connection between UI client and Knox server is idle and gets timed
> out after configured socket idle timeout period whereas without Knox i.e.
> direct websocket connection from UI to Service backend never times out.
> On debugging further, found that Service backend is a Node js server and uses
> websocket control messages (Ping, Pong) to keep websocket connective alive.
> Knox gateway was responding to backend with Pong message. However, Knox was
> not Proxying Ping messages to frontend which was resulting idle timeout of
> this side of connection.
> Confirmed the same from TCP packet raw dump using Wireshark.
> Attaching TCP packet dump. For checking Knox server to Service Backend
> websocket connection, use filter '(ip.src == 192.168.133.69) && (ip.dst ==
> 192.168.133.69) && (tcp.port==39212)'
>
> For Frontend UI to Knox websocket connection, use filter:
> (ip.dst == 192.168.108.57) || (ip.src == 192.168.108.57) && (tcp.port==49610)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)