[
https://issues.apache.org/jira/browse/NIFI-14170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18011498#comment-18011498
]
ASF subversion and git services commented on NIFI-14170:
--------------------------------------------------------
Commit 161e6c24bb07dd268cbb81ae7d5c4dc2fa77cd03 in nifi's branch
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=161e6c24bb ]
NIFI-14170 Fixed WebSocket secure status handling and add Idle Timeout property
(#10154)
Co-authored-by: Ravi Singh <[email protected]>
Signed-off-by: David Handermann <[email protected]>
> ListenWebSocketProcessor doesn't work:
> "org.eclipse.jetty.ee10.servlet.ServletApiRequest.getRequest()" is null
> --------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-14170
> URL: https://issues.apache.org/jira/browse/NIFI-14170
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 2.1.0
> Reporter: Andrei Koiro
> Assignee: RAVINARAYAN SINGH
> Priority: Major
> Attachments: NiFi_Flow.json, Screenshot 2025-01-17 at 00.35.06.png
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
>
> {code:java}
> 2025-01-16 23:58:02,114 WARN [qtp297136886-98]
> o.a.n.w.jetty.RoutingWebSocketListener Unhandled Error: Endpoint
> org.apache.nifi.websocket.jetty.RoutingWebSocketListener :
> org.eclipse.jetty.websocket.api.exceptions.CloseException:
> org.eclipse.jetty.websocket.core.exception.WebSocketException:
> RoutingWebSocketListener OPEN method error: Cannot invoke
> "org.eclipse.jetty.server.Request.isSecure()" because the return value of
> "org.eclipse.jetty.ee10.servlet.ServletApiRequest.getRequest()" is null {code}
> ListenWebSocketProcessor doesn't work
> It happens because our code tries to call
> org.eclipse.jetty.ee10.servlet.ServletApiRequest.getRequest() after the
> current ServletChannel already was "recycle"d
>
> org.apache.nifi.processors.websocket.ListenWebSocket
> {code:java}
> protected String getTransitUri(final WebSocketSessionInfo sessionInfo) {
> final InetSocketAddress localAddress = sessionInfo.getLocalAddress();
> return (sessionInfo.isSecure() ? "wss:" : "ws:")
> + localAddress.getHostName() + ":" + localAddress.getPort() +
> endpointId;
> }
> {code}
> org.eclipse.jetty.ee10.servlet.ServletChannel
> {code:java}
> void recycle(Throwable x)
> {
> // _httpInput must be recycled before _state.
> _httpInput.recycle();
> _httpOutput.recycle();
> _state.recycle();
> _servletContextRequest = null;
> _request = null;
> _response = null;
> _callback = null;
> }
> {code}
> org.eclipse.jetty.ee10.servlet.ServletContextHandler:1170
> {code:java}
> Request.addCompletionListener(servletContextRequest, servletChannel::recycle);
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)