TheHive-Project / TheHive-Project/Cortex
Cortex 3.1.0 can't create ES index
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
Work Environment
| Question | Answer |
|---|---|
| OS version (server) | Ubuntu 20.04 |
| Cortex version / git hash | 3.0.1-1 |
| Package Type | Binary |
| ElasticSearch | 7.8.0 |
Problem Description
I started Cortex with a very standard config based on the provided one in which essentially I just changed the url and index. But when i tried starting it up I got:
[error] o.e.d.DBConfiguration [|] ElasticSearch request failure: POST:/cortex_4/_search?scroll=60000ms
StringEntity({"version":"true","query":{"bool":{"must":[{"term":{"relations":{"value":"worker"}}},{"match_all":{}}]}},"from":0,"sort":[{"_id":{"order":"desc"}}]},Some(application/json))
=> ElasticError(index_not_found_exception,no such index [cortex_4],Some(_na_),Some(cortex_4),None,List(ElasticError(index_not_found_exception,no such index [cortex_4],Some(_na_),Some(cortex_4),None,null,None)),None)
[warn] o.e.d.SearchWithScroll [|] Search error
org.elastic4play.IndexNotFoundException$: null
at org.elastic4play.IndexNotFoundException$.<clinit>(Errors.scala)
at org.elastic4play.database.DBConfiguration.$anonfun$execute$2(DBConfiguration.scala:145)
at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
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:55)
at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)
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:91)
Which went away after I created the cortex_4 index manually. But why was it not created automatically? Does that not happen?
But the installation guide in no way mentions that an index needs to be created.
Possible Solutions
As I said I created the index manually, but:
- If it needs to be created manually then it should be documented.
- If it's not supposed to be created manually why does it complain that it doesn't exist?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the startup failure using the provided application.sample configuration, Ubuntu 20.04, Cortex 3.0.1-1, and Elasticsearch 7.8.0. Compare the behavior with the Elasticsearch installation section of the installation guide and determine whether cortex_4 should be created automatically or documented as a manual prerequisite. Done means the expected index-creation behavior is established and the issue's requested fix or documentation is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, scala
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100