Jim Halfpenny created NIFI-16624:
------------------------------------
Summary: Add connect timeout to secure Site-to-Site socket
connections
Key: NIFI-16624
URL: https://issues.apache.org/jira/browse/NIFI-16624
Project: Apache NiFi
Issue Type: Bug
Reporter: Jim Halfpenny
EndpointConnectionPool creates secure RAW Site-to-Site connections with
SSLSocketFactory.createSocket(hostname, port). That method connects inside the
call without a timeout, so the configured communications timeout only applies
as a read timeout. The non-secure path already connects with
socket.connect(address, commsTimeout).
If a peer silently drops packets, for example the old address of a restarted
node on Kubernetes or a firewalled port, the connect blocks for the OS TCP
connect timeout (about 130 seconds on Linux) instead of the communications
timeout (default 30 seconds). This blocks the Remote Group Port task thread, so
the node sends nothing to any peer while it waits. PeerSelector's peer status
refresh uses the same method over RAW and blocks the same way.
HTTP Site-to-Site is not affected because SiteToSiteRestApiClient sets a
connect timeout.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)