bereng commented on a change in pull request #652:
URL: https://github.com/apache/cassandra/pull/652#discussion_r450054263



##########
File path: src/java/org/apache/cassandra/utils/FBUtilities.java
##########
@@ -130,16 +130,24 @@ public static MessageDigest newMessageDigest(String 
algorithm)
     public static InetAddress getJustLocalAddress()
     {
         if (localInetAddress == null)
-            try
-            {
-                localInetAddress = DatabaseDescriptor.getListenAddress() == 
null
-                                    ? InetAddress.getLocalHost()
-                                    : DatabaseDescriptor.getListenAddress();
-            }
-            catch (UnknownHostException e)
+        {
+            if (DatabaseDescriptor.getListenAddress() == null)
             {
-                throw new RuntimeException(e);
+                try
+                {
+                    localInetAddress = InetAddress.getLocalHost();

Review comment:
       @snazy I would reword
   
   > InetAddress.getLocalHost() was used to resolve listen_address to {}, this 
can cause issues. Please check your node's config and set the listen_address in 
cassandra.yaml
   
   to
   
   > InetAddress.getLocalHost() was used to resolve listen_address to {}, 
double check this is correct. Please check your node's config and set the 
listen_address in cassandra.yaml accordingly if applicable.
   
   Why? getLocalHost may be the right thing and `can cause issues` sounds like 
almost a certainty it will cause them. I'd favor a milder wording. Also 
listen_address you only set up unless you set a device to listen on iirc they 
are exclusive, so you set listen_address only if applicable. Wdyt?




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to