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

[Bug] Issues during Migration - Some Observables are missing #1388

Closed
crackytsi opened this issue Jun 8, 2020 · 1 comment
Closed

[Bug] Issues during Migration - Some Observables are missing #1388

crackytsi opened this issue Jun 8, 2020 · 1 comment
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@crackytsi
Copy link

Bug

Work Environment

Question Answer
OS version (server) Debian
OS version (client) 10
TheHive version / git hash 0c7bc08 (after 4 RC3)
Package Type binary

Problem Description

During Migration of TheHive using fixes after 4 RC3, import of some observables failes.
I don't see the exact reason. The observables were a custom-observable-type, but these observables also exists in other cases.

Additionally I have noticed, that the cortex-jobs seems not to be correctly processed, as all imported cases, doesn't have any short-report.

[^[[37minfo^[[0m] o.t.t.m.t.Output - Create case #8087
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create task Task1 in case 4612344
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create log in task Task1
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create observable xxx in case 4612344
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create observable yyyy in case 4612344
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create observable zzzz in case 4612344
[^[[31merror^[[0m] o.t.s.u.Retry - uncaught error, not retrying
scala.MatchError: [Ljava.lang.String;@55285e71 (of class [Ljava.lang.String;)
        at org.thp.thehive.models.Tag$.fromString(Tag.scala:42)
        at org.thp.thehive.services.TagSrv.parseString(TagSrv.scala:41)
        at org.thp.thehive.services.TagSrv.getOrCreate(TagSrv.scala:49)
        at org.thp.thehive.services.ObservableSrv.$anonfun$addTags$3(ObservableSrv.scala:91)
        at org.thp.scalligraph.package$RichSeq.$anonfun$toTry$3(package.scala:25)
        at scala.collection.TraversableOnce$folder$1$.apply(TraversableOnce.scala:187)
        at scala.collection.TraversableOnce$folder$1$.apply(TraversableOnce.scala:185)
        at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:338)
        at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:1111)
        at scala.collection.TraversableOnce.foldLeft(TraversableOnce.scala:189)
[^[[31merror^[[0m] o.t.s.m.Database - Exception raised, rollback ([Ljava.lang.String;@55285e71 (of class [Ljava.lang.String;))
[^[[31merror^[[0m] o.t.t.m.Migrate - Case/Observable creation failure: scala.MatchError: [Ljava.lang.String;@55285e71 (of class [Ljava.lang.String;)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create observable PPPP in case 4612344
[^[[31merror^[[0m] o.t.s.u.Retry - uncaught error, not retrying
scala.MatchError: [Ljava.lang.String;@db995b9 (of class [Ljava.lang.String;)
        at org.thp.thehive.models.Tag$.fromString(Tag.scala:42)
        at org.thp.thehive.services.TagSrv.parseString(TagSrv.scala:41)
        at org.thp.thehive.services.TagSrv.getOrCreate(TagSrv.scala:49)
        at org.thp.thehive.services.ObservableSrv.$anonfun$addTags$3(ObservableSrv.scala:91)
        at org.thp.scalligraph.package$RichSeq.$anonfun$toTry$3(package.scala:25)
        at scala.collection.TraversableOnce$folder$1$.apply(TraversableOnce.scala:187)
        at scala.collection.TraversableOnce$folder$1$.apply(TraversableOnce.scala:185)
        at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:338)
        at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:1111)
        at scala.collection.TraversableOnce.foldLeft(TraversableOnce.scala:189)
[^[[31merror^[[0m] o.t.s.m.Database - Exception raised, rollback ([Ljava.lang.String;@db995b9 (of class [Ljava.lang.String;))
[^[[31merror^[[0m] o.t.t.m.Migrate - Case/Observable creation failure: scala.MatchError: [Ljava.lang.String;@db995b9 (of class [Ljava.lang.String;)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create observable WWWWWWW in case 4612344
[^[[31merror^[[0m] o.t.s.u.Retry - uncaught error, not retrying
scala.MatchError: [Ljava.lang.String;@118e4de4 (of class [Ljava.lang.String;)
        at org.thp.thehive.models.Tag$.fromString(Tag.scala:42)
        at org.thp.thehive.services.TagSrv.parseString(TagSrv.scala:41)
        at org.thp.thehive.services.TagSrv.getOrCreate(TagSrv.scala:49)
        at org.thp.thehive.services.ObservableSrv.$anonfun$addTags$3(ObservableSrv.scala:91)
        at org.thp.scalligraph.package$RichSeq.$anonfun$toTry$3(package.scala:25)
        at scala.collection.TraversableOnce$folder$1$.apply(TraversableOnce.scala:187)
        at scala.collection.TraversableOnce$folder$1$.apply(TraversableOnce.scala:185)
        at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:338)
        at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:1111)
        at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:1111)
[^[[31merror^[[0m] o.t.s.m.Database - Exception raised, rollback ([Ljava.lang.String;@118e4de4 (of class [Ljava.lang.String;))
[^[[31merror^[[0m] o.t.t.m.Migrate - Case/Observable creation failure: scala.MatchError: [Ljava.lang.String;@118e4de4 (of class [Ljava.lang.String;)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create observable QQQQQQQQQQQ in case 4612344
[^[[31merror^[[0m] o.t.s.u.Retry - uncaught error, not retrying
scala.MatchError: [Ljava.lang.String;@3b81ef70 (of class [Ljava.lang.String;)
        at org.thp.thehive.models.Tag$.fromString(Tag.scala:42)
        at org.thp.thehive.services.TagSrv.parseString(TagSrv.scala:41)
        at org.thp.thehive.services.TagSrv.getOrCreate(TagSrv.scala:49)
        at org.thp.thehive.services.ObservableSrv.$anonfun$addTags$3(ObservableSrv.scala:91)
        at org.thp.thehive.services.ObservableSrv.$anonfun$addTags$3(ObservableSrv.scala:91)
        at org.thp.scalligraph.package$RichSeq.$anonfun$toTry$3(package.scala:25)
        at scala.collection.TraversableOnce$folder$1$.apply(TraversableOnce.scala:187)
        at scala.collection.TraversableOnce$folder$1$.apply(TraversableOnce.scala:185)
        at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:338)
        at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:1111)
        at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:1111)
[^[[31merror^[[0m] o.t.s.m.Database - Exception raised, rollback ([Ljava.lang.String;@3b81ef70 (of class [Ljava.lang.String;))
[^[[31merror^[[0m] o.t.t.m.Migrate - Case/Observable creation failure: scala.MatchError: [Ljava.lang.String;@3b81ef70 (of class [Ljava.lang.String;)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create job cortex-prod:2d6c92afdfef2b4975a15ecc0889640b:AXFhFZJWIzXIaFnGrcf-
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create job cortex-prod:6fc68ec13b92cb91a23256cbd57b5fb9:AXFhFYYnIzXIaFnGrcf7
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create job cortex-prod:3c84bc75b34c077ef8154ab5ee025a9b:AXFhFWelIzXIaFnGrcf1
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create job cortex-prod:b93d12c61b66128db93cf024c0db7ff5:AXFhFVEvIzXIaFnGrcfv
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4505600)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4505600)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4505600)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4505600)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4505600)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4505600)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit create on Some(Task) Some(4505600)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4616440)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit create on Some(Task) Some(4616440)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4349960)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4349960)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Task) Some(4349960)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit create on Some(Task) Some(4349960)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit create on Some(Log) Some(4620536)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Log) Some(45658296)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Log) Some(45658296)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit update on Some(Log) Some(45658296)
[^[[37minfo^[[0m] o.t.t.m.t.Output - Create audit create on Some(Log) Some(45658296)

@crackytsi crackytsi added TheHive4 TheHive4 related issues bug labels Jun 8, 2020
@crackytsi
Copy link
Author

crackytsi commented Jun 8, 2020

Additional confusing warings:

[^[[37minfo^[[0m] o.t.s.m.Database - Index UserLogin already exists, ignore it
[^[[37minfo^[[0m] o.t.s.m.Database - Index ProfileName already exists, ignore it
[^[[37minfo^[[0m] o.t.s.m.Database - Index CustomfieldName already exists, ignore it
[warn] o.t.s.u.Retry - An error occurs (Adding this property for key [_label] and value [Profile] violates a uniqueness constraint [ProfileName]), retrying (1)
[warn] o.t.s.u.Retry - An error occurs (Adding this property for key [_label] and value [Profile] violates a uniqueness constraint [ProfileName]), retrying (2)
[warn] o.t.s.u.Retry - An error occurs (Adding this property for key [_label] and value [Profile] violates a uniqueness constraint [ProfileName]), retrying (3)
[warn] o.t.s.u.Retry - An error occurs (Adding this property for key [_label] and value [Profile] violates a uniqueness constraint [ProfileName]), retrying (4)
[warn] o.t.s.u.Retry - An error occurs (Adding this property for key [_label] and value [Profile] violates a uniqueness constraint [ProfileName]), retrying (5)
[warn] o.t.t.m.t.Output - User system not found, use system user
[warn] o.t.t.m.t.Output - User init@myorg not found, use system user

@To-om To-om added this to the 4.0.0 milestone Jun 25, 2020
To-om added a commit that referenced this issue Jun 28, 2020
@To-om To-om self-assigned this Jun 28, 2020
@To-om To-om closed this as completed Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

2 participants