Skip to content
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

Cannot setup TheHive 3.4.0-RC2 using Docker #1051

Closed
ITrustSI opened this issue Jul 11, 2019 · 27 comments
Closed

Cannot setup TheHive 3.4.0-RC2 using Docker #1051

ITrustSI opened this issue Jul 11, 2019 · 27 comments
Assignees
Labels
Milestone

Comments

@ITrustSI
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) Debian
OS version (client) 9.9
TheHive version / git hash 3.4.0-RC2
Package Type Docker (version 18.09.7)
Browser type & version Chrome 75 / Firefox 60.7.2esr

Problem Description

After upgrading TheHive 3.4.0-RC1 to TheHive 3.4.0-RC2 I decided to go with a fresh install.
When reaching the home page, I'm redirected to the login page and not the maintenance one.
Strange fact : I see the maintenance page flashing before reaching the login page. Also, if I enter random credentials and hit the login button, I see the maintenance page flashing in and out again before getting back to the login page.

Steps to Reproduce

  1. Install Docker
  2. Start a fresh TheHive instance
  3. Try to setup TheHive

Complementary information

The configuration file if needed : 
play.http.secret.key="..."

search {
  index = the_hive
  uri = "http://elasticsearch:9200?cluster.name=hive"

  keepalive = 1m
  pagesize = 50
  nbshards = 2
  nbreplicas = 1
}

# Authentication
auth {
	provider = [local]
}

session {
  warning = 5m
  inactivity = 1h
}

play.http.parser.maxMemoryBuffer= 1M
play.http.parser.maxDiskBuffer = 1G

Below the TheHive logs for a single request to the index.html

[info] p.c.s.AkkaHttpServer - Enabling HTTP/2 on Akka HTTP server...

[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0.0.0.0:9000

[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?
StringEntity({"query":{"match":{"relations":{"query":"user"}}},"size":0},Some(application/json))
 => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)

[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?
StringEntity({"query":{"match":{"relations":{"query":"user"}}},"size":0},Some(application/json))
 => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)

[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?
StringEntity({"version":"true","query":{"ids":{"values":["init"]}},"size":1},Some(application/json))
 => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)

[info] o.e.ErrorHandler - GET /api/user/current returned 520
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:303)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
	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:12)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)
	at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)

[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?scroll=60000ms
StringEntity({"version":"true","query":{"bool":{"must":[{"term":{"relations":{"value":"dblist"}}},{"term":{"dblist":{"value":"ui_settings"}}}]}},"from":0,"sort":[{"_id":{"order":"desc"}}]},Some(application/json)) => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)

[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?
StringEntity({"query":{"match":{"relations":{"query":"user"}}},"size":0},Some(application/json)) => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)

[info] o.e.ErrorHandler - GET /api/stream/F95QFQnEVkEbKezG38rO returned 401
org.elastic4play.AuthenticationError: Authentication header not found
	at org.elastic4play.controllers.Authenticated.$anonfun$getFromApiKey$1(Authenticated.scala:143)
	at scala.Option.fold(Option.scala:158)
	at org.elastic4play.controllers.Authenticated.getFromApiKey(Authenticated.scala:143)
	at controllers.StreamCtrl.$anonfun$get$1(StreamCtrl.scala:99)
	at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:488)
	at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:486)
	at play.api.mvc.ActionBuilder$$anon$10.apply(Action.scala:425)
	at play.api.mvc.Action.$anonfun$apply$2(Action.scala:97)
	at play.api.libs.streams.StrictAccumulator.$anonfun$mapFuture$4(Accumulator.scala:183)
	at scala.util.Try$.apply(Try.scala:209)

Thank you for your time !

@ITrustSI
Copy link
Author

Note : I have similar error messages ([info] o.e.ErrorHandler - GET /api/stream/$STREAM_ID$ returned 401) in the Cortex RC4, but not with the same consequences. Could this be related?
See cortex 3.0.0-RC4 container : StreamSrv error popup spamming the setup page

@nadouani
Copy link
Contributor

Does TheHive redirect you to the first migration page? These errors are expected: TheHive doesn't find the database and ask for the migration

@ITrustSI
Copy link
Author

Hello,
I'm first redirected on the migration page but it's only flashing and I end up on the login page.
In the logs, at each login form submit, there is an error message indicating that the index has not been created yet.
On the UI side, at each login form submit I see the migration page flashing, but I end up redirected on the login page (so I'm not able to click on the "Update database").

@lo-chr
Copy link

lo-chr commented Jul 12, 2019

Same problem here, but with building TheHive from git repo.

@djexthreme
Copy link

Hi Guys,

I have the same issue (not able to do http://url/index.html#!/maintenance, return login page) and will post here the versions and logs to contribuite:

versions:
Docker version 18.09.7 / Docker Engine 18.09.7
REPOSITORY thehiveproject/thehive 3.4.0-RC2 / thehiveproject/cortex 3.0.0-RC4 / rabbitmq 3.7-management / elasticsearch 6.8.0 / thehiveproject/thehive latest

logs:
thehive_1 | [error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search? thehive_1 | StringEntity({"query":{"match":{"relations":{"query":"user"}}},"size":0},Some(application/json)) thehive_1 | => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None) thehive_1 | [info] o.e.ErrorHandler - GET /api/stream/itS0wDlqCzIhLbk5nN4O returned 401 thehive_1 | org.elastic4play.AuthenticationError: Authentication header not found thehive_1 | at org.elastic4play.controllers.Authenticated.$anonfun$getFromApiKey$1(Authenticated.scala:143) thehive_1 | at scala.Option.fold(Option.scala:158) thehive_1 | at org.elastic4play.controllers.Authenticated.getFromApiKey(Authenticated.scala:143) thehive_1 | at controllers.StreamCtrl.$anonfun$get$1(StreamCtrl.scala:99) thehive_1 | at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:488) thehive_1 | at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:486) thehive_1 | at play.api.mvc.ActionBuilder$$anon$10.apply(Action.scala:425) thehive_1 | at play.api.mvc.Action.$anonfun$apply$2(Action.scala:97) thehive_1 | at play.api.libs.streams.StrictAccumulator.$anonfun$mapFuture$4(Accumulator.scala:183) thehive_1 | at scala.util.Try$.apply(Try.scala:209)
Regards

@kindsjay
Copy link

Does TheHive redirect you to the first migration page? These errors are expected: TheHive doesn't find the database and ask for the migration

hi .i need you help

[error] o.e.d.DBConfiguration - ElasticSearch request failure: GET:/_cluster/health/the_hive_15?
=> ElasticError(security_exception,missing authentication token for REST request [/_cluster/health/the_hive_15],None,None,None,List(ElasticError(security_exception,missing authentication token for REST request [/_cluster/health/the_hive_15],None,None,None,null,None)),None)

es :6.7
i tested all way (thehive-3.4.0-RC1,thehive-3.4.0-RC2)

@ITrustSI
Copy link
Author

hi .i need you help

[error] o.e.d.DBConfiguration - ElasticSearch request failure: GET:/_cluster/health/the_hive_15?
=> ElasticError(security_exception,missing authentication token for REST request [/_cluster/health/the_hive_15],None,None,None,List(ElasticError(security_exception,missing authentication token for REST request [/_cluster/health/the_hive_15],None,None,None,null,None)),None)

es :6.7
i tested all way (thehive-3.4.0-RC1,thehive-3.4.0-RC2)

Hello,

Given your error message, your problem does not appear to be related to this topic as it states an authentication error : "security_exception,missing authentication token for REST request". Either you missed a parameter (have you checked the migration guide?) or it is indeed a bug. If the later, I think you'll be better opening your own issue.

@medtemo
Copy link

medtemo commented Jul 19, 2019

I have the same issue. I'm redirected to the login page and not the maintenance one.
thehive:3.4.0-RC2
elasticsearch:6.8.0
cortex:3.0.0-RC4

[error] o.e.d.DBConfiguration - ElasticSearch request failure: GET:/_cluster/health/the_hive_15?

[warn] o.e.c.RestClient - request [PUT http://172.18.0.2:9200/the_hive_15] returned 1 warnings: [299 Elasticsearch-6.8.0-65b6179 "[types removal] The parameter include_type_name should be explicitly specified in create index requests to prepare for 7.0. In 7.0 include_type_name will default to 'false', and requests are expected to omit the type name in mapping definitions."]

@stephen-goveia
Copy link

@nadouani Seeing same as original poster. Migration page flashes and redirect to login. At a minimum is a there anything that needs to be added to the docker-compose.yml besides the Elasticsearch data path i.e volumes: - /path/to/data:/usr/share/elasticsearch/data

@z0h
Copy link

z0h commented Jul 21, 2019

I'm seeing the same issue with RC2 as OP. Does anyone know whether it's possible just to emulate pressing the Update Database button via curl or something?

@JonathanJonathanJonathan

I'm seeing the same issue with RC2 as OP. Does anyone know whether it's possible just to emulate pressing the Update Database button via curl or something?

I tried to do curl -X POST http://127.0.0.1:9000/api/maintenance/migrate but it returns {"type":"NoNodeAvailable","message":"ElasticSearch cluster is unreachable"}

@aleixsb
Copy link

aleixsb commented Jul 22, 2019

I'm having the same problem here! I've tried to replicate the request to migrate the elastic and it kind of did the trick as index was created on ES but then no new user from pop up so could not create the admin user... also I get some errors on TheHive so probably it's not being able to migrate the full index

curl:
curl "http://192.168.1.53:9000/api/maintenance/migrate" -H "User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0" -H "Accept: application/json, text/plain, */*" -H "Accept-Language: en-US,en;q=0.5" --compressed -H "Referer: http://192.168.1.53:9000/index.html" -H "Content-Type: application/json;charset=utf-8" -H "X-THE-HIVE-XSRF-TOKEN: TOKEN" -H "Connection: keep-alive" -H "Cookie: THE-HIVE-XSRF-TOKEN=YOUR_TOKEN; THE_HIVE_SESSION=YOUR_SESSION" --data "{}"

You need to modify ip's tokens etc...

The error on the hive is the following:

thehive_1 | [info] o.e.s.MigrationSrv - Create a new empty database thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 2 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 3 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 4 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 5 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 6 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 7 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 8 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 9 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 10 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 11 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 12 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 13 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 14 thehive_1 | [info] o.e.s.MigrationSrv - Migrate database from version 0, add operations for version 15 thehive_1 | [warn] o.e.c.RestClient - request [PUT http://172.19.0.2:9200/the_hive_15] returned 1 warnings: [299 Elasticsearch-6.8.0-65b6179 "[types removal] The parameter include_type_name should be explicitly specified in create index requests to prepare for 7.0. In 7.0 include_type_name will default to 'false', and requests are expected to omit the type name in mapping definitions."] thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from sequence thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from action thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from alert thehive_1 | migrateEntity(action) has finished : Success(()) thehive_1 | migrateEntity(sequence) has finished : Success(()) thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from audit thehive_1 | migrateEntity(alert) has finished : Success(()) thehive_1 | migrateEntity(audit) has finished : Success(()) thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from case thehive_1 | migrateEntity(case) has finished : Success(()) thehive_1 | migrateEntity(caseTemplate) has finished : Success(()) thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from caseTemplate thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from case_artifact thehive_1 | migrateEntity(case_artifact) has finished : Success(()) thehive_1 | migrateEntity(case_artifact_job) has finished : Success(()) thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from case_artifact_job thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from case_task thehive_1 | migrateEntity(case_task) has finished : Success(()) thehive_1 | migrateEntity(case_task_log) has finished : Success(()) thehive_1 | migrateEntity(dashboard) has finished : Success(()) thehive_1 | migrateEntity(data) has finished : Success(()) thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from case_task_log thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from dashboard thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from data thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from dblist thehive_1 | migrateEntity(dblist) has finished : Success(()) thehive_1 | migrateEntity(reportTemplate) has finished : Success(()) thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from reportTemplate thehive_1 | migrateEntity(user) has finished : Success(()) thehive_1 | [info] o.e.s.MigrationSrv - Migrating 0 entities from user thehive_1 | [info] m.Migration - Retrieve MISP attribute to update alerts thehive_1 | [info] m.Migration - Updating observable data type list thehive_1 | [info] o.e.s.MigrationSrv - End of migration thehive_1 | [error] m.Migration - Failed to create dashboard /opt/thehive/migration/12/dashboards/Observable_statistics .json during migration thehive_1 | org.elastic4play.AttributeCheckingError: [Unknown attribute dashboard._version: {"type":"JsonInputValue","value":3}][Unknown attribute dashboard._id: {"type":"JsonInputValue","value":"AWu4YZXHg8tFuebkSwcG"}][Unknown attribute dashboard._routing: {"type":"JsonInputValue","value":"AWu4YZXHg8tFuebkSwcG"}][Unknown attribute dashboard._parent: {"type":"JsonInputValue","value":null}] thehive_1 | at org.elastic4play.services.FieldsSrv.$anonfun$parse$7(FieldsSrv.scala:33) thehive_1 | at org.scalactic.Bad.transform(Or.scala:1386) thehive_1 | at org.elastic4play.services.FieldsSrv.parse(FieldsSrv.scala:33) thehive_1 | at org.elastic4play.services.CreateSrv.create(CreateSrv.scala:105) thehive_1 | at org.elastic4play.services.CreateSrv.apply(CreateSrv.scala:67) thehive_1 | at services.DashboardSrv.create(DashboardSrv.scala:32) thehive_1 | at models.Migration.$anonfun$addDashboards$8(Migration.scala:107) thehive_1 | at scala.Option.map(Option.scala:146) thehive_1 | at models.Migration.$anonfun$addDashboards$6(Migration.scala:104) thehive_1 | at scala.collection.TraversableLike$WithFilter.$anonfun$flatMap$2(TraversableLike.scala:770)

@nadouani
Copy link
Contributor

I think we have found the issue. We will fix it. The UI is not redirecting correctly in some cases, and the stream API returns a 401, so the UI goes to the login page.

@nadouani
Copy link
Contributor

We have been able to reproduce it not only on the Docker version

@garanews
Copy link
Contributor

Hello, I still having issue also with accc951 :

[info] c.s.e.h.ElasticClient$ - Creating HTTP client on http://127.0.0.1:9200
[info] play.api.Play - Application started (Prod)
[info] p.c.s.AkkaHttpServer - Enabling HTTP/2 on Akka HTTP server...
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?
StringEntity({"query":{"match":{"relations":{"query":"user"}}},"size":0},Some(application/json))
 => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)
[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?
StringEntity({"query":{"match":{"relations":{"query":"user"}}},"size":0},Some(application/json))
 => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)
[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?
StringEntity({"version":"true","query":{"ids":{"values":["init"]}},"size":1},Some(application/json))
 => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)
[info] o.e.ErrorHandler - GET /api/user/current returned 520
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:303)
        at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
        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:12)
        at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)
        at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)
