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] Unable to find case by Case Number #2044

Closed
BlueJokerr opened this issue May 27, 2021 · 5 comments
Closed

[Bug] Unable to find case by Case Number #2044

BlueJokerr opened this issue May 27, 2021 · 5 comments
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@BlueJokerr
Copy link

BlueJokerr commented May 27, 2021

Request Type

Bug

Work Environment

Question Answer
OS version (server) CentOS
OS version (client) 8
Virtualized Env. True
Dedicated RAM 16 GB
vCPU 12
TheHive version / git hash 4.1.4-1
Package Type RPM
Database Cassandra
Index type Lucene
Disk Local
Browser type & version Chrome

Problem Description

We are facing a random error when trying to search for some cases using their case number (#15611 for example) via WebGUI, TheHive fails to find it and returns an "Unable to find case with number...", but the case does exist, we try to do some debug and found that TheHive calls an api method (/api/case/_search) using the field "caseId". We try to simulate that api call and found that it returns an empty array as if the case doesn't exist.
If we search for the case manually in the case menu we can find it and the case number is OK, we also try to do an api call (/api/v1/query) with the real ID (DB ID) and in the result we can see that the case number is also correct.

This issue is really annoying because we use the case number for tracking purposes.

Maybe it could be an index issue?

Steps to Reproduce

Random error

Possible Solutions

N/A

Complementary information

I'm attaching print screens of the error:

  • WebGUI case search:
    1 web gui search case by ID error

  • API Call when WebGUI case search is executed returns null:
    2 api called when searching case ID fails returns null

  • API Call by case number using POSTMAN returns null:
    3 api query by ID returns null

  • Searching manually in cases tab we can find the case with its corresponding case number:
    4 web gui case exists
    4 web gui case exists 2

  • API call usind case ID returns correct case with corresponding case number:
    5 api query by DB ID

@BlueJokerr BlueJokerr added TheHive4 TheHive4 related issues bug labels May 27, 2021
@BlueJokerr BlueJokerr changed the title [Bug] Unable to find case by Case ID [Bug] Unable to find case by Case Number May 27, 2021
@nadouani
Copy link
Contributor

Hello @BlueJokerr This is weird as I cannot see any reason for it. The case is listed, this means it exists in the index, and the number is correct. Do you see any error in logs when searching by number?

@nadouani nadouani self-assigned this May 28, 2021
@BlueJokerr
Copy link
Author

BlueJokerr commented May 28, 2021

Hi @nadouani, thanks for your reply. Unfortunatly no errors are detected in logs, tried searching in cassandra and thehive logs and could only see that the search is performed and returns 200:
image

@nadouani
Copy link
Contributor

Thanks for the logs, I'll try to fix the deprecated use of the filter firstly and check if there is any other reason.

@nadouani nadouani added this to the 4.1.5 milestone May 31, 2021
@nadouani
Copy link
Contributor

Trying a fix as I wasn't able to reproduce.

@B4mcruz
Copy link

B4mcruz commented May 31, 2021

Hi @nadouani, I don't think that the issue is related to the deprecated filter, because I've tried doing a post to the api using the field/value non-deprecated method and I couldn't find the case either.

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