2017-11-06 1 views
0

최근에 Elasticsearch 1.5에서 Elasticsearch 5.5로 업그레이드했는데 원격으로 연결할 수는 있지만 localhost에서는 연결할 수 없습니다.Elasticsearch 5에 로컬로 연결할 수는 없지만 로컬로는 연결할 수 없습니다.

나는 업데이트 elasticsearch.yml 원격으로 연결할 수 있어야합니다 :

network.host: 0.0.0.0 

그리고 elasticsearch 로그가 나에게 잘 보이는 :

[2017-11-05T22:44:23,441][INFO ][o.e.n.Node    ] [node1] starting ... 
[2017-11-05T22:44:23,655][INFO ][o.e.t.TransportService ] [node1] publish_address {[ip address]:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}, {[ip address]:9300} 
[2017-11-05T22:44:23,666][INFO ][o.e.b.BootstrapChecks ] [node1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks 
[2017-11-05T22:44:26,712][INFO ][o.e.c.s.ClusterService ] [node1] new_master {node1}{s-J7aStjQFuwor-WY6bSCQ}{nv4GVIQ6SwScPiebRHBQBQ}{localhost}{[ip address]:9300}, reason: zen-disco-elected-as-master ([0] nodes joined) 
[2017-11-05T22:44:26,733][INFO ][o.e.h.n.Netty4HttpServerTransport] [node1] publish_address {[ip address]:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}, {[ip address]:9200} 
[2017-11-05T22:44:26,734][INFO ][o.e.n.Node    ] [node1] started 

가 프록시 관련이 있는지 궁금하고, 을 실행하면 다음과 같은 메시지가 표시됩니다.

... 
<p>The following error was encountered while trying to retrieve the URL: <a href="http://localhost:9200/">http://localhost:9200/</a></p> 

<blockquote id="error"> 
<p><b>Connection to 127.0.0.1 failed.</b></p> 
</blockquote> 

<p id="sysmsg">The system returned: <i>(111) Connection refused</i></p> 

<p>The remote host or network may be down. Please try the request again.</p> 
... 

문제를 좁히는 것이 도움이 될 것입니다.

답변

0

모든 아웃 바운드 트래픽을 프록시 처리하는 http_proxy bash 변수가 설정되었습니다. 이 변수가 설정되지 않으면 curl 명령이 작동합니다.

이 수정이 이루어지기 전에도 Java 응용 프로그램이 여전히 로컬로 Elasticsearch에 연결할 수 있다는 것을 알았습니다. 실제로 작동하지 않는 컬 명령이었습니다.

관련 문제