// note, we rely on the fact that its a new id each time we start, see FD and "kill -9" handling
String nodeId = UUID.randomUUID().toString();
String host = settings.get("discovery.publish.host");
String port = settings.get("discovery.publish.port");
if (host != null && port != null) {
TransportAddress address = new InetSocketTransportAddress(host, Integer.parseInt(port));
localNode = new DiscoveryNode(settings.get("name"), nodeId, address, nodeAttributes, Version.CURRENT);
} else {
localNode = new DiscoveryNode(settings.get("name"), nodeId, transportService.boundAddress().publishAddress(), nodeAttributes, Version.CURRENT);
}
tracker.open();