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] Reload last case number from database periodically #2182

Closed
To-om opened this issue Aug 26, 2021 · 3 comments
Closed

[Bug] Reload last case number from database periodically #2182

To-om opened this issue Aug 26, 2021 · 3 comments
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@To-om
Copy link
Contributor

To-om commented Aug 26, 2021

Request Type

Bug

Problem Description

In certain circumstances, the latest case number kept by the actor and the value in the database are not sync. The aim of this issue is to reload the latest case number from database periodically.
The time between two database reads is configured with caseNumber.reload.interval (default is 10 minutes).

@To-om To-om added bug TheHive4 TheHive4 related issues labels Aug 26, 2021
@To-om To-om added this to the 4.1.10 milestone Aug 26, 2021
@To-om To-om self-assigned this Aug 26, 2021
@To-om To-om closed this as completed Aug 26, 2021
@Keroseno101
Copy link

Hi @To-om, I think this is related with one Issue that I have since 2 weeks.

In my platform we have already more than 9000 Cases, before the reboot the case number was 91XX, but after the reboot the cases start to be numbers like 30XX, 64XX... everything a mess. Cases already created with a Case Number have now other Case number.

I am planning a drop and rebuild from Index, because I think that has nothing to do with Database but I am not sure.

Do you have some advice?

@realAnimoL
Copy link

realAnimoL commented Dec 14, 2022

Bump because the issue still persists @To-om on version 4.1.19-1. Same behavior as explained by @Keroseno101 after restarting TheHive.

@Keroseno101
Copy link

@realAnimoL did you try to rebuild index? You can add this line at the end of /etc/thehive/application.conf
db.janusgraph.dropAndRebuildIndexOnFailure: true
(deactivate after use one time)
And then restart thehive and check the logs to see if everything is OK.

After that Elasticsearch should rebuild index with the right information in database, that means, all the mess will be fixed and no data will be deleted.

Sadly our problem is not related with the post because is just a sync problem between Elasticsearch and cassandra after a upgrade/update/reboot.

Let me know if that works for you, at least can others read it. I didn't know more people with this mess case number problem.

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

3 participants