首页 > 解决方案 > HIVE 4:由于未找到 cortex.connector 模块而无法启动

问题描述

我正在尝试设置 The Hive 4,但它无法开始说:

Cannot load module[Module [connectors.cortex.CortexConnector] cannot be instantiated

我查看了java进程模块列表中加载的模块,发现:

/opt/thehive/lib/org.thp.thehive-cortex-4.0.0-RC1.jar
/opt/thehive/lib/org.thp.cortex-client-4.0.0-RC1.jar
/opt/thehive/lib/org.thp.cortex-dto-4.0.0-RC1.jar

由于它正在使用 The Hive 的第 3 版,我查看了加载的模块,只发现:

/opt/thehive/lib/org.thehive-project.thehivecortex-3.3.0-1.jar

我检查了与我的 Cortex 服务器的连接:

curl -H 'Authorization: Bearer OBFUSCATED' http://OBFUSCATED:9001/api/analyzer

有用

我希望有人可以提供帮助,因为我完全陷入困境。提前致谢

这是我的 application.conf

play.http.secret.key = OBFUSCATED

# Authentication
auth {
        # ad : use ActiveDirectory to authenticate users. Configuration is under "auth.ad" key
        provider = [local]
}

# Maximum time between two requests without requesting authentication
session {
  warning = 5m
  inactivity = 1h
}

play.http.parser.maxMemoryBuffer= 1M
play.http.parser.maxDiskBuffer = 1D

# Cortex
play.modules.enabled += connectors.cortex.CortexConnector

cortex {
  "CORTEX-SERVER-ID" {
    url = "https://OBFUSCATED:9001/"
    key = "OBFUSCATED"
  }
  refreshDelay = 1 minute
  maxRetryOnError = 3
  statusCheckInterval = 1 minute
}

https.port: 9000
play.server.https.keyStore {
      path: /etc/thehive/keystore.jks
      type: JKS
      password: OBFUSCATED
    }
http.port: disabled
auth.method.basic = true

db {
  provider: janusgraph
  janusgraph {
    storage {
      backend: cql
      hostname: [
        "127.0.0.1"
      ] # seed node ip addresses

      #username: "<cassandra_username>"       # login to connect to database (if configured in Cassandra)
      #password: "<cassandra_passowrd"

      cql {
        cluster-name: thehivedb       # cluster name
        keyspace: thehive           # name of the keyspace
        local-datacenter: datacenter1   # name of the datacenter where TheHive runs (relevant only on multi datacenter setup)
        # replication-factor: 2 # number of replica
        read-consistency-level: ONE
        write-consistency-level: ONE
      }
    }
  }
}
storage {
  provider: hdfs
  hdfs {
    root: "hdfs://thehive1:10000" # namenode server
    location: "/thehive"
    username: thehive
  }
}

标签: javahiveconnector

解决方案


这是我在 TheHive github 项目上获得的解决方案:

请参阅 application.conf 中的键“play.modules.enabled”。将 play.modules.enabled += connector.cortex.CortexConnector 替换为 play.modules.enabled += org.thp.thehive.connector.cortex.CortexModule


推荐阅读