This method starts parameter server
328032
public synchronized void launch() {
        log.info("ModelParameterServer starting");
        if (launchLock.get())
            return;

        configuration.setUnicastControllerPort(configuration.getPortSupplier().getPort());

        transport.setRestartCallback(new RestartCallback() {
            @Override
            public void call(HandshakeResponse response) {
                // upon restart command we'll request current parameters from the current upstream (without any propagation
                try {
                    log.info("Restart callback started...");
                    val msg = new ModelParametersRequest();
                    val rootId = transport.getRootId();
                    ModelParametersMessage modelParams = transport.sendMessageBlocking(msg, rootId);
                    val mParams = modelParams.getPayload();
                    modelParamsSubsribers.forEach(s -> s.onNext(mParams));

                    // updating starting points
                    iterationNumber.set(modelParams.getIterationNumber());
                    epochNumber.set(modelParams.getEpochNumber());

                    // updater parameters are optional, it's possible to have models without updater parameters (i.e. SGD)
                    UpdaterParametersMessage updaterParams = transport.sendMessageBlocking(new UpdaterParametersRequest(), rootId);
                    val uParams = updaterParams.getPayload();
                    if (uParams != null) {
                        updaterParamsSubscribers.forEach(s -> s.onNext(uParams));
                        log.debug("Updater parameters propagated...");
                    }
                } catch (Exception e) {
                    log.error("RestartCallback processing exception: {}", e);
                    throw new RuntimeException(e);
                }
            }
        });

        // listener for model params requests
        transport.addRequestConsumer(ModelParametersRequest.class, new Consumer<ModelParametersRequest>() {
            @Override
            public void accept(ModelParametersRequest modelParametersRequest) throws Exception {
                // send model parameters somewhere
                val msg = new ModelParametersMessage(java.util.UUID.randomUUID().toString(), updatesSubscribers.get(0).getParametersArray());
                msg.setRequestId(modelParametersRequest.getRequestId());
                msg.setIterationNumber(iterationNumber.get());
                msg.setEpochNumber(epochNumber.get());
                transport.sendMessage(msg, modelParametersRequest.getOriginatorId());
            }
        });

        if (masterMode) {
            // on master node when updater params come - we're just storing them
            addUpdaterParamsSubscriber(new AbstractSubscriber<INDArray>() {
                @Override
                public void onNext(INDArray array) {
                    // we're keeping first final updater params state
                    if (gotFinalState.get())
                        return;
                    try {
                        updaterParamsLock.writeLock().lock();

                        // just store new array
                        updaterParameters.get().setParameters(array);
                        updaterParameters.get().setTimeReceived(System.currentTimeMillis());
                    } finally {
                        updaterParamsLock.writeLock().unlock();
                    }
                }
            });

            // listener for updater params requests
            transport.addRequestConsumer(UpdaterParametersRequest.class, new Consumer<UpdaterParametersRequest>() {
                @Override
                public void accept(UpdaterParametersRequest updaterParametersRequest) throws Exception {
                    // master mode physically can't have own updater parameters, so we're acting as proxy here

                    // we're not requesting updater params if
                    if (!gotFinalState.get()) {
                        val tId = transport.getRandomDownstreamFrom(transport.getRootId(), updaterParametersRequest.getOriginatorId());
                        log.debug("Sending UpdaterParameters request to [{}]", tId);

                        // trying to get updaters from root downstreams, excluding original message sender
                        UpdaterParametersMessage updaterParams = transport.sendMessageBlocking(new UpdaterParametersRequest(), tId);
                        val uParams = updaterParams.getPayload();

                        try {
                            updaterParamsLock.writeLock().lock();

                            if (updaterParameters.get() == null) {
                                updaterParameters.set(new UpdaterParametersHolder(uParams, System.currentTimeMillis(), false));
                            } else
                                updaterParameters.get().setParameters(uParams);

                        } finally {
                            updaterParamsLock.writeLock().unlock();
                        }
                    }

                    try {
                        updaterParamsLock.readLock().lock();

                        // send updater parameters somewhere
                        log.debug("Trying to send back Updater parameters...");
                        val msg = new UpdaterParametersMessage(java.util.UUID.randomUUID().toString(), updaterParameters.get().getParameters());
                        msg.setRequestId(updaterParametersRequest.getRequestId());
                        transport.sendMessage(msg, updaterParametersRequest.getOriginatorId());
                    } finally {
                        updaterParamsLock.readLock().unlock();
                    }
                }
            });
        } else {
            // in case of regular
            transport.addRequestConsumer(UpdaterParametersRequest.class, new Consumer<UpdaterParametersRequest>() {
                @Override
                public void accept(UpdaterParametersRequest updaterParametersRequest) throws Exception {
                    // master mode physically can't have updater parameters
                    log.debug("Trying to send back Updater parameters...");
                    if (updaterParametersProvider == null) {
                        log.warn("UpdaterParametersProvider wasn't set!");
                        val msg = new UpdaterParametersMessage(java.util.UUID.randomUUID().toString(), null);
                        msg.setRequestId(updaterParametersRequest.getRequestId());
                        transport.sendMessage(msg, updaterParametersRequest.getOriginatorId());
                    } else {
                        // send updater parameters back
                        val msg = new UpdaterParametersMessage(java.util.UUID.randomUUID().toString(), updaterParametersProvider.getUpdaterParameters());
                        msg.setRequestId(updaterParametersRequest.getRequestId());
                        transport.sendMessage(msg, updaterParametersRequest.getOriginatorId());
                    }
                }
            });
        }

        // this flow will be providing INDArray messages
        disposable = Flowable.fromPublisher(transport.incomingPublisher()).subscribe(message -> {
            /**
             * We process messages here. Messages are either contain INDArrays, say, as gradients update, or as  model parameters.
             */
            if (message instanceof GradientsUpdateMessage) {
                // we don't really care about synchronization here
                val gum = (GradientsUpdateMessage) message;
                if (iterationNumber.get() < gum.getIteration())
                    iterationNumber.set(gum.getIteration());

                if (epochNumber.get() < gum.getEpoch())
                    epochNumber.set(gum.getEpoch());

                // it's possible to get updates messages BEFORE model was properly initalized
                if (updatesSubscribers.isEmpty()) {
                    //log.debug("Storing GradientsUpdateMessage into backlog queue...");
                    updatesQueue.add(message.getPayload());
                } else {
                    //log.debug("Propagating GradientsUpdateMessage to subscribers: [{}]", updatesSubscribers.size());
                    updatesSubscribers.forEach(s -> s.onNext(message.getPayload()));
                }
            } else
                throw new UnsupportedOperationException("Unknown message received: [" + message.getClass().getCanonicalName() + "]");
        });

        // we start transport only once we're ready
        if (this.masterMode)
            transport.launchAsMaster();
        else {
            transport.launch();
        }

        // instance can be stopped now
        stopLock.set(false);

        launchLock.set(true);
    }
1311874
public void start() throws Exception {
        // verify server is NOT null
        if (server == null) {
            throw new NullPointerException("Internal server instance was null, server not configured perhaps?");
        }

        logger.info("HttpServer [{}] version [{}] using Jetty [{}]", configuration.safeGetName(), com.cloudhopper.jetty.Version.getLongVersion(),
		    server.getVersion());
        logger.info("HttpServer [{}] on [{}] starting...", configuration.safeGetName(), configuration.getPortString());

        // try to start jetty server -- if it fails, it'll actually keep running
        // so if an exception occurs, we'll make to stop it afterwards and rethrow the exception
        try {
            server.start();
        } catch (Exception e) {
            // make sure we stop the server
            try { this.stop(); } catch (Exception ex) { }
            throw e;
        }

        logger.info("HttpServer [{}] on [{}] started", configuration.safeGetName(), configuration.getPortString());
    }
76203
public void bindAndStart(int port) throws Exception {
        server = new NioServer(new StreamConnectionFactory() {
            @Override
            public ProtobufConnection<Protos.TwoWayChannelMessage> getNewConnection(InetAddress inetAddress, int port) {
                return new ServerHandler(new InetSocketAddress(inetAddress, port), timeoutSeconds).socketProtobufHandler;
            }
        }, new InetSocketAddress(port));
        server.startAsync();
        server.awaitRunning();
    }
844330
@Override
    public void start() {
        String res = launchPing();
        if (res != null && res.length() > 0) {
            res = res.toLowerCase();
            if (res.contains(Cmd.PING_UNREACHABLE) && !res.contains(Cmd.PING_EXCEED)) {
                // Failed
                mLossRate = 1f;
                mError = Cmd.HOST_UNREACHABLE_ERROR;
            } else {
                // Succeed
                mLossRate = parseLoss(res);
                mDelay = parseDelay(res);
                if (isAnalysisIp)
                    mIp = parseIp(res);
            }
        } else {
            mError = Cmd.DROP_DATA_ERROR;
        }
    }
716477
public void start() throws IOException {
    this.server.start();
    LOG.info("HdfsProxy server up at: " + sslAddr.getHostName() + ":"
        + sslAddr.getPort());
  }
234640
protected void startServerCommandListener() {
        String uuid = systemBundleCtx.getProperty("org.osgi.framework.uuid");
        sc = new ServerCommandListener(config, uuid, this);
        sc.startListening();
    }
1330837
async def start(self, **kwargs):
        """"""
        zeroconf = kwargs['zeroconf']
        self._name = kwargs['name']
        self._pairing_guid = kwargs.get('pairing_guid', None) or \
            self._generate_random_guid()

        self._web_server = web.Server(self.handle_request, loop=self._loop)
        self._server = await self._loop.create_server(
            self._web_server, '0.0.0.0')

        # Get the allocated (random port) and include it in zeroconf service
        allocated_port = self._server.sockets[0].getsockname()[1]
        _LOGGER.debug('Started pairing web server at port %d', allocated_port)

        self._setup_zeroconf(zeroconf, allocated_port)
348311
public void addParameter(String parameterName, int parameterStart, int parameterEnd) {
        addParameter(parameterName, parameterStart, parameterEnd, null, null);
    }
1193310
public void start()
	{
	  mThread = new Thread(mom);
	  mThread.setName("MonitorThead for " + si.getServerConnection().getUrl());
	  mThread.start();
	}
490521
public int start() throws IOException {
		synchronized (this.monitor) {
			Assert.state(!isStarted(), "Server already started");
			logger.debug("Starting live reload server on port " + this.port);
			this.serverSocket = new ServerSocket(this.port);
			int localPort = this.serverSocket.getLocalPort();
			this.listenThread = this.threadFactory.newThread(this::acceptConnections);
			this.listenThread.setDaemon(true);
			this.listenThread.setName("Live Reload Server");
			this.listenThread.start();
			return localPort;
		}
	}
300500
@Override
	public void open(Configuration parameters) throws Exception {
		try {
			synchronized (lock) {
				createConnection();
			}
		}
		catch (IOException e) {
			throw new IOException("Cannot connect to socket server at " + hostName + ":" + port, e);
		}
	}
1235790
function (param, options, callback) {
              embedProcessor.log(param.worker + ' started with parameters = ', param);
              param.status = true;
              param.duration = false;
              param.duration_formatted = false;
              param.thumbnail_url = false;
              param.favicon_url = '';
              param.service_name = '';
              param.provider_url = '';
              param.html = false;
              param.views = false;
              if (embedProcessor._sources[param.source] && embedProcessor._sources[param.source].prepareEmbedCode) {
                param = embedProcessor._sources[param.source].prepareEmbedCode(param);
              }
              param = embedProcessor._paramEmbedCodeNormalizer(param);
              embedProcessor.log(param.worker + ' receive parameters = ', param);
              callback(param);
            }
930013
public void start() {
        stop(); // <-- If server is not running nothing happens.

        if (!isInitialized()) {
            onInit();
            server = __buildServer();
        }

        try {
            server.start();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
854913
void startEngine() throws ServerStartException {

		// setting up the server
		final boolean isDaemon = true;
		final boolean isSilent = false;

		final HsqlProperties hsqlProp = new HsqlProperties();

		// gives the chance to the descriptors to contribute to the server configuration.
		final AtomicInteger dbCounter = new AtomicInteger(0);
		for (HsqlDatabaseDescriptor db : dbs) {
			
			db.contributeToServerConfiguration(new LocationConfiguration() {

				@Override
				public void setLocation(String dbName, String location) {

					log.info("Registering db #{} : '{}' stored on '{}'", dbCounter, dbName, location);
					int dbIndex = dbCounter.getAndAdd(1);
					if (!(location.startsWith("file:") || location.startsWith("res:") || location
							.startsWith("mem:"))) {
						throw new IllegalArgumentException(location);
					}
					
					hsqlProp.setProperty("server.database." + dbIndex, location);
					hsqlProp.setProperty("server.dbname." + dbIndex, dbName);
				}

			});

		}
		// avoid to open a db remotely
		server = new Server();
		hsqlProp.setProperty("server.remote_open", false);
		try {
			server.setProperties(hsqlProp);
		} catch (IOException | AclFormatException e1) {
			throw new ServerStartException(e1);
		}

		server.setLogWriter(lubricantLoggerWriter.asPrintWriter());
		server.setDaemon(isDaemon);
		server.setSilent(isSilent);
		server.setTrace(false);
		server.setNoSystemExit(true);

		if (definedPort != null) {
			server.setPort(definedPort);
		}
		if (this.address != null) {
			server.setAddress(this.address);
		}

		for (int i = 0; i < this.dbs.size(); i++) {
			log.info("db " + i);
			log.info(server.getDatabaseType(i));
			log.info(server.getDatabaseName(i, true));
			log.info(server.getDatabasePath(i, true));
		}

		// dump config
		log.info("Starting HSQL standalone DBMS...");
		log.info("is daemon: {}", isDaemon);
		log.info("is silent: {}", isSilent);
		log.info("port: {} ", (definedPort != null ? definedPort
				: "HSQL default"));
		log.info("address: {} ", (address != null ? address : "HSQL default"));

		log.info("Waiting for hsql engine to start...");
		
		
		Integer state = server.start();
		Throwable serverError = server.getServerError();
		if(serverError!=null){
			throw new ServerStartException(serverError);
		}			
		do {
			state = server.getState();
			Thread.yield();
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				// nothing special
			}			
		}while(state != 1);
		
		log.info("Hsql engine started.");

		try{
			log.info("Starting databases post setup...");
			for (int i = 0; i < dbs.size(); i++) {
				final HsqlDatabaseDescriptor db = dbs.get(i);
				log.info("Post start up for db '{}', {}/{}.", db.getDbName(), i+1, dbs.size());
				db.postStartSetUp();
				db.goReady();
			}
			log.info("Post setup completed.");			
		}catch(Exception e){
			throw new ServerStartException("An error occurred during post setup.", e);
		}

		log.info("Dump connection strings:");
		for (HsqlDatabaseDescriptor db : dbs) {
			log.info("Connection to db {}: {}, account {}/{} ", db.getDbName(),
					db.getUrl(), db.getDbName(), db.getPassword());
		}

		log.info("HSQL standalone DBMS is ready");

	}
1248885
public void start() throws Throwable
   {
      if (mbeanServer != null)
      {
         DynamicMBean dmb = JMX.createMBean(this, "JNDIViewer");
         objectName = new ObjectName(domain + ":name=JNDIViewer");

         mbeanServer.registerMBean(dmb, objectName);
      }
   }
283110
public void start() {
        logger.info("\n###starting...");
        try {
            Container container = this.getActualContainer();
            Server server = new ContainerServer(container);
            connection = new SocketConnection(server);
            SocketAddress address = new InetSocketAddress(port);
            socketAddress =(InetSocketAddress) connection.connect(address);
            this.isRunning = true;
            logger.info("\n#Simulator: " + this.getSimulatorName() +
                        "\n#started. " +
                        "\nListening at port: " + socketAddress.getPort());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
871019
public void start() throws Exception {
        long startTime = System.currentTimeMillis();

        HandlerCollection handlers = new HandlerCollection();
        addModulesToJetty(handlers);

        // Create the server.
        int serverPort = serverPort();
        System.out.println("**** Starting Server (" + getClass().getSimpleName() + ") on port: " + serverPort);
        server = new Server(serverPort);
        server.setHandler(handlers);
        server.start();
        long endTime = System.currentTimeMillis();
        System.out.println("******* Started in " + (endTime - startTime) + "ms");
    }