浏览代码

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

Emil Anca 10 年之前
父节点
当前提交
821b343082
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java

+ 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";