-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Case statistics dashboard loads with an error #1628
Comments
Looks like the inline scripts are not enable in elasticsearch, could you check that? https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting-security.html |
Hello, Nabil Adouani! |
Additionally. Previously, I performed migration procedures from ES 5.6, through re-index, to ES 6.x, after which I updated to ES 7.x. The migration procedures were carried out in accordance with the instructions (upgrade_to_thehive_3_4_and_es_6_x.md and upgrade_to_thehive_3_5_and_es_7_x.md) (and for the Сortex according to similar instructions). But, I did a fresh (clean) install too (TH-3.5.0-1 C-3.1.0-1 ES-7.x). The problem with dashboards was exactly the same. |
Hello, Nabil Adouani! |
@24kuznec I'm unable to reproduce this issue. The dashboard seems to work fine |
Case statistics dashboard loads with an error message and the case over time widget fails to display data
Request Type
Bug TheHive3
Work Environment
Problem Description
Case statistics dashboard loads with an error message and the case over time widget fails to display data
Steps to Reproduce
Complementary information
/var/log/thehive/application.log
2020-11-07 23:09:32,129 [ERROR] from org.elastic4play.database.DBConfiguration in application-akka.actor.default-dispatcher-69 - ElasticSearch request failure: POST:/the_hive_16/_search?
StringEntity({"query":{"bool":{"must":[{"term":{"relations":{"value":"case"}}},{"range":{"createdAt":{"gt":"1596819600000","lt":"1604854799999"}}}]}},"size":0,"aggs":{"datehistogram_createdAt":{"date_histogram":{"calendar_interval":"1w","field":"createdAt"},"aggs":{"agg_1":{"filter":{"term":{"status":{"value":"Resolved"}}},"aggs":{"agg_1":{"avg":{"script":{"lang":"painless","source":"(doc['endDate'].date.getMillis() - doc['startDate'].date.getMillis()) / 3600000"}}}}},"agg_2":{"filter":{"match_all":{}},"aggs":{"agg_2":{"filter":{"match_all":{}}}}}}}}},Some(application/json))
=> ElasticError(search_phase_execution_exception,all shards failed,None,None,None,List(ElasticError(script_exception,runtime error,None,None,None,null,None,None,None,null)),None,Some(query),Some(true),List(FailedShard(0,Some(the_hive_16),Some(EBfTQ2DkTIaSTGg8v0A9bA),Some(ElasticError(script_exception,runtime error,None,None,None,null,Some(CausedBy(illegal_argument_exception,Illegal list shortcut value [date].,Map())),None,None,null)))))
2020-11-07 23:09:32,130 [INFO] from org.elastic4play.ErrorHandler in application-akka.actor.default-dispatcher-69 - POST /api/case/_stats returned 400
org.elastic4play.SearchError: Invalid search query
at org.elastic4play.database.DBFind$$anonfun$apply$4.applyOrElse(DBFind.scala:118)
at org.elastic4play.database.DBFind$$anonfun$apply$4.applyOrElse(DBFind.scala:116)
at scala.concurrent.Future.$anonfun$recoverWith$1(Future.scala:417)
at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:56)
at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:93)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:93)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:48)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
The text was updated successfully, but these errors were encountered: