Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23730

Elasticsearch index aliases does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.3
    • Fix Version/s: 9.10
    • Component/s: Elasticsearch

      Description

      When an Elasticsearch index is pointing to an alias (instead of true index) and when using the default transport client protocol, Nuxeo throws a NPE when trying to access the index:

      2017-11-21 17:46:19,341 ERROR [localhost-startStop-1] [org.nuxeo.runtime.model.impl.RegistrationInfoImpl] Component service:org.nuxeo.elasticsearch.ElasticSearchComponent notification of application started failed: null
      java.lang.NullPointerException
      	at org.nuxeo.elasticsearch.client.ESTransportClient.mappingExists(ESTransportClient.java:126)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.initIndex(ElasticSearchAdminImpl.java:420)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.initIndex(ElasticSearchAdminImpl.java:352)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.initIndex(ElasticSearchAdminImpl.java:337)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.initIndexes(ElasticSearchAdminImpl.java:301)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.initializeIndexes(ElasticSearchAdminImpl.java:189)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.<init>(ElasticSearchAdminImpl.java:100)
      	at org.nuxeo.elasticsearch.ElasticSearchComponent.start(ElasticSearchComponent.java:168)
      

       org.nuxeo.elasticsearch.client.ESTransportClient#mappingExists must be fixed to handle aliases.

      Also the workaround in the mean time is to use the Rest client:

      elasticsearch.client=RestClient
      elasticsearch.addressList=http://localhost:9200
      

      A test should be done with NXP-19192 use case with both client to make sure this feature is operational.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 2 hours
                  2d 2h