사용자 도구

사이트 도구


java:8:pitfall

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
java:8:pitfall [2016/05/18 18:35]
kwon37xi
java:8:pitfall [2016/05/18 18:47]
kwon37xi [localhost hostname 오류]
줄 2: 줄 2:
  
 ===== localhost hostname 오류 ===== ===== localhost hostname 오류 =====
-  * [[InetAddress.getLocalhost() does not give same result in java7 and java8|https://bugs.openjdk.java.net/browse/JDK-8062840]]+  * [[https://bugs.openjdk.java.net/browse/JDK-8062840|InetAddress.getLocalhost() does not give same result in java7 and java8]]
   * ''/etc/hosts''에 ''127.0.0.1 localhost'' 존재시 올바른 hostname이 아닌 무조건 ''localhost'' 리턴   * ''/etc/hosts''에 ''127.0.0.1 localhost'' 존재시 올바른 hostname이 아닌 무조건 ''localhost'' 리턴
   * [[https://jira.atlassian.com/browse/JRA-39070|[JRA-39070] JIRA from address in outbound email changed to 'localhost' if you use Java 8 - Atlassian JIRA]]   * [[https://jira.atlassian.com/browse/JRA-39070|[JRA-39070] JIRA from address in outbound email changed to 'localhost' if you use Java 8 - Atlassian JIRA]]
줄 8: 줄 8:
     * If we rewrite this as ''127.0.0.1 centos57 localhost.localdomain localhost'' then ''getHostName()'' returns ''centos57''.     * If we rewrite this as ''127.0.0.1 centos57 localhost.localdomain localhost'' then ''getHostName()'' returns ''centos57''.
  
 +> Java 8의 버그라기보다는 기존 Java 7의 행위가 버그였고 그것을 고친게 현 상태인 것으로 보임. 
 +> java 8은 ''/etc/nsswitch.conf''의 설정을 철저히 따르고 그 설정이 local machine의 /etc/hosts 파일을 우선시하기 
 +> 때문에 나타나는 현상. 따라서 /etc/hosts 보다 DNS를 우선 따르게 하려면 nsswitch.conf의 설정을 변경해야 한다.
java/8/pitfall.txt · 마지막으로 수정됨: 2016/05/18 18:50 저자 kwon37xi