Source:
protected void waitForEffectiveStart(Process nuxeoProcess) throws InterruptedException { int startMaxWait = Integer.parseInt( configurationGenerator.getUserConfig().getProperty(START_MAX_WAIT_PARAM, START_MAX_WAIT_DEFAULT)); var startTime = Instant.now(); var waitUntil = startTime.plusSeconds(startMaxWait); log.debug("Will wait for effective start during seconds.", startMaxWait); final StringBuilder startSummary = new StringBuilder(); boolean servletAvailable = false; int n = 0; while (Instant.now().isBefore(waitUntil) && nuxeoProcess.isAlive()) { try { Thread.sleep(Math.min((n % 10 + 1) * 1000, 60_000)); if (servletAvailable && statusServletClient.isStarted()) { if (!quiet) { log.info("."); } break; } else { statusServletClient.init(); servletAvailable = true; n = 0; } } catch (SocketTimeoutException e) { if (!quiet) { log.info(NO_NEW_LINE, "."); } } } if (Instant.now().isAfter(waitUntil)) { throw new NuxeoLauncherException("Starting process is taking too long - giving up.", EXIT_CODE_ERROR); } if (!nuxeoProcess.isAlive()) { String logs; try { logs = IOUtils.toString(nuxeoProcess.getInputStream(), UTF_8); } catch (IOException e) { logs = "Unable to get process output, check server logs"; } throw new NuxeoLauncherException("Nuxeo startup aborted, see startup logs:" + System.lineSeparator() + logs, EXIT_CODE_ERROR); } startSummary.append(getStartupSummary()); var duration = Duration.between(startTime, Instant.now()); startSummary.append(String.format("Started in %dmin%02ds", duration.toMinutes(), duration.toSeconds() % 60)); if (wasStartupFine()) { if (!quiet) { log.info(startSummary); } } else { log.error(startSummary); if (strict) { doStop(); throw new NuxeoLauncherException("Shutting down because of unstarted component in strict mode...", EXIT_CODE_ERROR); } } }

Target:
protected void waitForEffectiveStart(Process nuxeoProcess) throws InterruptedException { int startMaxWait = Integer.parseInt( configurationGenerator.getUserConfig().getProperty(START_MAX_WAIT_PARAM, START_MAX_WAIT_DEFAULT)); var startTime = Instant.now(); var waitUntil = startTime.plusSeconds(startMaxWait); log.debug("Will wait for effective start during seconds.", startMaxWait); final StringBuilder startSummary = new StringBuilder(); boolean servletAvailable = false; int n = 0; while (Instant.now().isBefore(waitUntil) && nuxeoProcess.isAlive()) { try { Thread.sleep(Math.min((++n / 10 + 1) * 1000, 60_000)); if (servletAvailable && statusServletClient.isStarted()) { if (!quiet) { log.info("."); } break; } else if (statusServletClient.init()) { servletAvailable = true; n = 0; } } catch (SocketTimeoutException e) { if (!quiet) { log.info(NO_NEW_LINE, "."); } } } if (Instant.now().isAfter(waitUntil)) { throw new NuxeoLauncherException("Starting process is taking too long - giving up.", EXIT_CODE_ERROR); } if (!nuxeoProcess.isAlive()) { String logs; try { logs = IOUtils.toString(nuxeoProcess.getInputStream(), UTF_8); } catch (IOException e) { logs = "Unable to get process output, check server logs"; } throw new NuxeoLauncherException("Nuxeo startup aborted, see startup logs:" + System.lineSeparator() + logs, EXIT_CODE_ERROR); } startSummary.append(getStartupSummary()); var duration = Duration.between(startTime, Instant.now()); startSummary.append(String.format("Started in %dmin%02ds", duration.toMinutes(), duration.toSeconds() % 60)); if (wasStartupFine()) { if (!quiet) { log.info(startSummary); } } else { log.error(startSummary); if (strict) { doStop(); throw new NuxeoLauncherException("Shutting down because of unstarted component in strict mode...", EXIT_CODE_ERROR); } } }