docker로 elasticsearch와 kibana를 구동 후, 인터넷 url로 접속 시
curl: (56) Recv failure: Connection reset by peer
에러가 발생한다면,
docker 컨테이너 외부에서의 요청을 받지 못하는 것이다.elasticseach.yml 파일의 network.bind_host를 localhost가 아닌 0.0.0.0으로 설정하고kibana.yml 파일의 server.host를 0.0.0.0 으로 설정하고 구동한다면 컨테이너 외부 호스트에서도 접속 가능할 것이다.
번외. curl test
elasticsearch가 실행되고 있는 local환경에서
curl -XGET -u elastic:{2 단계에서 생성한 비밀번호} http://localhost:9200/_cluster/health?pretty
명령어로, 접속을 할 수 있는지 확인한다.
참고자료:
https://enghqii.tistory.com/56
TIL: docker 컨테이너안에서 ip 바인딩은 localhost가 아니라 0.0.0.0으로 해야한다
요 며칠간 레일즈로 만들어진 웹앱을 도커 컨테이너 위에 deploy 시키려고 시도 했었었다. 결과적으로는 안돼서 그냥 때려쳤는데, 그 사이에 수 많은 삽질과 뻘짓 사이에 그래도 적어두면 괜찮을
enghqii.tistory.com
https://superuser.com/questions/949428/whats-the-difference-between-127-0-0-1-and-0-0-0-0
What's the difference between 127.0.0.1 and 0.0.0.0?
I understand that 127.0.0.1 points to localhost, and so does 0.0.0.0 (correct me if I'm wrong). So, what's the difference between 127.0.0.1 and 0.0.0.0?
superuser.com
'기타' 카테고리의 다른 글
Intellij에서 Git Merge하기 (0) | 2021.01.23 |
---|