I'm using Apache Spark, a Java application, to create a cluster of machines. The processes that are launched try to communicate with each other across randomized ports. Is there a way to script the opening of a random port in the cluster?
This is a similar answer, but I want to open a single randomized port, not a range. I don't know what the range is, but I guess I could try and figure that out. https://serverfault.com/a/540517/398062