StrangeBeeCorp / TheHive-feedback

TheHive 5 feedback repository
https://www.strangebee.com/thehive
5 stars 0 forks source link

[Bug] Migration 4 to 5 hangs #13

Open plup opened 2 years ago

plup commented 2 years ago

Request Type

Bug

Work Environment

Question Answer
OS version (server) strangebee/thehive:5.0
Virtualized Env. Kubernetes
TheHive version 5.0.12-1
Package Type Docker
Database Cassandra
Index type Elasticsearch
Attachments storage Local

Problem Description

ManagementSystem$UpdateStatusTrigger process hangs forever on a Set status REGISTERED on schema.... I left it running for 14 hours and it's sill on the same log line.

Steps to Reproduce

  1. Create a new cassandra:3.11.10 db with restored data from production database (same version)
  2. Upgrade to cassandra:4.0 node by node
  3. Upgrade sstables as stated in the doc
  4. Start a thehive:5.0 with extra config forcing index rebuild

Complementary information

In the logs I can see:

The extra config is loaded

including /etc/thehive/application.conf in the generated configuration

Something odd with the JanusDB speaking about a local elasticsearch...

JanusDatabase | Full-text index is available (elasticsearch:[127.0.0.1]) single node

Some expected things when upgrading:

IndexRemoveJob...

The first error (retried 6 times):

PermanentLockingException: Local lock contention

Some other expected things:

IndexRepairJob...

An error about the indexation:

The index global1 is in an invalid state and cannot be indexed.

Then it continues with som ManagementSystem$UpdateStatusTrigger | Set status REGISTERED on schema... and hangs.

I noticed it hangs when the property key writable appears in the list.

plup commented 2 years ago

application.log