Closed
Description
Request Type
Bug
Work Environment
Question | Answer |
---|---|
OS version (server) | Debian |
TheHive version / git hash | 4.0.0-rc3 |
Package Type | Binary |
Problem Description
Hi!
Today I updated my thehive4-rc2 to rc3 to do the migration I had in rc2 (I had to stop it because it was too slow). Now when I migrated to rc3 version and saw that many inconveniences had been solved, I set out to launch the database migration again, but I found this problem:
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[info] a.r.a.t.ArteryTcpTransport - Remoting started with transport [Artery tcp]; listening on address [akka://TheHiveMigration@127.0.0.1:40527] with UID [-289070641197308079]
[info] a.c.Cluster - Cluster Node [akka://TheHiveMigration@127.0.0.1:40527] - Starting up, Akka version [2.6.3] ...
[info] a.c.Cluster - Cluster Node [akka://TheHiveMigration@127.0.0.1:40527] - Registered cluster JMX MBean [akka:type=Cluster]
[info] a.c.Cluster - Cluster Node [akka://TheHiveMigration@127.0.0.1:40527] - Started up successfully
[info] a.c.Cluster - Cluster Node [akka://TheHiveMigration@127.0.0.1:40527] - No downing-provider-class configured, manual cluster downing required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#downing
[info] a.c.Cluster - Cluster Node [akka://TheHiveMigration@127.0.0.1:40527] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#joining
[info] c.s.e.h.ElasticClient$ - Creating HTTP client on http://elasticsearch:9200
Exception in thread "main" com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error injecting constructor, java.lang.NoSuchMethodError: org.elasticsearch.client.RestClient.performRequestAsync(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lorg/apache/http/HttpEntity;Lorg/elasticsearch/client/ResponseListener;[Lorg/apache/http/Header;)V
at org.thp.thehive.migration.th3.Input.<init>(Input.scala:47)
at org.thp.thehive.migration.th3.Input.class(Input.scala:47)
while locating org.thp.thehive.migration.th3.Input
1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1086)
at org.thp.thehive.migration.th3.Input$.apply(Input.scala:43)
at org.thp.thehive.migration.Migrate$.$anonfun$new$1(Migrate.scala:89)
at org.thp.thehive.migration.Migrate$.$anonfun$new$1$adapted(Migrate.scala:82)
at scala.Option.foreach(Option.scala:407)
at org.thp.thehive.migration.Migrate$.delayedEndpoint$org$thp$thehive$migration$Migrate$1(Migrate.scala:82)
at org.thp.thehive.migration.Migrate$delayedInit$body.apply(Migrate.scala:17)
at scala.Function0.apply$mcV$sp(Function0.scala:39)
at scala.Function0.apply$mcV$sp$(Function0.scala:39)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
at scala.App.$anonfun$main$1$adapted(App.scala:80)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.App.main(App.scala:80)
at scala.App.main$(App.scala:78)
at org.thp.thehive.migration.Migrate$.main(Migrate.scala:17)
at org.thp.thehive.migration.Migrate.main(Migrate.scala)
Caused by: java.lang.NoSuchMethodError: org.elasticsearch.client.RestClient.performRequestAsync(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Lorg/apache/http/HttpEntity;Lorg/elasticsearch/client/ResponseListener;[Lorg/apache/http/Header;)V
at com.sksamuel.elastic4s.http.ElasticsearchJavaRestClient.send(ElasticsearchJavaRestClient.scala:72)
at com.sksamuel.elastic4s.http.Executor$$anon$1.exec(Executor.scala:22)
at com.sksamuel.elastic4s.http.Executor$$anon$1.exec(Executor.scala:15)
at com.sksamuel.elastic4s.http.ElasticClient.execute(ElasticClient.scala:31)
at org.thp.thehive.migration.th3.DBConfiguration.execute(DBConfiguration.scala:141)
at org.thp.thehive.migration.th3.SearchWithScroll.<init>(DBFind.scala:131)
at org.thp.thehive.migration.th3.DBFind.searchWithScroll(DBFind.scala:61)
at org.thp.thehive.migration.th3.DBFind.apply(DBFind.scala:97)
at org.thp.thehive.migration.th3.Input.<init>(Input.scala:362)
at org.thp.thehive.migration.th3.Input$$FastClassByGuice$$1079ab92.newInstance(<generated>)
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1050)
... 16 more
I used these parameters to run the migration script:
./migrate --output /etc/thehive/application.conf --main-organisation TestOrg --es-index the_hive_15 --es-uri http://elasticsearch:9200
Complementary information
I used the version of thehive that is already compiled at
By the way, after the mistake the migrate ends and does nothing!