Joe Witt created NIFI-16666:
-------------------------------
Summary: System tests intermittently fail to start NiFi because
the Runtime Management Server port is in the ephemeral port range
Key: NIFI-16666
URL: https://issues.apache.org/jira/browse/NIFI-16666
Project: Apache NiFi
Issue Type: Test
Reporter: Joe Witt
Assignee: Joe Witt
System test NiFi instances fail to start intermittently with Management Server
start failed caused by java.net.BindException: Address already in use.
The bootstrap.conf files under
nifi-system-tests/nifi-system-test-suite/src/test/resources/conf set
management.server.address to ports 56710 (clustered node1), 56720 (clustered
node2) and 56730 (default and pythonic). These ports are inside the operating
system's ephemeral range, which is 32768–60999 on Linux and 49152–65535 on
macOS. Another process, including a connection made by the test run itself, can
take the port before NiFi binds it, and the instance then fails to start.
Examples from system-tests run 46943095859 on pull request #11995, both on
ubuntu-24.04 Java 25:
SelectiveDropConnectorIT.testSelectiveDropOnConnectorStop failed with Failed to
start NiFi. NiFi logged Start Server failed … Management Server start failed …
BindException.
On the rerun, ClusterStateKeyDropIT.testClearAllStateWithEmptyPayload failed
with Failed to start 1 NiFi instance(s). node-2 logged the same Management
Server start failed … BindException.
Neither test involves cluster coordination.
This change moves the management server ports to 5675 (clustered node1), 5676
(clustered node2) and 5677 (default and pythonic), which are below the
ephemeral range.
Related: the Runtime Management Server default address in a standard
installation uses port 52020, which is also in the ephemeral range. This issue
only covers the system test configuration.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)