TheHive-Project / TheHive

TheHive: a Scalable, Open Source and Free Security Incident Response Platform
https://thehive-project.org
GNU Affero General Public License v3.0
3.39k stars 618 forks source link

[Question] Can't make TheHive work properly when built from sources #2247

Closed Zarkrosh closed 2 years ago

Zarkrosh commented 2 years ago

Request Type

Question

Work Environment

Question Answer
OS version (client) Ubuntu 20.04.3 LTS
Virtualized Env. True
Dedicated RAM 6 GB
vCPU 4
TheHive version 4.1.11-1
Package Type From source
Database Cassandra
Index type Lucene
Attachments storage Local

Question

I have found some troubles when running the project built from sources. Taking as reference the documentation I am able to build backend and frontend successfully on development. Where I have troubles is when trying to make a production build. I don't have any prior knowledge of Scala and maybe the problem is that I'm not making the build properly.

A summary of the things I have tried:

1

Building backend with ./sbt stage as stated in documentation. I suspect that frontend is built too, but when running the thehive binary generated at ./target/universal/stage/bin/thehive and requesting 127.0.0.1:9000, it makes requests to vendor.js and scripts.js that are answered with a 404 error. 2021-11-18 11_46_15-Ubuntu 20 - Desarrollo  Corriendo  - Oracle VM VirtualBox

Looking at a properly deployed TheHive (v. 4.0.5-1) I know that they should have an hexadecimal ID in the middle of the name: 2021-11-18 12_17_51-Ubuntu 20 - Desarrollo  Corriendo  - Oracle VM VirtualBox

2

Generating a docker image (my desired scenario) with ./sbt docker:stage and ./sbt docker:publishLocal. After solving some problems already stated in another issue related to folder permissions, I find the same previous situation: there are requests to vendor.js and scripts.js that answer with 404. I think that these requests are wrong and the hexadecimal value in the name is missing, but I am not able to solve it.

Is there anything wrong with the commands I use or is there something left to make a proper build?