Kaynağa Gözat

AMBARI-10788. Cannot execute server-side action if the Ambari server host name contain uppercase characters (Emil Anca via rlevas)

Emil Anca 10 yıl önce
ebeveyn
işleme
821b343082

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java

@@ -94,7 +94,7 @@ public class StageUtils {
   private static String server_hostname;
   static {
     try {
-      server_hostname = InetAddress.getLocalHost().getCanonicalHostName();
+      server_hostname = InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
     } catch (UnknownHostException e) {
       LOG.warn("Could not find canonical hostname ", e);
       server_hostname = "localhost";