Trying to fix localhost hostname usage, take2

This commit is contained in:
Janne Valkealahti
2015-02-26 12:11:17 +00:00
parent 3d7c0365bd
commit e8633c0e2f
2 changed files with 2 additions and 1 deletions

View File

@@ -70,7 +70,7 @@ public class KerberosRestTemplateTests extends KerberosSecurityTestcase {
MiniKdc kdc = getKdc();
File workDir = getWorkDir();
String host = InetAddress.getLocalHost().getHostName();
String host = InetAddress.getLocalHost().getCanonicalHostName();
String serverPrincipal = "HTTP/" + host;
File serverKeytab = new File(workDir, "server.keytab");

View File

@@ -252,6 +252,7 @@ public class MiniKdc {
LOG.info(" {}: {}", entry.getKey(), entry.getValue());
}
LOG.info(" localhost hostname: {}", InetAddress.getLocalHost().getHostName());
LOG.info(" localhost canonical hostname: {}", InetAddress.getLocalHost().getCanonicalHostName());
LOG.info("---------------------------------------------------------------");
this.conf = conf;
port = Integer.parseInt(conf.getProperty(KDC_PORT));