@Override protected FailureAnalysis analyze(Throwable rootFailure, PortInUseException cause) { return new FailureAnalysis( "Web server failed to start. Port " + cause.getPort() + " was already in use.", "Identify and stop the process that's listening on port " + cause.getPort() + " or configure this " + "application to listen on another port.", cause); }
@Override public void start() throws WebServerException { if (this.disposableServer == null) { try { this.disposableServer = startHttpServer(); } catch (Exception ex) { ChannelBindException bindException = findBindException(ex); if (bindException != null) { throw new PortInUseException(bindException.localPort()); } throw new WebServerException("Unable to start Netty", ex); } logger.info("Netty started on port(s): " + getPort()); startDaemonAwaitThread(this.disposableServer); } }
failedPorts.removeAll(actualPorts); if (failedPorts.size() == 1) { throw new PortInUseException( failedPorts.iterator().next().getNumber());
failedPorts.removeAll(actualPorts); if (failedPorts.size() == 1) { throw new PortInUseException( failedPorts.iterator().next().getNumber());
if (connector instanceof NetworkConnector && findBindException(ex) != null) { throw new PortInUseException( ((NetworkConnector) connector).getPort());