Skip to content

[SYSTEMDS-3959] Report an error when a federated worker cannot bind its port - #2586

Open
gaturchenko wants to merge 1 commit into
apache:mainfrom
gaturchenko:fed-worker-invalid-port
Open

[SYSTEMDS-3959] Report an error when a federated worker cannot bind its port#2586
gaturchenko wants to merge 1 commit into
apache:mainfrom
gaturchenko:fed-worker-invalid-port

Conversation

@gaturchenko

Copy link
Copy Markdown
Contributor

The command systemds WORKER 80505 terminated silently with exit code 0. There are 2 causes:

  1. No range check for -w <port>
  2. FederatedWorker.run() captured every exception in a catch-all. The same held for occupied and reserved ports, and for the -fedMonitoring backend

The following changes were implemented:

  • PortUtils (new): shared port validation plus explainBindFailure, which turns terse socket errors into messages naming the port and the cause.
  • DMLOptions: -w and -fedMonitoring reject non-integers and ports outside [1, 65535]. A missing (optional) -w argument now falls back to the default port instead of throwing NumberFormatException.
  • FederatedWorker / FederatedMonitoringServer: reject out-of-range ports upfront, warn on reserved ports (< 1024), and throw bind failures as DMLRuntimeException after logging.
  • bin/systemds: the duplicated WORKER/FEDMONITORING check is now one checkPort function with a range check and exit 1. Previously, an error was printed and the JVM was launched regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant