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

Fix TestAuditMigration failing with ES 8

    XMLWordPrintable

    Details

      Description

      Observed by running https://jenkins.platform.dev.nuxeo.com/job/nuxeo/job/lts/job/nuxeo-es/ with:

      NUXEO_BRANCH=2023
      ELASTICSEARCH_IMAGE_TAG=8.7.0
      

      Stacktrace (full log attached):

      org.nuxeo.ecm.core.api.NuxeoException: 
      org.opensearch.client.ResponseException: method [PUT], host [http://elasticsearch-master.platform-nuxeo-unit-tests-22-mongodb-es.svc.cluster.local:9200], URI [/audit/_mapping], status line [HTTP/1.1 400 Bad Request]
      {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Failed to parse mapping: Error parsing [format] on field [logDate]: Invalid format: [dateOptionalTime]: Unknown pattern letter: t"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping: Error parsing [format] on field [logDate]: Invalid format: [dateOptionalTime]: Unknown pattern letter: t","caused_by":{"type":"illegal_argument_exception","reason":"Error parsing [format] on field [logDate]: Invalid format: [dateOptionalTime]: Unknown pattern letter: t","caused_by":{"type":"illegal_argument_exception","reason":"Invalid format: [dateOptionalTime]: Unknown pattern letter: t","caused_by":{"type":"illegal_argument_exception","reason":"Unknown pattern letter: t"}}}},"status":400}
      	at org.nuxeo.elasticsearch.client.ESRestClient.performRequest(ESRestClient.java:248)
      	at org.nuxeo.elasticsearch.client.ESRestClient.performRequestWithTracing(ESRestClient.java:257)
      	at org.nuxeo.elasticsearch.client.ESRestClient.createMapping(ESRestClient.java:223)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.initIndex(ElasticSearchAdminImpl.java:532)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.initIndex(ElasticSearchAdminImpl.java:402)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.initIndex(ElasticSearchAdminImpl.java:387)
      	at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.initIndexes(ElasticSearchAdminImpl.java:345)
      	at org.nuxeo.elasticsearch.ElasticSearchComponent.initIndexes(ElasticSearchComponent.java:257)
      	at org.nuxeo.elasticsearch.TestAuditMigration.setupIndex(TestAuditMigration.java:100)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      	at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeSetupStatement.evaluate(FeaturesRunner.java:471)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner.evaluateRunnable(FeaturesRunner.java:328)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterMethodRunStatement.evaluate(FeaturesRunner.java:493)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner.evaluateRunnable(FeaturesRunner.java:328)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterTeardownStatement.evaluate(FeaturesRunner.java:506)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:576)
      	at org.nuxeo.runtime.test.runner.RuntimeDeployment$DeploymentStatement.evaluate(RuntimeDeployment.java:293)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$AfterClassStatement.evaluate(FeaturesRunner.java:404)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$RulesFactory$1.evaluate(FeaturesRunner.java:576)
      	at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeClassStatement.evaluate(FeaturesRunner.java:387)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      Caused by: org.opensearch.client.ResponseException: method [PUT], host [http://elasticsearch-master.platform-nuxeo-unit-tests-22-mongodb-es.svc.cluster.local:9200], URI [/audit/_mapping], status line [HTTP/1.1 400 Bad Request]
      {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Failed to parse mapping: Error parsing [format] on field [logDate]: Invalid format: [dateOptionalTime]: Unknown pattern letter: t"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping: Error parsing [format] on field [logDate]: Invalid format: [dateOptionalTime]: Unknown pattern letter: t","caused_by":{"type":"illegal_argument_exception","reason":"Error parsing [format] on field [logDate]: Invalid format: [dateOptionalTime]: Unknown pattern letter: t","caused_by":{"type":"illegal_argument_exception","reason":"Invalid format: [dateOptionalTime]: Unknown pattern letter: t","caused_by":{"type":"illegal_argument_exception","reason":"Unknown pattern letter: t"}}}},"status":400}
      	at org.opensearch.client.RestClient.convertResponse(RestClient.java:344)
      	at org.opensearch.client.RestClient.performRequest(RestClient.java:314)
      	at org.opensearch.client.RestClient.performRequest(RestClient.java:289)
      	at org.nuxeo.elasticsearch.client.ESRestClient.performRequest(ESRestClient.java:246)
      	... 49 more
      

      Standard output:

      2023-04-27 12:53:43,905 [stream/introspectionPool-00,in:16,inCheckpoint:16,out:0,lastRead:1682600018533,lastTimer:0,wm:220541749533081601,loop:60,rebalance revoked] WARN  [StreamIntrospectionComputation] Instance elected to introspect Nuxeo Stream activity
      2023-04-27 12:53:45,403 [main] WARN  [TransientStorageComponent] Missing configuration for default transient store, using in-memory
      2023-04-27 12:53:45,929 [main] WARN  [DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
      ElasticSearchClient: RestClient on http://elasticsearch-master.platform-nuxeo-unit-tests-22-mongodb-es.svc.cluster.local:9200
      2023-04-27 12:53:46,058 [opensearch[nuxeoTestNode][clusterApplierService#updateTask][T#1]] WARN  [ClusterApplierService] failed to notify ClusterStateListener
      org.apache.lucene.util.SetOnce$AlreadySetException: The object cannot be set twice!
      	at org.apache.lucene.util.SetOnce.set(SetOnce.java:74) ~[lucene-core-8.10.1.jar:8.10.1 2f24e6a49d48a032df1f12e146612f59141727a9 - mayyasharipova - 2021-10-12 15:13:05]
      	at org.opensearch.common.logging.NodeAndClusterIdConverter.setNodeIdAndClusterId(NodeAndClusterIdConverter.java:72) ~[opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.common.logging.NodeAndClusterIdStateListener.onNewClusterState(NodeAndClusterIdStateListener.java:82) ~[opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.cluster.ClusterStateObserver$ContextPreservingListener.onNewClusterState(ClusterStateObserver.java:355) ~[opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.cluster.ClusterStateObserver$ObserverClusterStateListener.clusterChanged(ClusterStateObserver.java:223) ~[opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.cluster.service.ClusterApplierService.callClusterStateListener(ClusterApplierService.java:610) [opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.cluster.service.ClusterApplierService.callClusterStateListeners(ClusterApplierService.java:598) [opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:562) [opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:469) [opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.cluster.service.ClusterApplierService.access$000(ClusterApplierService.java:81) [opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:180) [opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:733) [opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.common.util.concurrent.PrioritizedOpenSearchThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedOpenSearchThreadPoolExecutor.java:275) [opensearch-1.3.9.jar:1.3.9]
      	at org.opensearch.common.util.concurrent.PrioritizedOpenSearchThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedOpenSearchThreadPoolExecutor.java:238) [opensearch-1.3.9.jar:1.3.9]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
      	at java.lang.Thread.run(Thread.java:833) [?:?]
      2023-04-27 12:53:46,093 [main] WARN  [RequestLogger] request [POST http://elasticsearch-master.platform-nuxeo-unit-tests-22-mongodb-es.svc.cluster.local:9200/audit/_search?typed_keys=true&max_concurrent_shard_requests=5&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&search_type=dfs_query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true] returned 1 warnings: [299 Elasticsearch-8.7.0-09520b59b6bc1057340b55750186466ea715e30e "[ignore_throttled] parameter is deprecated because frozen indices have been deprecated. Consider cold or frozen tiers in place of frozen indices."]
      2023-04-27 12:53:46,372 [main] WARN  [TransientStorageComponent] Missing configuration for default transient store, using in-memory
      2023-04-27 12:53:46,377 [main] WARN  [TransientStorageComponent] Missing configuration for default transient store, using in-memory
      2023-04-27 12:53:46,378 [main] WARN  [TransientStorageComponent] Missing configuration for default transient store, using in-memory
      2023-04-27 12:53:46,573 [stream/introspectionPool-00,in:0,inCheckpoint:0,out:0,lastRead:1682600026573,lastTimer:0,wm:0,loop:1,rebalance assigned] WARN  [StreamIntrospectionComputation] Instance elected to introspect Nuxeo Stream activity
      2023-04-27 12:53:46,674 [main] WARN  [RequestLogger] request [POST http://elasticsearch-master.platform-nuxeo-unit-tests-22-mongodb-es.svc.cluster.local:9200/audit/_search?typed_keys=true&max_concurrent_shard_requests=5&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&search_type=dfs_query_then_fetch&batched_reduce_size=512&ccs_minimize_roundtrips=true] returned 1 warnings: [299 Elasticsearch-8.7.0-09520b59b6bc1057340b55750186466ea715e30e "[ignore_throttled] parameter is deprecated because frozen indices have been deprecated. Consider cold or frozen tiers in place of frozen indices."]
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: