google / timesketch

Collaborative forensic timeline analysis
Apache License 2.0
2.57k stars 586 forks source link

Fresh deployment with deploy_timesketch.sh fails to start #2758

Open mister-turtle opened 1 year ago

mister-turtle commented 1 year ago

Describe the bug Fresh installation using deploy_timesketch.sh fails during startup after using docker-compose up. The following errors can be seen in the timesketch-worker logs:

opensearch               | [2023-05-17T13:41:30,490][INFO ][o.o.a.c.HashRing         ] [13395a6d94e4] Rebuild AD hash ring for realtime AD with cooldown, nodeChangeEvents size 0
opensearch               | [2023-05-17T13:41:30,490][INFO ][o.o.a.c.HashRing         ] [13395a6d94e4] Build AD version hash ring successfully
opensearch               | [2023-05-17T13:41:30,491][INFO ][o.o.a.c.ADDataMigrator   ] [13395a6d94e4] Start migrating AD data
opensearch               | [2023-05-17T13:41:30,491][INFO ][o.o.a.c.ADDataMigrator   ] [13395a6d94e4] AD job index doesn't exist, no need to migrate
opensearch               | [2023-05-17T13:41:30,491][INFO ][o.o.a.c.ADClusterEventListener] [13395a6d94e4] Init AD version hash ring successfully
opensearch               | [2023-05-17T13:42:30,444][INFO ][o.o.i.i.ManagedIndexCoordinator] [13395a6d94e4] Performing move cluster state metadata.
opensearch               | [2023-05-17T13:43:30,444][INFO ][o.o.i.i.ManagedIndexCoordinator] [13395a6d94e4] Performing move cluster state metadata.
timesketch-worker        | Usage: celery [OPTIONS] COMMAND [ARGS]...
timesketch-worker        | Try 'celery --help' for help.
timesketch-worker        |
timesketch-worker        | Error: Invalid value for '-A' / '--app': 
timesketch-worker        | Unable to load celery application.
timesketch-worker        | While trying to load the module timesketch.lib.tasks the following error occurred:
timesketch-worker        | Traceback (most recent call last):
timesketch-worker        |   File "/usr/local/lib/python3.10/dist-packages/celery/app/utils.py", line 384, in find_app
timesketch-worker        |     sym = symbol_by_name(app, imp=imp)
timesketch-worker        |   File "/usr/local/lib/python3.10/dist-packages/kombu/utils/imports.py", line 61, in symbol_by_name
timesketch-worker        |     return getattr(module, cls_name) if cls_name else module
timesketch-worker        | AttributeError: module 'timesketch.lib' has no attribute 'tasks'
timesketch-worker        |

At this point, timesketch-{worker,web,web-legacy} containers all exit:

timesketch-worker exited with code 2
timesketch-web-legacy exited with code 1
timesketch-web exited with code 3

To Reproduce Steps to reproduce the behavior: 1) curl -s -O https://raw.githubusercontent.com/google/timesketch/master/contrib/deploy_timesketch.sh 2) chmod +x ./deploy_timesketch.sh 3) cd /opt/ 4) sudo ~/projects/deploy_timesketch.sh 5) cd timesketch/ 6) sudo docker-compose up

Expected behavior Successful installation and initialisation of containers and timesketch service

Desktop (please complete the following information): OS:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=23.04
DISTRIB_CODENAME=lunar
DISTRIB_DESCRIPTION="Ubuntu 23.04"

Docker

Client: Docker Engine - Community
 Version:           24.0.0
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        98fdcd7
 Built:             Mon May 15 18:50:00 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.0
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       1331b8c
  Built:            Mon May 15 18:50:00 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
berggren commented 1 year ago

Is this still an issue? I have not been able to reproduce this error.