저는 python 및 elasticsearch에 익숙하지 않아 샘플 응용 프로그램을 실행하려고합니다. 하지만 내 elasticsearch 연결은 약간의 오류를 보여줍니다. elasticsearch를 설치하고 서버를 시작했습니다. 응용 프로그램에서python elasticsearch 클라이언트 오류 : get_alias 시간 초과되었습니다.
.get_alias가 호출ES_URL = ['thrift://127.0.0.1:9200']
connection = pyes.ES(ES_URL)
index = connection.indices.get_alias('staging-asset')
, 그것은
Client error: timed out
Traceback (most recent call last):
File "/Users/shahanahamza/.virtualenvs/cms/lib/python2.7/site-
packages/pyes/connection.py", line 151, in _client_call
return getattr(conn.client, attr)(*args, **kwargs)
File "/Users/shahanahamza/.virtualenvs/cms/lib/python2.7/site-
packages/pyes/pyesthrift/Rest.py", line 41, in execute
return self.recv_execute()
File "/Users/shahanahamza/.virtualenvs/cms/lib/python2.7/site-
packages/pyes/pyesthrift/Rest.py", line 52, in recv_execute
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
File "/Users/shahanahamza/.virtualenvs/cms/lib/python2.7/site-
packages/thrift/protocol/TBinaryProtocol.py", line 126, in
readMessageBegin
sz = self.readI32()
File "/Users/shahanahamza/.virtualenvs/cms/lib/python2.7/site-
packages/thrift/protocol/TBinaryProtocol.py", line 206, in readI32
buff = self.trans.readAll(4)
File "/Users/shahanahamza/.virtualenvs/cms/lib/python2.7/site-
packages/thrift/transport/TTransport.py", line 58, in readAll
chunk = self.read(sz - have)
File "/Users/shahanahamza/.virtualenvs/cms/lib/python2.7/site-
packages/thrift/transport/TTransport.py", line 159, in read
self.__rbuf = StringIO(self.__trans.read(max(sz, self.__rbuf_size)))
File "/Users/shahanahamza/.virtualenvs/cms/lib/python2.7/site-
packages/thrift/transport/TSocket.py", line 103, in read
buff = self.handle.recv(sz)
timeout: timed out
문제를 알아 내기 위해 제발 도와주세요 보여이 같은 코드가있다. 미리 감사드립니다. @omri에 의해 주석에서 언급 한 바와 같이
제한 시간 임계 값을 늘리려고 했습니까? 'es = Elasticsearch (timeout = 30, max_retries = 10, retry_on_timeout = True)' –
아니요, 어디에서 설정해야합니까? 난 단지 응용 프로그램에서 ElasticSearchIndex 및 pyes를 가져 오는 것을 볼 수 있습니다. –