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

3.4 RC2 doesn't prompt to update/create the database when one doesn't exist #1107

Closed
sleepdeprecation opened this issue Aug 30, 2019 · 1 comment

Comments

@sleepdeprecation
Copy link

sleepdeprecation commented Aug 30, 2019

Request Type

Bug

Work Environment

Question Answer
OS version (server) AWS Fargate
OS version (client) n/a
TheHive version / git hash 3.4.0-0.1RC2
Package Type DEB, from beta apt repo
Browser type & version n/a

Problem Description

When launching 3.4 RC2 and having it connect to an elasticsearch cluster without the hive indexes already created the application just fails and doesn't prompt you to create the index (which it does in RC1).

Steps to Reproduce

  1. Launch 3.4RC2 from deb, pointed at an empty elasticsearch cluster
  2. Connect to the server in your browser, get an error message flash by really quick, and then get the login screen

Possible Solutions

Install RC1 instead (apt-get install -y thehive=3.4.0-0.1RC1)

Complementary information

There are two hacks we perform to get thehive to work in our environment.

  1. We add an encoder to print logs in json to thehive's classpath (logstash-logback-encoder-4.11.jar)

    This is done by running

    sed -i'' '/^declare -r app_classpath/ s?"$?:$lib_dir/logstash-logback-encoder-4.11.jar"?' /opt/thehive/bin/thehive
  2. Because AWS Fargate doesn't specify a localhost/hostname line in /etc/hosts, we add one before running the hive

    echo "$(ip a | grep -A2 eth0 | grep inet | awk '{print $2}' | sed 's#/.*##g' ) $(hostname)" >> /etc/hosts
    

If it's useful, I can share our Dockerfile and associated entrypoint script.

@nadouani
Copy link
Contributor

nadouani commented Sep 2, 2019

Hello, this should be fixed by #1067

@nadouani nadouani added this to the 3.4.0-RC3 milestone Sep 2, 2019
@nadouani nadouani closed this as completed Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants