KeyError using python helpers.scan

Hi Everyone!

I'm using ES for 6 months in production and today I was caught by an error
being thrown by helpers.scan() method, what I could see is that scan always
expect the response to contain the key _scroll_id, so I'm trying to
understand it it's a problem in python wrappers or a problem in my ES
servers that didn't respond correctly to the request.

Any recommendations?

Thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6e56b021-4193-4152-82fc-df570229cbcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Bruno,

this definitely shouldn't be happening. Could you turn on your logging
for the python library to see what's going on? Just enabling the
elasticsearch logger in python logging module should do the trick.

Thanks!

On Mon, Oct 6, 2014 at 7:21 PM, Bruno Ribeiro da Silva
bruno.devpod@gmail.com wrote:

Hi Everyone!

I'm using ES for 6 months in production and today I was caught by an error
being thrown by helpers.scan() method, what I could see is that scan always
expect the response to contain the key _scroll_id, so I'm trying to
understand it it's a problem in python wrappers or a problem in my ES
servers that didn't respond correctly to the request.

Any recommendations?

Thanks!

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6e56b021-4193-4152-82fc-df570229cbcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CABfdDio9oYB6nswaxpnG%3D7tMxpmTxC3THa710FnPExXzrhnMTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi, thanks for the help, this is what I have from my yesterday logs:

INFO 2014-10-06 15:05:03,794
/env/local/lib/python2.7/site-packages/elasticsearch/connection/base.py:57
GET http://192.168.0.1:9200/events/event/_sea
rch?search_type=scan&scroll=1m [status:200 request:0.010s]
ERROR 2014-10-06 15:05:03,795 reports.py:123 Cannot generate report
Traceback (most recent call last):
File
"/env/local/lib/python2.7/site-packages/elasticsearch/helpers/init.py",
line 176, in scan
scroll_id = resp['_scroll_id']
KeyError: 'scroll_id'
WARNING 2014-10-06 15:05:03,794
/env/local/lib/python2.7/site-packages/elasticsearch/connection/base.py:76
GET http://192.168.0.1:9200/events/event/

search?routing=123 [status:N/A request:0.012s]
Traceback (most recent call last):
File
"/env/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py",
line 46, in perform_request
response = self.pool.urlopen(method, url, body, retries=False,
headers=headers, **kw)
File "/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py",
line 559, in urlopen
_pool=self, _stacktrace=stacktrace)
File "/env/local/lib/python2.7/site-packages/urllib3/util/retry.py", line
223, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py",
line 516, in urlopen
body=body, headers=headers)
File "/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py",
line 354, in _make_request
self, url, "Read timed out. (read timeout=%s)" % read_timeout)
ReadTimeoutError: HTTPConnectionPool(host=u'192.168.0.1', port=9200): Read
timed out. (read timeout=10)

The timeout following the error is from different request but maybe it
helps to understand the problem that's why I pasted it too.

I'm using py-elasticsearch 1.2.0 and I have two elastic search servers both
at version 1.3.2 of elasticsearch.

Thanks in advance!

On Tuesday, October 7, 2014 4:25:09 AM UTC-3, Honza Král wrote:

Hi Bruno,

this definitely shouldn't be happening. Could you turn on your logging
for the python library to see what's going on? Just enabling the
elasticsearch logger in python logging module should do the trick.

Thanks!

On Mon, Oct 6, 2014 at 7:21 PM, Bruno Ribeiro da Silva
<bruno....@gmail.com <javascript:>> wrote:

Hi Everyone!

I'm using ES for 6 months in production and today I was caught by an
error
being thrown by helpers.scan() method, what I could see is that scan
always
expect the response to contain the key _scroll_id, so I'm trying to
understand it it's a problem in python wrappers or a problem in my ES
servers that didn't respond correctly to the request.

Any recommendations?

Thanks!

--
You received this message because you are subscribed to the Google
Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/elasticsearch/6e56b021-4193-4152-82fc-df570229cbcf%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/70acdf5d-186e-4003-bc4d-e8972a885435%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.