Skip to content

[Bug] TheHive doesn't start correctly #1429

Closed
@To-om

Description

@To-om

Request Type

Bug

Problem Description

TheHive doesn't bind to 9000/tcp.
Logs stops after from org.reflections.Reflections in main - Reflections took 536 ms to scan 1 urls, producing 133 keys and 2057 values
With further investigation, an error occurs in database initialisation:

java.lang.ExceptionInInitializerError: null
        at org.janusgraph.graphdb.database.management.ModifierType.<clinit>(ModifierType.java:23)
        at org.janusgraph.graphdb.database.management.ManagementSystem.setConsistency(ManagementSystem.java:1268)
        at org.thp.thehive.models.TheHiveSchemaDefinition.$anonfun$operations$7(TheHiveSchemaDefinition.scala:48)
Caused by: java.lang.NullPointerException: null
        at org.janusgraph.graphdb.database.management.ModifierType.values(ModifierType.java:22)
        at org.janusgraph.graphdb.types.TypeDefinitionCategory.<clinit>(TypeDefinitionCategory.java:84)
        at org.janusgraph.graphdb.database.management.ModifierType.<clinit>(ModifierType.java:23)
        at org.janusgraph.graphdb.database.management.ManagementSystem.setConsistency(ManagementSystem.java:1268)
        at org.thp.thehive.models.TheHiveSchemaDefinition.$anonfun$operations$7(TheHiveSchemaDefinition.scala:48)

The class ModifierType from JanusGraph uses the class TypeDefinitionCategory (also from JanusGraph) during its class initialisation. But TypeDefinitionCategory also uses the class ModifierType during class initialisation. In some circumstances (not completely understood), this situation implies a NullPointerException.

Steps to Reproduce

The occurrence of this error depends of initialisation order.

Possible Solutions

Force initialisation of TypeDefinitionCategory before ModifierType

Activity

added this to the 4.0.0 milestone on Jul 9, 2020
self-assigned this
on Jul 9, 2020
added 2 commits that reference this issue on Jul 9, 2020

#1429 Force initialisation of TypeDefinitionCategory before ModifierType

#1429 Force the initialisation of the cluster before the schema updater

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

TheHive4TheHive4 related issuesbug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

    Participants

    @To-om

    Issue actions

      [Bug] TheHive doesn't start correctly · Issue #1429 · TheHive-Project/TheHive