SecurityRiskAdvisors / VECTR

VECTR is a tool that facilitates tracking of your red and blue team testing activities to measure detection and prevention capabilities across different attack scenarios
1.34k stars 156 forks source link

v8.4.3 upgrade to 8.8.0 fails #232

Closed rfrogman closed 1 year ago

rfrogman commented 1 year ago

Describe the bug Receive exit code 1 after attempting to upgrade Vectr from v 8.4.3 to v 8.8.0. This is the actual errors: vectr-tomcat_1 | [0.010s][warning][os,thread] Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached. vectr-tomcat_1 | # vectr-tomcat_1 | # There is insufficient memory for the Java Runtime Environment to continue. vectr-tomcat_1 | # Cannot create worker GC thread. Out of system resources. vectr-tomcat_1 | # An error report file with more information is saved as: vectr-tomcat_1 | # /usr/local/tomcat/hs_err_pid79.log vectr-tomcat_1 | run-parts: /opt/vectr/release/scripts/docker-entrypoint.d/3_auth_setup exited with return code 1 vectr-tomcat_1 | Cannot find /usr/local/tomcat/bin/setclasspath.sh vectr-tomcat_1 | This file is needed to run this program purpleteaming_vectr-tomcat_1 exited with code 1

To Reproduce Steps to reproduce the behavior:

  1. In terminal, sudo docker-compose down
  2. sudo nano docker-compose.yml
  3. changed image: securityriskadvisors/vectr_tomcat:8.4.3 to image: securityriskadvisors/vectr_tomcat:8.8.0 and saved file
  4. sudo docker-compose up

Expected behavior Simple upgrade of docker container to version 8.8.0

Screenshots none

Desktop (please complete the following information):

Additional context CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE 4fdb728a7b96 securityriskadvisors/vectr_tomcat:8.4.3 "/docker-entrypoint.…" 23 minutes ago Up 23 minutes 8080/tcp, 0.0.0.0:8081->8443/tcp purpleteaming_vectr-tomcat_1 488MB (virtual 1.52GB) 465b06a73c2f securityriskadvisors/rta_builder:1.1.3 "docker-entrypoint.s…" 27 minutes ago Up 23 minutes 3001/tcp purpleteaming_vectr-rta-builder_1 0B (virtual 1.83GB) a98091d1782c securityriskadvisors/rta_webserver:1.1.3 "docker-entrypoint.s…" 27 minutes ago Up 23 minutes 3000/tcp purpleteaming_vectr-rta-webserver_1 0B (virtual 922MB) 99ae1e87c412 mongo:4.2 "docker-entrypoint.s…" 27 minutes ago Up 23 minutes 27017/tcp purpleteaming_vectr-mongo_1 0B (virtual 388MB) 3e6f22c0fd39 redis:6.2-bullseye

sudo docker system df TYPE TOTAL ACTIVE SIZE RECLAIMABLE Images 6 6 3.455GB 901.2MB (26%) Containers 6 5 488MB 0B (0%) Local Volumes 23 6 988.6MB 0B (0%) Build Cache 0 0 0B 0B

sudo du -sh /var/lib/docker/ 8.9G /var/lib/docker/

MemTotal: 17583292 kB MemFree: 13782692 kB MemAvailable: 15626500 kB

sudo swapon -s Filename Type Size Used Priority /swap.img file 16777212 0 -2

/dev/sda2 264G 28G 223G 11% /

SRAPSpencer commented 1 year ago

It looks like there's an issue with your host machine, the container isn't starting correctly due to a lack of RAM. This may be as simple as a host reboot as there's likely an issue with the docker daemon. Would advise the reboot along with general host maintenance(updating packages) and then starting the docker compose again.

rfrogman commented 1 year ago

Thank you for the response. The host server has been rebooted several times. It has 16g of RAM, 256g hard drive only using 11%, large swap file, and JAVA heap it 25% of RAM. This exceeds your minimum requirements. Docker lib is only 8.9g how can it be out of memory when the only thing it runs is Vectr and version 8.4.3 works fine?

SRAPSpencer commented 1 year ago

There is likely an issue with the docker install. Can you run this and paste the output?

docker version

This may be related to docker being too old for newer containers,

https://stackoverflow.com/questions/72841549/container-fails-to-start-insufficient-memory-for-the-java-runtime-environment-t

rfrogman commented 1 year ago

Docker version 19.03.11, build 42e35e61f3

SRAPSpencer commented 1 year ago

That version has been EOL since Feb 2021. Our latest release requires newer docker features which are causing the issue. You should update Docker Engine on your host machine.

https://docs.docker.com/engine/install/ubuntu/ https://docs.docker.com/engine/release-notes/23.0/

This is a Docker issue and not specific to VECTR. Closing the issue.