openannotation / annotator-store

A backend store for the Annotator
http://annotateit.org/
MIT License
176 stars 66 forks source link

Problem while performing python run.py #122

Closed laskasn closed 9 years ago

laskasn commented 9 years ago

Hello all, i am trying to initiate the store, as exactly described on the instructions, but i get an IndexAlreadyExists exception while executing the "python run.py" I have a fully functional elasticsearch instance and i have modified the annotator.cfg accordingly to point at that.

I post the stack trace. Thanks in advance!

2015-03-30 18:26:26 30788 annotator.elasticsearch [INFO] Creating index 'annotator'. 2015-03-30 18:26:26 30788 elasticsearch [WARNING] PUT /annotator [status:400 request:0.021s] 2015-03-30 18:26:26 30788 annotator.elasticsearch [CRITICAL] Failed to create an Elasticsearch index Traceback (most recent call last): File "run.py", line 111, in main() File "run.py", line 65, in main annotation.Annotation.create_all() File "/home/nikolas/socialLiferay/annotator-store/annotator/elasticsearch.py", line 95, in create_all conn.indices.create(cls.es.index) File "/home/nikolas/socialLiferay/annotator-store/pyenv/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 68, in _wrapped return func(_args, params=params, *_kwargs) File "/home/nikolas/socialLiferay/annotator-store/pyenv/local/lib/python2.7/site-packages/elasticsearch/client/indices.py", line 97, in create params=params, body=body) File "/home/nikolas/socialLiferay/annotator-store/pyenv/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 307, in perform_request status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout) File "/home/nikolas/socialLiferay/annotator-store/pyenv/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 86, in perform_request self._raise_error(response.status, raw_data) File "/home/nikolas/socialLiferay/annotator-store/pyenv/local/lib/python2.7/site-packages/elasticsearch/connection/base.py", line 102, in _raise_error raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info) elasticsearch.exceptions.RequestError: TransportError(400, u'RemoteTransportException[[Troll][inet[/155.207.126.2:9300]][indices:admin/create]]; nested: IndexAlreadyExistsException[[annotator] already exists]; ')

tilgovi commented 9 years ago

This is what I get:

(annotator-store)[master] tilgovi@elpis:~/src/openannotation/annotator-store ./run.py 
2015-03-30 10:42:04 9447 annotator.elasticsearch [INFO] Creating index 'annotator'.
2015-03-30 10:42:04 9447 elasticsearch [WARNING] PUT /annotator [status:400 request:0.002s]
2015-03-30 10:42:04 9447 annotator.elasticsearch [WARNING] Index creation failed as index appears to already exist.
2015-03-30 10:42:04 9447 annotator.elasticsearch [INFO] Creating index 'annotator'.
2015-03-30 10:42:04 9447 elasticsearch [WARNING] PUT /annotator [status:400 request:0.001s]
2015-03-30 10:42:04 9447 annotator.elasticsearch [WARNING] Index creation failed as index appears to already exist.
2015-03-30 10:42:04 9447 werkzeug [INFO]  * Running on http://127.0.0.1:5000/
2015-03-30 10:42:04 9447 werkzeug [INFO]  * Restarting with reloader
2015-03-30 10:42:04 9450 annotator.elasticsearch [INFO] Creating index 'annotator'.
2015-03-30 10:42:04 9450 elasticsearch [WARNING] PUT /annotator [status:400 request:0.002s]
2015-03-30 10:42:04 9450 annotator.elasticsearch [WARNING] Index creation failed as index appears to already exist.
2015-03-30 10:42:04 9450 annotator.elasticsearch [INFO] Creating index 'annotator'.
2015-03-30 10:42:04 9450 elasticsearch [WARNING] PUT /annotator [status:400 request:0.003s]
2015-03-30 10:42:04 9450 annotator.elasticsearch [WARNING] Index creation failed as index appears to already exist.

These are only warnings for me.

Can you share your .cfg file? Are you running from the latest master?

laskasn commented 9 years ago

Well, i already had the latest. What i did, was a clean installation of the latest elastic search (from source), and now it gives the same output as yours! It works like a charm - stores and retrieves the annotations. Thanks!