denshoproject / ddr-local

Web UI used for interacting with DDR collections and entities on a local machine.
Other
3 stars 0 forks source link

RequestError in adding a new object to collection #268

Closed pkikawa closed 4 years ago

pkikawa commented 4 years ago

RequestError at _ui_entity_ddr-testing-40300new-idservice.zip

master 4.0.0

clicked add object in ddr-testing-40300 a known good testing collection

Entiat workstation

gjost commented 4 years ago

When you save objects the editor tries to index them with the local Elasticsearch. I think the error is because the new Elasticsearch7 code is trying to interact with an old Elasticsearch2.* server.

The solution is to edit /etc/ddr/ddrlocal-local.cfg and change [local] docstore_host to point to an Elasticsearch7 server.

gjost commented 4 years ago

See https://github.com/densho/ddr-local/issues/269

This happens when using the current DDR with an old Elasticsearch server e.g. 2.4. I can't fix having the wrong server but ddr-local commit 9d16e3d for package ddrlocal-rc_4.0.0-rc3~deb9 should catch the RequestErrors so the program doesn't crash. Records in the local Elasticsearch will not be updated of course.

pkikawa commented 4 years ago

error in adding objects to collection Error: {'error': RequestError(400, u'invalid_type_name_exception', {u'status': 400, u'error': {u'rootcause': [{u'reason': u"Document mapping type name can't start with ''", u'type': u'invalid_type_name_exception'}], u'type': u'invalid_type_nameexception', u'reason': u"Document mapping type name can't start with ''"}})}

sarabeckman commented 4 years ago

Error in adding objects to collection RequestError(400, u'invalid_type_name_exception', {u'status': 400, u'error': {u'rootcause': [{u'reason': u"Document mapping type name can't start with ''", u'type': u'invalid_type_name_exception'}], u'type': u'invalid_type_nameexception', u'reason': u"Document mapping type name can't start with ''"}}) is not JSON serializable

I'm getting a full page Error not just in the git status messages. After getting the full page error I can't load any other page in Editor UI. I get the page RequestError400 when trying to load any page in Editor. (Main Editor UI page, collection list page)

pkikawa commented 4 years ago

rc3 for both me and sara

gjost commented 4 years ago

I set up a fresh Debian 9 VM, installed ddrlocal-rc_4.0.0-rc3~deb9_amd64.deb on it, pointed it at another VM that's running Elasticsearch 7, and was able to successfully create and edit entities, segments, and files. NOTE: DDR no longer works with Elasticsearch 2.4 NOTE: You need to set up an Elasticsearch 7.4 server, then edit /etc/ddr/ddrlocal-local.cfg on the VM, setting [local] docstore_host to point to the new ES7.