private String getSiteToSiteHostname(final HttpServletRequest req) { // Private IP address or hostname may not be accessible from client in some environments. // So, use the value defined in nifi.properties instead when it is defined. final String remoteInputHost = properties.getRemoteInputHost(); String localName; try { // Get local host name using InetAddress if available, same as RAW socket does. localName = InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { if (logger.isDebugEnabled()) { logger.debug("Failed to get local host name using InetAddress.", e); } localName = req.getLocalName(); } return isEmpty(remoteInputHost) ? localName : remoteInputHost; }
final Optional<ClusterNodeInformation> nodeInfo = (nodeInformant == null) ? Optional.empty() : Optional.of(nodeInformant.getNodeInformation()); String remoteInputHostVal = nifiProperties.getRemoteInputHost(); if (remoteInputHostVal == null) { remoteInputHostVal = InetAddress.getLocalHost().getHostName();
nodeSocketAddress.getHostName(), nodeSocketAddress.getPort(), loadBalanceAddress.getHostName(), loadBalanceAddress.getPort(), nifiProperties.getRemoteInputHost(), nifiProperties.getRemoteInputPort(), nifiProperties.getRemoteInputHttpPort(), nifiProperties.isSiteToSiteSecure());
final Optional<ClusterNodeInformation> nodeInfo = (nodeInformant == null) ? Optional.empty() : Optional.of(nodeInformant.getNodeInformation()); String remoteInputHostVal = nifiProperties.getRemoteInputHost(); if (remoteInputHostVal == null) { remoteInputHostVal = InetAddress.getLocalHost().getHostName();