티스토리 뷰

Tomcat 설치후 실행을 했더니 다음과 같은 에러가 발생!!!

java.net.MalformedURLException: Local host name unknown:

내가 뭘 잘못했니 왜 나만안되니...ㅠㅠ

울면서 검색해본결과 


/etc/hosts 파일에 hostname이 localhost로 설정되지 않아서 그렇다고함.

확인을 위해서 cat /etc/hosts 명령어를 실행

그런데 왜죠... 넘나 이쁘게 localhost가 잘 써있는데... 나는 왜 안되는거죠??


MacBook-Pro:~ USERNAME$ cat /etc/hosts

##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting.  Do not change this entry.

##

127.0.0.1 localhost 

::1             localhost 


다시 구글링을 막 해서 찾은 해결 방법

현재 hostname을 localhost 옆에 추가해야함

참고: http://stackoverflow.com/a/20983480


MacBook-Pro:~ USERNAME$ hostname

MacBook-Pro.local

MacBook-Pro:~ USERNAME$ sudo vi /etc/hosts

##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting.  Do not change this entry.

##

127.0.0.1       localhost MacBook-Pro.local

::1             localhost MacBook-Pro.local

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함