개발일기
h2 database 커넥트 오류 root cause: exception opening port h2 console server (http://localhost:8082) 본문
Spring
h2 database 커넥트 오류 root cause: exception opening port h2 console server (http://localhost:8082)
한둥둥 2024. 7. 3. 13:26root cause: exception opening port h2 console server (http://localhost:8082) (port may be in use), cause: timeout; please check your network configuration, specially the file /etc/hosts
해당 에러가 발생하였다. 평소에도 localhost:127.0.0.1이 제대로 동작하지 않는거 같아 의문이 들었는데 드디어 찾았다.
어떤 이유인지 모르지만
#127.0.0.1 localhost
203.132.166.14 localhost
255.255.255.255 broadcasthost
::1 localhost
loocalhost가 주석처리되어 있었고 203.132.166.14 localhost로 되어 있었다. 이런 덕분에 접속이 h2 Database 에서 안되어서
vim /etc/hosts << 해당 명령어를 통해서 들어가서 203부분을 주석처리 해주었다.