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] Error while importing Alert in TH4 #1255

Closed
jeromeleonard opened this issue Mar 9, 2020 · 1 comment
Closed

[Bug] Error while importing Alert in TH4 #1255

jeromeleonard opened this issue Mar 9, 2020 · 1 comment
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@jeromeleonard
Copy link
Contributor

Work Environment

TH4.0-RC1

Problem Description

Alert not created and HTTP 404 Not Found to request /api/alert

image

application.log file

2020-03-09 18:07:38,063 [ERROR] from org.thp.scalligraph.models.Database in application-akka.actor.default-dispatcher-29 - Exception raised, rollback (org.th
p.thehive.models.CaseTemplate not found)
2020-03-09 18:07:38,064 [WARN] from org.thp.scalligraph.ErrorHandler in application-akka.actor.default-dispatcher-29 - POST /api/alert returned 404
org.thp.scalligraph.NotFoundError: org.thp.thehive.models.CaseTemplate not found
        at org.thp.scalligraph.steps.StepsOps$TraversalOps.$anonfun$getOrFail$1(StepsOps.scala:287)
        at scala.Option.fold(Option.scala:251)
        at org.thp.scalligraph.steps.StepsOps$TraversalOps.getOrFail(StepsOps.scala:287)
        at org.thp.thehive.controllers.v0.AlertCtrl.$anonfun$create$7(AlertCtrl.scala:89)
        at scala.Option.map(Option.scala:230)
        at org.thp.thehive.controllers.v0.AlertCtrl.$anonfun$create$6(AlertCtrl.scala:89)
        at scala.util.Success.flatMap(Try.scala:251)
        at org.thp.thehive.controllers.v0.AlertCtrl.$anonfun$create$4(AlertCtrl.scala:88)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$authTransaction$2(Entrypoint.scala:77)
        at org.thp.scalligraph.janus.JanusDatabase.$anonfun$tryTransaction$10(JanusDatabase.scala:136)
        at scala.util.Try$.apply(Try.scala:213)
        at org.thp.scalligraph.janus.JanusDatabase.$anonfun$tryTransaction$8(JanusDatabase.scala:136)
        at scala.util.Try$.apply(Try.scala:213)
        at org.thp.scalligraph.utils.DelayRetry.withTry(Retry.scala:88)
        at org.thp.scalligraph.janus.JanusDatabase.tryTransaction(JanusDatabase.scala:130)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$authTransaction$1(Entrypoint.scala:77)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$auth$1(Entrypoint.scala:86)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$asyncAuth$3(Entrypoint.scala:101)
        at org.scalactic.Good.fold(Or.scala:1229)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$asyncAuth$2(Entrypoint.scala:101)
        at org.thp.scalligraph.DiagnosticContext$.$anonfun$withRequest$2(ContextPropagatingDisptacher.scala:100)
        at org.thp.scalligraph.DiagnosticContext$.saveDiagnosticContext(ContextPropagatingDisptacher.scala:107)
        at org.thp.scalligraph.DiagnosticContext$.withRequest(ContextPropagatingDisptacher.scala:98)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$asyncAuth$1(Entrypoint.scala:101)
        at org.thp.scalligraph.auth.AuthSrvWithActionFunction$$anon$1.$anonfun$invokeBlock$2(AuthSrv.scala:89)
        at scala.Option.fold(Option.scala:251)
        at org.thp.scalligraph.auth.AuthSrvWithActionFunction$$anon$1.invokeBlock(AuthSrv.scala:88)
        at org.thp.scalligraph.auth.AuthSrvWithActionFunction$$anon$1.invokeBlock(AuthSrv.scala:85)
        at org.thp.scalligraph.auth.BasicAuthSrv$$anon$1.$anonfun$invokeBlock$1(BasicAuthSrv.scala:51)
        at scala.Option.fold(Option.scala:251)
        at org.thp.scalligraph.auth.BasicAuthSrv$$anon$1.invokeBlock(BasicAuthSrv.scala:51)
        at org.thp.scalligraph.auth.BasicAuthSrv$$anon$1.invokeBlock(BasicAuthSrv.scala:49)
        at org.thp.scalligraph.auth.SessionAuthSrv$$anon$1.$anonfun$invokeBlock$1(SessionAuthSrv.scala:82)
        at scala.Option.fold(Option.scala:251)
        at org.thp.scalligraph.auth.SessionAuthSrv$$anon$1.invokeBlock(SessionAuthSrv.scala:82)
        at org.thp.scalligraph.auth.SessionAuthSrv$$anon$1.invokeBlock(SessionAuthSrv.scala:79)
        at scala.util.Success.flatMap(Try.scala:251)
        at org.thp.thehive.controllers.v0.AlertCtrl.$anonfun$create$4(AlertCtrl.scala:88)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$authTransaction$2(Entrypoint.scala:77)
        at org.thp.scalligraph.janus.JanusDatabase.$anonfun$tryTransaction$10(JanusDatabase.scala:136)
        at scala.util.Try$.apply(Try.scala:213)
        at org.thp.scalligraph.janus.JanusDatabase.$anonfun$tryTransaction$8(JanusDatabase.scala:136)
        at scala.util.Try$.apply(Try.scala:213)
        at org.thp.scalligraph.utils.DelayRetry.withTry(Retry.scala:88)
        at org.thp.scalligraph.janus.JanusDatabase.tryTransaction(JanusDatabase.scala:130)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$authTransaction$1(Entrypoint.scala:77)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$auth$1(Entrypoint.scala:86)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$asyncAuth$3(Entrypoint.scala:101)
        at org.scalactic.Good.fold(Or.scala:1229)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$asyncAuth$2(Entrypoint.scala:101)
        at org.thp.scalligraph.DiagnosticContext$.$anonfun$withRequest$2(ContextPropagatingDisptacher.scala:100)
        at org.thp.scalligraph.DiagnosticContext$.saveDiagnosticContext(ContextPropagatingDisptacher.scala:107)
        at org.thp.scalligraph.DiagnosticContext$.withRequest(ContextPropagatingDisptacher.scala:98)
        at org.thp.scalligraph.controllers.Entrypoint$EntryPointBuilder.$anonfun$asyncAuth$1(Entrypoint.scala:101)
        at org.thp.scalligraph.auth.AuthSrvWithActionFunction$$anon$1.$anonfun$invokeBlock$2(AuthSrv.scala:89)
        at scala.Option.fold(Option.scala:251)
        at org.thp.scalligraph.auth.AuthSrvWithActionFunction$$anon$1.invokeBlock(AuthSrv.scala:88)
        at org.thp.scalligraph.auth.AuthSrvWithActionFunction$$anon$1.invokeBlock(AuthSrv.scala:85)
        at org.thp.scalligraph.auth.BasicAuthSrv$$anon$1.$anonfun$invokeBlock$1(BasicAuthSrv.scala:51)
        at scala.Option.fold(Option.scala:251)
        at org.thp.scalligraph.auth.BasicAuthSrv$$anon$1.invokeBlock(BasicAuthSrv.scala:51)
        at org.thp.scalligraph.auth.BasicAuthSrv$$anon$1.invokeBlock(BasicAuthSrv.scala:49)
        at org.thp.scalligraph.auth.SessionAuthSrv$$anon$1.$anonfun$invokeBlock$1(SessionAuthSrv.scala:82)
        at scala.Option.fold(Option.scala:251)
        at org.thp.scalligraph.auth.SessionAuthSrv$$anon$1.invokeBlock(SessionAuthSrv.scala:82)
        at org.thp.scalligraph.auth.SessionAuthSrv$$anon$1.invokeBlock(SessionAuthSrv.scala:79)
        at play.api.mvc.ActionBuilder$$anon$10.$anonfun$invokeBlock$2(Action.scala:408)
        at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:441)
        at play.api.mvc.ActionBuilderImpl.invokeBlock(Action.scala:439)
        at play.api.mvc.ActionBuilder$$anon$10.invokeBlock(Action.scala:408)
        at play.api.mvc.ActionBuilder$$anon$10.invokeBlock(Action.scala:404)
        at play.api.mvc.ActionBuilder$$anon$9.apply(Action.scala:379)
        at play.api.mvc.Action.$anonfun$apply$4(Action.scala:82)
        at play.api.libs.streams.StrictAccumulator.$anonfun$mapFuture$4(Accumulator.scala:167)
        at scala.util.Try$.apply(Try.scala:213)
        at play.api.libs.streams.StrictAccumulator.$anonfun$mapFuture$3(Accumulator.scala:167)
        at scala.Function1.$anonfun$andThen$1(Function1.scala:57)
        at scala.Function1.$anonfun$andThen$1(Function1.scala:57)
        at play.api.libs.streams.StrictAccumulator.run(Accumulator.scala:199)
        at play.core.server.AkkaHttpServer.$anonfun$runAction$4(AkkaHttpServer.scala:413)
        at akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41)
        at akka.http.scaladsl.util.FastFuture$.$anonfun$transformWith$3(FastFuture.scala:51)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
        at org.thp.scalligraph.ContextPropagatingDisptacher$$anon$1.$anonfun$execute$2(ContextPropagatingDisptacher.scala:57)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at org.thp.scalligraph.DiagnosticContext$.$anonfun$withDiagnosticContext$2(ContextPropagatingDisptacher.scala:92)
        at org.thp.scalligraph.DiagnosticContext$.saveDiagnosticContext(ContextPropagatingDisptacher.scala:107)
        at org.thp.scalligraph.DiagnosticContext$.withDiagnosticContext(ContextPropagatingDisptacher.scala:90)
        at org.thp.scalligraph.DiagnosticContext$$anon$2.withContext(ContextPropagatingDisptacher.scala:75)
        at org.thp.scalligraph.ContextPropagatingDisptacher$$anon$1.$anonfun$execute$1(ContextPropagatingDisptacher.scala:57)
        at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:47)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:47)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
@jeromeleonard jeromeleonard added bug TheHive4 TheHive4 related issues labels Mar 9, 2020
@To-om To-om self-assigned this Mar 10, 2020
@To-om
Copy link
Contributor

To-om commented Mar 10, 2020

Alert creation fails because the case template is not found.

@To-om To-om closed this as completed Mar 10, 2020
@To-om To-om added this to the 4.0.0-RC2 milestone Mar 11, 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