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

Unable to load Analyzers with 3.0.0 #185

Closed
ndejong opened this issue Apr 21, 2019 · 1 comment
Closed

Unable to load Analyzers with 3.0.0 #185

ndejong opened this issue Apr 21, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@ndejong
Copy link

ndejong commented Apr 21, 2019

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu
OS version (client) 18.04.2 LTS
Cortex version / git hash 3.0.0-RC1
Package Type Binary - https://dl.bintray.com/thehive-project/debian-beta
Browser type & version Firefox 66.0.3

Problem Description

Unable to load any analyzers with Cortex 3.0.0-RC1 after an upgrade from v2.1x install

Steps to Reproduce

  1. step 1 - start with a working Cortex v2.1.x setup
  2. step 2 - update the APT sources to use the debian-beta repo
  3. step 3 - apt-get update & apt-get install cortex
  4. step 4 - connect to the newly updated Cortex, hit the "update database" button
  5. step 5 - navigate to the Analyzers tab, which shows an empty list, hitting the "Refresh analyzers" does not resolve.

Complementary information

observations / things-tried

  • logs seem to suggest analyzers/catalog.json is not accessible, have tried adjusting the permissions
  • have tried using the Docker container, seems also to have an issue that looks the same but I did not record the logs so can't be sure it really is the same issue.

application.log

2019-04-21 13:07:18,320 [INFO] from play.core.server.AkkaHttpServer in main - Listening for HTTP on /192.168.1.160:9001
2019-04-21 13:07:46,044 [ERROR] from akka.dispatch.Dispatcher in application-akka.actor.default-dispatcher-3 - /srv/Cortex-Analyzers/analyzers/catalog.json
java.nio.file.NotDirectoryException: /srv/Cortex-Analyzers/analyzers/catalog.json
	at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:426)
	at java.nio.file.Files.newDirectoryStream(Files.java:525)
	at org.thp.cortex.services.WorkerSrv.$anonfun$scan$15(WorkerSrv.scala:163)
	at scala.collection.immutable.Stream.flatMap(Stream.scala:489)
	at scala.collection.immutable.Stream.$anonfun$flatMap$1(Stream.scala:497)
	at scala.collection.immutable.Stream.$anonfun$append$1(Stream.scala:255)
	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1171)
	at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1161)
	at scala.collection.generic.Growable.loop$1(Growable.scala:57)
	at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:61)
	at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
	at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:105)
	at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:49)
	at scala.collection.generic.GenericTraversableTemplate.$anonfun$flatten$1(GenericTraversableTemplate.scala:174)
	at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
	at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
	at scala.collection.generic.GenericTraversableTemplate.flatten(GenericTraversableTemplate.scala:173)
	at scala.collection.generic.GenericTraversableTemplate.flatten$(GenericTraversableTemplate.scala:171)
	at scala.collection.AbstractTraversable.flatten(Traversable.scala:108)
	at org.thp.cortex.services.WorkerSrv.$anonfun$scan$21(WorkerSrv.scala:184)
	at org.thp.cortex.services.WorkerSrv.$anonfun$scan$21$adapted(WorkerSrv.scala:183)
	at scala.util.Success.foreach(Try.scala:253)
	at scala.concurrent.Future.$anonfun$foreach$1$adapted(Future.scala:229)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	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:23)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:85)
	at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)
	at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44)
	at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
	at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

catalog.json

root@work01:/opt/cortex/logs# head /srv/Cortex-Analyzers/analyzers/catalog.json
[
{
  "name": "Abuse_Finder",
  "version": "2.0",
  "author": "CERT-BDF",
  "url": "https://github.com/TheHive-Project/Cortex-Analyzers",
  "license": "AGPL-V3",
  "description": "Find abuse contacts associated with domain names, URLs, IPs and email addresses.",
  "dataTypeList": [
    "ip",
@RtKelleher
Copy link

Had a similar issue, rolled back the changes.

@To-om To-om self-assigned this May 2, 2019
@To-om To-om added the bug label May 2, 2019
@To-om To-om added this to the 3.0.0-RC2 milestone May 2, 2019
To-om added a commit that referenced this issue May 2, 2019
@To-om To-om closed this as completed May 2, 2019
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

3 participants