써먹는 웹개발
[Elasticsearch] java 연동시 로컬주소 에러나는 현상 해결방법 본문
728x90
반응형
1. 에러메시지
DEBUG [http-nio-8080-exec-9] -Connection request: [route: {}->http://192.168.1.238:9200][total kept alive: 0; route allocated: 0 of 10; total allocated: 0 of 30] DEBUG [pool-5-thread-1] -Connection request failed java.net.ConnectException at org.apache.http.nio.pool.RouteSpecificPool.timeout(RouteSpecificPool.java:168) at org.apache.http.nio.pool.AbstractNIOConnPool.requestTimeout(AbstractNIOConnPool.java:561) at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.timeout(AbstractNIOConnPool.java:822) at org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(SessionRequestImpl.java:183) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:210) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:155) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) at java.lang.Thread.run(Thread.java:750) java.net.ConnectException DEBUG [pool-5-thread-1] -[exchange: 2] connection request failed DEBUG [pool-5-thread-1] -request [POST http://192.168.1.238:9200/i_search_org/_search?typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&search_type=query_then_fetch&batched_reduce_size=512] failed java.net.ConnectException at org.apache.http.nio.pool.RouteSpecificPool.timeout(RouteSpecificPool.java:168) at org.apache.http.nio.pool.AbstractNIOConnPool.requestTimeout(AbstractNIOConnPool.java:561) at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.timeout(AbstractNIOConnPool.java:822) at org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(SessionRequestImpl.java:183) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:210) at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:155) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) at java.lang.Thread.run(Thread.java:750) DEBUG [pool-5-thread-1] -added [[host=http://192.168.1.238:9200]] to blacklist |
2. 원인 : 외부접속허용을 안해놓음
3. 해결방법 : 외부접속 가능하도록 수정
- 경로 : elasticsearch-(ver) > config > elasticsearch.yml
- 다음소스 추가
network.host: 0.0.0.0 |
728x90
반응형
'Study > Elasticsearch' 카테고리의 다른 글
[Kibana] 검색 명령어 (0) | 2022.12.01 |
---|---|
[ES] java에서 사용시 의문의 에러가 나는 이유 (0) | 2022.10.27 |
[ES] logstash 테스트 중 버전 문제로 수정 (0) | 2022.10.23 |
[ElasticSearch] Index생성에서 에러난 이유 (0) | 2021.11.11 |
[Elasticsearch] Java API - JPA 연동 조회 방법 (0) | 2021.11.07 |
Comments