Closed viverma5 closed 2 years ago
The migration tool found an index with multiple types whereas the index uses a single type. The detection doesn't work correctly (it need a fix). You can force by adding the parameter --es-single-type true
.
Hello @To-om
I have tested it by adding --es-single-type true in the migration script. This time migration started but I see warning, where one of the customField named "userGroup" in Hive3, is not able to be created in Hive 4 and we get repeated warnings like below-
[warn] Unable to set custom field userGroup="APAC_User" to case #4379: org.thp.scalligraph.NotFoundError: Custom field userGroup not found
This issue is only for this specific customField userGroup. Not sure, what could be the problem.
Besides, once migration was over, I saw that we got 5 ORGANIZATIONS created [2 for admin and 3 for the one which we used as MAIN organization] instead of 2 . Even after re-indexing status is same.
Hello @To-om ,
After looking into the logs, I realised error initially while creating customFields in the migration script.
`[error]
CustomField creation failure: com.fasterxml.jackson.core.io.JsonEOFException: Unexpected end-of-input: expected close marker for Array`
I see that CustField is truncated at 7691 characters. I tried to change the data of the CF in Hive 3 to see if it makes any difference, but everytime it fails at same character position 7691 Do we have any kind of restriction? This issue does not happen if I upgrade from 3.4.4 - 4.0.4-X.X.X
Single type detection and custom field truncation problems are fixed in 4.1.18
Request Type
Bug
Work Environment
Problem Description
Describe the problem/bug as clearly as possible.
Steps to Reproduce
`[root@azucl20007 thehive]# /opt/thehive/bin/migrate --main-organisation StSOC --es-uri http://10.28.100.37:9200 --es-index the_hive --exclude-alert-types misp -o /etc/thehive/application.conf [info] 1,666,167/1,769,472KiB(95%) GC:8 (cpu:5% 169ms) [initialisation] [info] Found ElasticSearch 6.8.21 [info] Found Index the_hive_15 [info] Found index with multiple types [info] Initialising cluster [info] Member is Up: akka://TheHiveMigration@127.0.0.1:35141 [info] 1,430,538/1,769,472KiB(81%) GC:9 (cpu:3% 373ms) [initialisation] [info] Full-text index is available (lucene:/opt/thp/thehive/index) single node [info] Creating database schema [info] The field data is indexed [info] 1,458,874/1,769,472KiB(83%) GC:1 (cpu:0% 22ms) [Finalisation] Organisation:1/1(240,525µs) [info] Running check on Tag ... [info] Check on Tag: no change needed [info] Running check on Log ... [info] Check on Log: no change needed [info] Running check on Alert ... [info] Check on Alert: no change needed [info] Running check on Organisation ... [info] Found duplicate entities: