public LocatorState(final LocatorLauncher launcher, final Status status) { // if status is NOT_RESPONDING then this is executing inside the JVM asking for the status; // pid etc will be set according to the caller's JVM instead this(status, launcher.statusMessage, System.currentTimeMillis(), launcher.getId(), identifyPid(), ManagementFactory.getRuntimeMXBean().getUptime(), launcher.getWorkingDirectory(), ManagementFactory.getRuntimeMXBean().getInputArguments(), System.getProperty("java.class.path"), GemFireVersion.getGemFireVersion(), System.getProperty("java.version"), getLogFileCanonicalPath(launcher), launcher.getBindAddressAsString(), launcher.getPortAsString(), launcher.getMemberName()); }
private LocatorState(final LocatorLauncher launcher, final Status status, final LocatorStatusResponse response) { this(status, launcher.statusMessage, System.currentTimeMillis(), launcher.getId(), response.getPid(), response.getUptime(), response.getWorkingDirectory(), response.getJvmArgs(), response.getClasspath(), response.getGemFireVersion(), response.getJavaVersion(), response.getLogFile(), response.getHost(), String.valueOf(response.getPort()), response.getName()); }
debug("Waiting on Locator (%1$s) to stop...", getId());
debug("Running Locator on (%1$s) in (%2$s) as (%3$s)...", getId(), getWorkingDirectory(), getMember()); running.set(true); throw new RuntimeException( String.format("An IO error occurred while starting a %s in %s on %s: %s", getServiceName(), getWorkingDirectory(), getId(), e.getMessage()), e); } catch (FileAlreadyExistsException e) { throw new RuntimeException( String.format("A PID file already exists and a %s may be running in %s on %s.", getServiceName(), getWorkingDirectory(), getId()), e); } catch (PidUnavailableException e) { throw new RuntimeException( String.format("The process ID could not be determined while starting %s %s in %s: %s", getServiceName(), getId(), getWorkingDirectory(), e.getMessage()), e); } catch (Error | RuntimeException e) { throw new IllegalStateException( String.format("A %s is already running in %s on %s.", getServiceName(), getWorkingDirectory(), getId()));
private static String getLocatorLocation(LocatorLauncher launcher) { if (launcher.getPort() == null) { return launcher.getId(); } if (launcher.getBindAddress() == null) { return HostUtils.getLocatorId(HostUtils.getLocalHost(), launcher.getPort()); } return HostUtils.getLocatorId(launcher.getBindAddressAsString(), launcher.getPort()); }