chartpath / ramses-elasticsearch

Guest post for Elastic.co
https://www.elastic.co/blog
13 stars 2 forks source link

Default install fails #3

Open scottemackenzie opened 8 years ago

scottemackenzie commented 8 years ago

https://www.elastic.co/blog/make-an-elasticsearch-powered-rest-api-for-any-data-with-ramses Using above default process the build fails.

Error Output

2016-02-07 22:18:20,337 INFO [nefertari.elasticsearch][MainThread] elasticsearch.setup_mappings: Setting up ES mappings for all existing models 2016-02-07 22:18:20,361 WARNI [elasticsearch][MainThread] base.log_request_fail: PUT /gii_api/_mapping/Item [status:400 request:0.023s] 2016-02-07 22:18:20,361 ERROR [nefertari.elasticsearch][MainThread] elasticsearch.perform_request: illegal_argument_exception 2016-02-07 22:18:20,363 ERROR [nefertari.json_httpexceptions][MainThread] json_httpexceptions.create_json_response: 400 BAD REQUEST: {"timestamp": "2016-02-07T14:18:20Z", "title": "Bad Request", "status_code": 400, "explanation": "illegal_argument_exception", "extra": {"data": "TransportError(400, u'illegal_argument_exception', u'Field [_version] is defined twice in [Item]')"}, "message": null}

scottemackenzie commented 8 years ago

OS = Ubuntu 14.04 Kernel = 3.19.0-49-generic Elasticsearch = 2.2.0 "build_hash" : "8ff36d139e16f8720f2947ef62c8167a888992fe", "build_timestamp" : "2016-01-27T13:32:39Z", "build_snapshot" : false, "lucene_version" : "5.4.1" Python = 2.7.6 httpie = 1.0.0 virtualenv = 1.11.4 psql (PostgreSQL) 9.3.10 Mongodb 2.4.9

scottemackenzie commented 8 years ago

PS: Although mongo is installed we are testing with option 1 (psql) during build as per the guide. We have replicated this 5 times and the same error is present on all builds from clean install to the point of error.

scottemackenzie commented 8 years ago

Perhaps the version 2.x issue is related to nefertari bug: https://github.com/ramses-tech/nefertari/issues/130

For reference:

I can confirm that a downgrade to 1.x version of elasticsearch solves the build problem.

root@sbx-ub64-14:~# curl -XGET 'localhost:9200' { "status" : 200, "name" : "Orka", "cluster_name" : "elasticsearch", "version" : { "number" : "1.7.5", "build_hash" : "${buildNumber}", "build_timestamp" : "2016-02-08T06:33:41Z", "build_snapshot" : false, "lucene_version" : "4.10.4" }, "tagline" : "You Know, for Search" }

jobrienski commented 6 years ago

That old of a version of elasticsearch is difficult to install on some systems. I tried upgrading versions of requirements but this did not help. I eventually had to hack nefertari_sqla/documents.py file in my virtualenv and change the TYPES_MAP 'string' values to 'text'.