You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/12/14 05:16:51 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #5856: Make standalone to advertise "localhost" to avoid failure when hostname is not resolvable

sijie commented on a change in pull request #5856: Make standalone to advertise "localhost" to avoid failure when hostname is not resolvable
URL: https://github.com/apache/pulsar/pull/5856#discussion_r357897732
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandaloneStarter.java
 ##########
 @@ -67,7 +67,7 @@ public PulsarStandaloneStarter(String[] args) throws Exception {
             zkServers = this.getAdvertisedAddress();
         } else if (isBlank(config.getAdvertisedAddress())) {
             // Use advertised address as local hostname
-            config.setAdvertisedAddress(ServiceConfigurationUtils.unsafeLocalhostResolve());
+            config.setAdvertisedAddress("localhost");
 
 Review comment:
   I feel it is better to try to add a method to `ServiceConfigurationUtils` to resolve localhost first. It is not resolved then fallback to use "localhost".

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services