[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?scroll=60000ms
StringEntity({"version":"true","query":{"bool":{"must":[{"term":{"relations":{"value":"dblist"}}},{"term":{"dblist":{"value":"ui_settings"}}}]}},"from":0,"sort":[{"_id":{"order":"desc"}}]},Some(application/json))
 => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)
[error] o.e.d.DBConfiguration - ElasticSearch request failure: GET:/_cluster/health/the_hive_15?
 => ElasticError(408,408,None,None,None,List(),None)
[error] o.e.d.DBConfiguration - ElasticSearch request failure: POST:/the_hive_15/_search?
StringEntity({"query":{"match":{"relations":{"query":"user"}}},"size":0},Some(application/json))
 => ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,List(ElasticError(index_not_found_exception,no such index,Some(_na_),Some(the_hive_15),None,null,None)),None)
[info] o.e.ErrorHandler - GET /api/stream/raV9ifefkGFlzXdgbYbS returned 401
org.elastic4play.AuthenticationError: Authentication header not found
        at org.elastic4play.controllers.Authenticated.$anonfun$getFromApiKey$1(Authenticated.scala:143)
        at scala.Option.fold(Option.scala:158)
        at org.elastic4play.controllers.Authenticated.getFromApiKey(Authenticated.scala:143)
        at controllers.StreamCtrl.$anonfun$get$1(StreamCtrl.scala:99)
        at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:488)
        at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:486)
        at play.api.mvc.ActionBuilder$$anon$10.apply(Action.scala:425)
        at play.api.mvc.Action.$anonfun$apply$2(Action.scala:97)
        at play.api.libs.streams.StrictAccumulator.$anonfun$mapFuture$4(Accumulator.scala:183)
        at scala.util.Try$.apply(Try.scala:209)

I'm compiling sources from git.
I'm setting up a new instance. the mainenance page appear for less than 1s then login page appears.
If I try to launch migrate from curl, in the logs I see that system is trying to migrate from index 0 to 15 and it seems is able to reach the end (with some error regarding stats ) but I do not have the user / pwd to login ^___^

Any help?

@hilt86
Copy link

hilt86 commented Aug 2, 2019

same problem here...

@crackytsi
Copy link

@nadouani: I think even the latest commits doesn't fix this issue complete :-(

@hilt86
Copy link

hilt86 commented Aug 6, 2019

I'm gonna have to install it to a local ES instance then use Elasticdump to migrate the index from a non-xpack to xpack ES.

@nadouani nadouani added this to the 3.4.0-RC3 milestone Aug 20, 2019
@nadouani
Copy link
Contributor

Fixed by the same fix as #1067

@hilt86
Copy link

hilt86 commented Aug 21, 2019

Awesome - I didn't see an updated Docker image nor a Dockerfile from which to build a new image. I guess I should submit a PR for this..

@s3p1a
Copy link

s3p1a commented Aug 30, 2019

Experienced the same issue (not able to click database migration to enter new username/password) on initial access on following platform:
elasticsearch:all/stable 6.7.2
thehive:all/any 3.4.0-0.1RC2
Fresh install of Ubuntu 18.04.03

In troubleshooting, was able to confirm that TheHive was able to communicate with elasticsearch by issuing "curl -X POST http://127.0.0.1:9000/api/maintenance/migrate", then checking elasticsearch indices with "curl -X GET "localhost:9200/_cat/indices?v&pretty"".

Was able to workaround by dropping elasticsearch database ("curl -XDELETE http://localhost:9200/the_hive_15"), hitting login page, then configuring Firefox to proxy further connections through Burp Suite. After entering junk username/password, I forwarded each request/response until I landed on the 'migrate database' page. I was able to click the button and forward the remaining requests until I arrived at the page where initial admin credentials are set. At that point I entered credentials, and disabled intercept so that further requests would flow. Afterwards, the credentials I entered worked and I was able to log in to TheHive.

@Harianand
Copy link

Hi after a lot of struggle im finally found the issue. it's a version mismatch issue. here the working docker compose file
version: "2"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.0
environment:
- http.host=0.0.0.0
- transport.host=0.0.0.0
- xpack.security.enabled=false
- cluster.name=hive
- script.allowed_types=inline
- discovery.type=single-node
- thread_pool.index.queue_size=100000
- thread_pool.search.queue_size=100000
- thread_pool.bulk.queue_size=100000
ulimits:
nofile:
soft: 65536
hard: 65536

volumes:
  - ./esdata:/usr/share/elasticsearch/data

cortex:
image: thehiveproject/cortex:3.0.0
depends_on:
- elasticsearch
ports:
- "127.0.0.1:9001:9001"

volumes:
  - ./Cortex-Analyzers:/etc/Cortex-Analyzers
  - ./cortex:/etc/cortex/application.conf

thehive:
image: thehiveproject/thehive:3.4.0
depends_on:
- elasticsearch
- cortex
ports:
- "127.0.0.1:9000:9000"
volumes:
- ./thehive:/etc/thehive/application.conf

command: --cortex-key THE_NEW_USER_KEY

@milesflo
Copy link

milesflo commented Oct 10, 2019

(copying the comment above with formatting for anyone else)

version: "2"
services:
    elasticsearch:
        image: docker.elastic.co/elasticsearch/elasticsearch:6.2.0
        environment:
            - http.host=0.0.0.0
            - transport.host=0.0.0.0
            - xpack.security.enabled=false
            - cluster.name=hive
            - script.allowed_types=inline
            - discovery.type=single-node
            - thread_pool.index.queue_size=100000
            - thread_pool.search.queue_size=100000
            - thread_pool.bulk.queue_size=100000
        ulimits:
        nofile:
        soft: 65536
        hard: 65536

        volumes:
            - ./esdata:/usr/share/elasticsearch/data

    cortex:
        image: thehiveproject/cortex:3.0.0
        depends_on:
            - elasticsearch
        ports:
            - "127.0.0.1:9001:9001"

        volumes:
            - ./Cortex-Analyzers:/etc/Cortex-Analyzers
            - ./cortex:/etc/cortex/application.conf

    thehive:
        image: thehiveproject/thehive:3.4.0
        depends_on:
            - elasticsearch
            - cortex
        ports:
            - "127.0.0.1:9000:9000"
        volumes:
            - ./thehive:/etc/thehive/application.conf

command: --cortex-key THE_NEW_USER_KEY

EDIT: Does not appear to be valid in this state. YMMV.

@milesflo
Copy link

👍 on ElasticSearch throwing errs in docker compose

@milesflo
Copy link

Hmmm. Put on my inspector's hat and found this:
2ef0838#r35452934

@milesflo
Copy link

Following this thread over here: #1140

@jigsawsecurity
Copy link

Seeing similar reports of this same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests