private void openChannels() throws IOException
	{
		servSelector = Selector.open();
		boolean portOpen=false;
		IOException lastException=null;
		
		for(final int listenPort : config.getHttpListenPorts())
		{
			try
			{
				openChannel(listenPort, Boolean.FALSE);
				portOpen=true;
			}
			catch(final IOException e)
			{
				lastException=e;
				config.getLogger().severe("Port "+listenPort+": "+e.getMessage());
			}
		}
		if(sslContext != null)
		{
			for(final int listenPort : config.getHttpsListenPorts())
			{
				try
				{
					openChannel(listenPort, Boolean.TRUE);
					portOpen=true;
				}
				catch(final IOException e)
				{
					lastException=e;
					config.getLogger().severe("Port "+listenPort+": "+e.getMessage());
				}
			}
		}
		if((!portOpen)&&(lastException!=null))
			throw lastException;
	}