ibmbpm / bpm_analytics

Technology Demonstration for the IBM BPM Analytics solution based on Elasticsearch and Kibana
15 stars 7 forks source link

Fielddata is disabled on text fields by default. Set fielddata=true on [bpmSystemId] in order to load fielddata in memory by uninverting the inverted index. #6

Open blackwhites opened 6 years ago

blackwhites commented 6 years ago

Hi, I follow the guide to install bpm_analutics. My elasticsearch version is 5.4.3 .When I run the EventSummaryAgent.sh, it will always report the below error CWMCD2007I: Starting to retrieve process or activity events from the data source. CWMCD0012E: An unexpected exception was thrown when the data was retrieved.

So I check the log in the EventSummaryAgent/logs folder,the below is the error log [Jan 4, 2018 3:13:11 AM ] 0000000f SEVERE: com.ibm.bpm.mon.oi.facade.ESEventSourceFacadeImpl.querySystemIds - CWMCD0012E: An unexpected exception was thro$ org.elasticsearch.client.ResponseException: POST http://localhost:9200/bpm-events/_search: HTTP/1.1 400 Bad Request {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [bpmSystemId$ at org.elasticsearch.client.RestClient$1.completed(RestClient.java:311) at org.elasticsearch.client.RestClient$1.completed(RestClient.java:300) at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119) at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:177) at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:436) at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:326) at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265) at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81) at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39) at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588) at java.lang.Thread.run(Thread.java:748)

zhangs-ibm commented 6 years ago

Hi, this is the ES document about this exception: https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html

Obviously, the bpmSystemId at your ES use the text type, but this index mapping should be created by the BPMEventEmitter, it use the keyword as the type:

"bpmSystemId": {
                    "type": "keyword"
                },

Could you run GET /your_index_name/_mapping to confirm that. If this is the case(text as the type), please:

  1. stop the BPMEventEmitter application
  2. delete the your index
  3. start the BPMEventEmitter application and check if there is any exception.
  4. get the index mapping again to see if the type change to keyword.