Seeing exception when using Elasticsearch + MySQL

Using the temporal helm charts with MySQL and elasticsearch.enabled=true, I’m seeing a “search_phase_execution_exception” when using Temporal Web:

This stack trace pops up in the logs for elasticsearch-master-0:

{“type”: “server”, “timestamp”: “2020-07-07T18:01:11,425Z”, “level”: “DEBUG”, “component”: “o.e.a.s.TransportSearchAction”, “”: “elasticsearch”, “”: “elasticsearch-master-0”, “message”: “All shards failed for phase: [query]”, “cluster.uuid”: “5p7x6DWoRBOMkXWlKRewTg”, “”: “6bA93ZRJTdSCLPRcIUgw2A” ,
“stacktrace”: [“org.elasticsearch.index.query.QueryShardException: No mapping found for [StartTime] in order to sort on”,
“at ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at$200( ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at$2.lambda$onResponse$0( ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at$runAsync$0( ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun( ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun( ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at ~[elasticsearch-7.7.0.jar:7.7.0]”,
“at java.util.concurrent.ThreadPoolExecutor.runWorker( ~[?:?]”,
“at java.util.concurrent.ThreadPoolExecutor$ ~[?:?]”,
“at [?:?]”] }

I can also verify the keys are setup properly by running:

bash-5.0# tctl --namespace default cl get-search-attr
| BinaryChecksums | Keyword |
| CloseTime | Int |
| CustomBoolField | Bool |
| CustomDatetimeField | Datetime |
| CustomDoubleField | Double |
| CustomIntField | Int |
| CustomKeywordField | Keyword |
| CustomStringField | String |
| ExecutionStatus | Int |
| ExecutionTime | Int |
| HistoryLength | Int |
| NamespaceId | Keyword |
| RunId | Keyword |
| StartTime | Int |
| TaskQueue | Keyword |
| TemporalChangeVersion | Keyword |
| WorkflowId | Keyword |
| WorkflowType | Keyword |

I’m not sure where to go from here, perhaps there’s an Elasticsearch mapping template that hasn’t been applied? Any help would be appreciated.


Hi, Paul!

Thank you for trying this and for the report.

Let me try to reproduce this problem.

Do you think you could share the full command line you used to run helm install, and the version of temporal helm chart that you are using (e. g. the output of git log -n 1 --pretty=oneline in temporal-helm-charts repo)?

Thank you!

In the meantime, I was able to deploy the latest default Temporal Helm Chart (Cassandra) from @markmark (0.26.0) by applying the following changes to the elasticsearch config:

  enabled: true
  replicas: 3
    enabled: false
  imageTag: 6.8.8
  antiAffinity: soft

The addition of antiAffinity allows the elasticsearch cluster to run on a single node (for my dev server).


The cassandra deployment seems to be working fine for me now, although it does take longer to start but at least I can get back to development. In the case it does go down again and I’m forced to use MySQL, I’ll be sure to report the steps I take to this thread.



Ok, great, thank you, please don’t hesitate to ping if you run into problems. (and I will plan to test our mysql / ES scenario a bit more).

1 Like