code: public static ActorSystem startActorSystem(
  			Configuration configuration,
  			String actorSystemName,
  			String listeningAddress,
  			String portRangeDefinition,
  			Logger logger,
  			@Nonnull ActorSystemExecutorConfiguration actorSystemExecutorConfiguration) throws Exception {
  
  		// parse port range definition and create port iterator
  		Iterator<Integer> portsIterator;
  		try {
  			portsIterator = NetUtils.getPortRangeFromString(portRangeDefinition);
  		} catch (Exception e) {
  			throw new IllegalArgumentException("Invalid port range definition: " + portRangeDefinition);
  		}
  
  		while (portsIterator.hasNext()) {
  			final int port = portsIterator.next();
  
  			try {
  				return startActorSystem(
  					configuration,
  					actorSystemName,
  					listeningAddress,
  					port,
  					logger,
  					actorSystemExecutorConfiguration);
  			}
  			catch (Exception e) {
  				// we can continue to try if this contains a netty channel exception
  				Throwable cause = e.getCause();
  				if (!(cause instanceof org.jboss.netty.channel.ChannelException ||
  						cause instanceof java.net.BindException)) {
  					throw e;
  				} // else fall through the loop and try the next port
  			}
  		}
  
  		// if we come here, we have exhausted the port range
  		throw new BindException("Could not start actor system on any port in port range "
  			+ portRangeDefinition);
  	}
docs: Starts an ActorSystem with the given configuration listening at the address/ports.
  
  @param configuration The Flink configuration
  @param actorSystemName Name of the started {@link ActorSystem}
  @param listeningAddress The address to listen at.
  @param portRangeDefinition The port range to choose a port from.
  @param logger The logger to output log information.
  @param actorSystemExecutorConfiguration configuration for the ActorSystem's underlying executor
  @return The ActorSystem which has been started
  @throws Exception Thrown when actor system cannot be started in specified port range