immauss / openvas

Containers for running the Greenbone Vulnerability Manager. Run as a single container with all services or separate single applications containers via docker-compose.
GNU Affero General Public License v3.0
368 stars 102 forks source link

openvas redis HEALTHECHECK FAILED ! #163

Closed DRIgnazGortngschirl closed 1 year ago

DRIgnazGortngschirl commented 1 year ago

Hi!

I am getting with a completly clean and new install via docker-compose the follwoing error.

version: "3.3"
services:
  openvas:
    ports:
      - "8080:9392"
    environment:
      - "PASSWORD=<PASSWD STRIPED>"
      - "USERNAME=admin"
      - "RELAYHOST=172.17.0.1"
      - "SMTPPORT=25"
      - "REDISDBS=512" # number of Redis DBs to use
      - "QUIET=false"  # dump feed sync noise to /dev/null
      - "NEWDB=false"  # only use this for creating a blank DB
      - "SKIPSYNC=true" # Skips the feed sync on startup.
      - "RESTORE=false"  # This probably not be used from compose... see docs.
      - "DEBUG=false"  # This will cause the container to stop and not actually start gvmd
      - "HTTPS=false"  # wether to use HTTPS or not
      - "GMP=9390"    # to enable see docs
    volumes:
      - "openvas:/data"
    container_name: openvas
    image: immauss/openvas
  scannable:
    image: immauss/scannable
    container_name: scannable
volumes:
  openvas:
scannable  |  * Starting OpenBSD Secure Shell server sshd
scannable  |    ...done.
scannable  | 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
scannable  |     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
scannable  |     inet 127.0.0.1/8 scope host lo
scannable  |        valid_lft forever preferred_lft forever
scannable  | 5733: eth0@if5734: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
scannable  |     link/ether 02:42:c0:a8:00:02 brd ff:ff:ff:ff:ff:ff
scannable  |     inet 192.168.0.2/20 brd 192.168.15.255 scope global eth0
scannable  |        valid_lft forever preferred_lft forever
openvas    | starting container at: Thu Dec 15 13:32:34 UTC 2022
openvas    | Setting up container filesystem
openvas    | cp: cannot stat '/usr/local/var/lib/*': No such file or directory
openvas    | cp: cannot stat '/var/lib/gvm/*': No such file or directory
openvas    | cp: cannot stat '/var/lib/notus/*': No such file or directory
openvas    | cp: cannot stat '/var/lib/openvas/*': No such file or directory
openvas    | Using default gvm logging config
openvas    | Using default gvm logging config
openvas    | Using default openvas logging config
openvas    | chown: cannot access '/run/postgres': No such file or directory
openvas    | Choosing container start method from:
openvas    |
openvas    | Starting gvmd & openvas in a single container !!
openvas    | Wait for redis socket to be created...
openvas    | Testing redis status...
openvas    | Redis ready.
openvas    | Creating postgresql.conf and pg_hba.conf
openvas    | Starting PostgreSQL...
openvas    | waiting for server to start....2022-12-15 13:32:37.475 UTC [100] LOG:  redirecting log output to logging collector process
openvas    | 2022-12-15 13:32:37.475 UTC [100] HINT:  Future log output will appear in directory "/data/var-log/postgresql".
openvas    |  done
openvas    | server started
openvas    | pg exit with 0 .
openvas    | Checking for existing DB
openvas    | Loading Default Database
openvas    | Running first start configuration...
openvas    | Generating certs...
openvas    | Generated private key in /tmp/tmp.dsydM3Hpt9/cakey.pem.
openvas    | Generated self signed certificate in /tmp/tmp.dsydM3Hpt9/cacert.pem.
openvas    | Installed private key to /var/lib/gvm/private/CA/cakey.pem.
openvas    | Installed certificate to /var/lib/gvm/CA/cacert.pem.
openvas    | Generated private key in /tmp/tmp.dsydM3Hpt9/serverkey.pem.
openvas    | Generated certificate request in /tmp/tmp.dsydM3Hpt9/serverrequest.pem.
openvas    | Signed certificate request in /tmp/tmp.dsydM3Hpt9/serverrequest.pem with CA certificate in /var/lib/gvm/CA/cacert.pem to generate certificate in /tmp/tmp.dsydM3Hpt9/servercert.pem
openvas    | Installed private key to /var/lib/gvm/private/CA/serverkey.pem.
openvas    | Installed certificate to /var/lib/gvm/CA/servercert.pem.
openvas    | Generated private key in /tmp/tmp.dsydM3Hpt9/clientkey.pem.
openvas    | Generated certificate request in /tmp/tmp.dsydM3Hpt9/clientrequest.pem.
openvas    | Signed certificate request in /tmp/tmp.dsydM3Hpt9/clientrequest.pem with CA certificate in /var/lib/gvm/CA/cacert.pem to generate certificate in /tmp/tmp.dsydM3Hpt9/clientcert.pem
openvas    | Installed private key to /var/lib/gvm/private/CA/clientkey.pem.
openvas    | Installed certificate to /var/lib/gvm/CA/clientcert.pem.
openvas    | Removing temporary directory /tmp/tmp.dsydM3Hpt9.
openvas    | ########################################
openvas    | Creating a base DB from /usr/lib/base-db.xz
openvas    | base data from:
openvas    | Thu Oct 13 13:07:27 UTC 2022
openvas    | ########################################
openvas    | ERROR:  relation "host_details_by_host" already exists
openvas    | ERROR:  relation "host_identifiers_by_host" already exists
openvas    | ERROR:  relation "host_identifiers_by_value" already exists
openvas    | ERROR:  relation "host_max_severities_by_host" already exists
openvas    | ERROR:  relation "host_oss_by_host" already exists
openvas    | ERROR:  relation "nvt_selectors_by_family_or_nvt" already exists
openvas    | ERROR:  relation "nvt_selectors_by_name" already exists
openvas    | ERROR:  relation "nvts_by_creation_time" already exists
openvas    | ERROR:  relation "nvts_by_cvss_base" already exists
openvas    | ERROR:  relation "nvts_by_family" already exists
openvas    | ERROR:  relation "nvts_by_modification_time" already exists
openvas    | ERROR:  relation "nvts_by_name" already exists
openvas    | ERROR:  relation "nvts_by_solution_type" already exists
openvas    | ERROR:  relation "permissions_by_name" already exists
openvas    | ERROR:  relation "permissions_by_resource" already exists
openvas    | ERROR:  relation "report_counts_by_report_and_override" already exists
openvas    | ERROR:  relation "report_host_details_by_report_host_and_name" already exists
openvas    | ERROR:  relation "report_hosts_by_report_and_host" already exists
openvas    | ERROR:  relation "reports_by_task" already exists
openvas    | ERROR:  relation "result_nvt_reports_by_report" already exists
openvas    | ERROR:  relation "results_by_date" already exists
openvas    | ERROR:  relation "results_by_host_and_qod" already exists
openvas    | ERROR:  relation "results_by_nvt" already exists
openvas    | ERROR:  relation "results_by_report" already exists
openvas    | ERROR:  relation "results_by_task" already exists
openvas    | ERROR:  relation "tag_resources_by_resource" already exists
openvas    | ERROR:  relation "tag_resources_by_resource_uuid" already exists
openvas    | ERROR:  relation "tag_resources_by_tag" already exists
openvas    | ERROR:  relation "tag_resources_trash_by_tag" already exists
openvas    | ERROR:  relation "tls_certificate_locations_by_host_ip" already exists
openvas    | ERROR:  relation "tls_certificate_origins_by_origin_id_and_type" already exists
openvas    | ERROR:  relation "vt_refs_by_vt_oid" already exists
openvas    | ERROR:  relation "vt_severities_by_vt_oid" already exists
openvas    | NOTICE:  relation "vt_severities" already exists, skipping
openvas    | Unpacking base feeds data from /usr/lib/var-lib.tar.xz
openvas    | Checking DB Version
openvas    | Current GVMd database version is  250
openvas    | NOTICE:  relation "vt_severities" already exists, skipping
openvas    | NOTICE:  relation "vt_severities" already exists, skipping
openvas    | Migrate the database if needed.
openvas    | Starting Greenbone Vulnerability Manager...
openvas    | Waiting for gvmd
openvas    | Waiting for gvmd
openvas    | Waiting for gvmd
openvas    | Waiting for gvmd
openvas    | admin
openvas    | Time to fixup the gvm accounts.
openvas    | Setting admin password
openvas    | reset
openvas    | Starting Postfix for report delivery by email
openvas    | Starting Postfix Mail Transport Agent: postfix.
openvas    | Starting Open Scanner Protocol daemon for OpenVAS...
openvas    |  Get the Greenbone public Key
openvas    |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
openvas    |                                  Dload  Upload   Total   Spent    Left  Speed
100  1652  100  1652    0     0   8929      0 --:--:-- --:--:-- --:--:--  8929
openvas    | Setup environment
openvas    | Import the key
openvas    | gpg: keybox '/tmp/openvas-gnupg/pubring.kbx' created
openvas    | gpg: /tmp/openvas-gnupg/trustdb.gpg: trustdb created
openvas    | gpg: key 9823FAA60ED1E580: public key "Greenbone Community Feed integrity key" imported
openvas    | gpg: Total number processed: 1
openvas    | gpg:               imported: 1
openvas    | gpg: inserting ownertrust of 6
openvas    | Setup key for openvas ..
openvas    | Starting Greenbone Security Assistant...
openvas    | Oops, secure memory pool already initialized
openvas    | gsad main-Message: 13:36:37.375: Starting GSAD version 22.04.0
openvas    |
openvas    | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
openvas    | + Your GVM/openvas/postgresql container is now ready to use! +
openvas    | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
openvas    |
openvas    | gvmd --version
openvas    | Greenbone Vulnerability Manager 22.4.0~dev1
openvas    | Manager DB revision 250
openvas    | Copyright (C) 2009-2021 Greenbone Networks GmbH
openvas    | License: AGPL-3.0-or-later
openvas    | This is free software: you are free to change and redistribute it.
openvas    | There is NO WARRANTY, to the extent permitted by law.
openvas    |
openvas    | Image DB date:
openvas    | Thu Oct 13 13:07:27 UTC 2022
openvas    | Versions:
openvas    | pg_gvm=v22.4.0
openvas    | notus_scanner=v22.4.1
openvas    | gvmd=v22.4.0
openvas    | openvas=v22.4.0
openvas    | openvas_smb=v22.4.0
openvas    | gvm_libs=v22.4.0
openvas    | openvas_scanner=v22.4.0
openvas    | gsa=v22.4.0
openvas    | ospd=v21.4.4
openvas    | ospd_openvas=v22.4.2
openvas    | python_gvm=v22.9.1
openvas    | gvm_tools=v22.9.0
openvas    | ++++++++++++++++
openvas    | + Tailing logs +
openvas    | ++++++++++++++++
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-15 13h36.23 utc:404:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md   main:WARNING:2022-12-15 13h36.23 utc:404: gvmd: Another process is busy starting up
openvas    | md   main:MESSAGE:2022-12-15 13h36.24 utc:408:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md   main:WARNING:2022-12-15 13h36.24 utc:408: gvmd: Another process is busy starting up
openvas    | md manage:WARNING:2022-12-15 13h36.25 UTC:411: osp_scanner_feed_version: failed to connect to /var/run/ospd/ospd-openvas.sock
openvas    | md   main:MESSAGE:2022-12-15 13h36.25 utc:415:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h36.25 utc:415:    Getting users.
openvas    | md   main:MESSAGE:2022-12-15 13h36.29 utc:421:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h36.29 utc:421:    Modifying user password.
openvas    | md manage:WARNING:2022-12-15 13h36.35 UTC:737: osp_scanner_feed_version: failed to connect to /var/run/ospd/ospd-openvas.sock
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas gvmd gsad redis
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas gvmd gsad redis
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas gvmd gsad redis
openvas    |
openvas    | ==> /usr/local/var/log/gvm/notus-scanner.log <==
openvas    | 2022-12-15 13:36:37,314 notus-scanner: INFO: (notus.scanner.daemon) Starting notus-scanner version 22.4.1.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/openvas.log <==
openvas    |
openvas    | ==> /usr/local/var/log/gvm/ospd-openvas.log <==
openvas    | OSPD[822] 2022-12-15 13:36:36,990: INFO: (ospd.main) Starting OSPd OpenVAS version 22.4.2.
openvas    | OSPD[822] 2022-12-15 13:36:37,011: INFO: (ospd_openvas.messaging.mqtt) Successfully connected to MQTT broker
openvas    |
openvas    | ==> /usr/local/var/log/gvm/redis-server.log <==
openvas    | 88:C 15 Dec 2022 13:32:36.375 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
openvas    | 88:C 15 Dec 2022 13:32:36.375 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=88, just started
openvas    | 88:C 15 Dec 2022 13:32:36.375 # Configuration loaded
openvas    | 88:M 15 Dec 2022 13:32:36.378 # Server initialized
openvas    | 88:M 15 Dec 2022 13:32:36.378 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
openvas    | 88:M 15 Dec 2022 13:32:36.378 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo madvise > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled (set to 'madvise' or 'never').
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md manage:   INFO:2022-12-15 13h36.45 UTC:852: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md   main:MESSAGE:2022-12-15 13h36.46 utc:867:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h36.46 utc:867:    Getting scanners.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/ospd-openvas.log <==
openvas    | OSPD[822] 2022-12-15 13:36:47,139: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait...
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-15 13h36.48 utc:879:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h36.48 utc:879:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas redis
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md manage:   INFO:2022-12-15 13h36.55 UTC:903: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h37.05 UTC:908: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h37.15 UTC:911: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h37.26 UTC:915: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h37.36 UTC:918: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h37.46 UTC:922: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md   main:MESSAGE:2022-12-15 13h37.49 utc:936:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h37.49 utc:936:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-15 13h37.54 utc:942:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h37.54 utc:942:    Verifying scanner.
openvas    | md manage:   INFO:2022-12-15 13h37.56 UTC:944: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas redis
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md manage:   INFO:2022-12-15 13h38.06 UTC:970: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h38.16 UTC:973: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h38.26 UTC:977: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    |
openvas    | ==> /usr/local/var/log/gvm/openvas.log <==
openvas    | libgvm util:MESSAGE:2022-12-15 13h38.31 utc:906: Updated NVT cache from version 0 to 202212021023
openvas    |
openvas    | ==> /usr/local/var/log/gvm/ospd-openvas.log <==
openvas    | OSPD[822] 2022-12-15 13:38:31,441: INFO: (ospd_openvas.daemon) Finished loading VTs. The VT cache has been updated from version 0 to 202212021023.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md manage:   INFO:2022-12-15 13h38.36 UTC:980: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h38.46 UTC:984: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md   main:MESSAGE:2022-12-15 13h38.52 utc:1000:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h38.52 utc:1000:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-15 13h38.56 utc:1006:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h38.56 utc:1006:    Verifying scanner.
openvas    | md manage:   INFO:2022-12-15 13h38.56 UTC:1008: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas redis
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md manage:   INFO:2022-12-15 13h39.07 UTC:1034: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h39.17 UTC:1037: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h39.27 UTC:1041: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h39.37 UTC:1044: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h39.47 UTC:1048: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h39.57 UTC:1051: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md   main:MESSAGE:2022-12-15 13h39.57 utc:1065:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h39.57 utc:1065:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-15 13h40.01 utc:1071:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h40.01 utc:1071:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas redis
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md manage:   INFO:2022-12-15 13h40.07 UTC:1096: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h40.17 UTC:1099: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md manage:   INFO:2022-12-15 13h40.27 UTC:1103: osp_scanner_feed_version: No feed version available yet. OSPd OpenVAS is still starting
openvas    | md   main:MESSAGE:2022-12-15 13h41.00 utc:1127:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h41.00 utc:1127:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-15 13h41.03 utc:1133:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h41.03 utc:1133:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |   redis
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-15 13h42.03 utc:1191:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h42.03 utc:1191:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-15 13h42.06 utc:1197:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h42.06 utc:1197:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas redis
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-15 13h43.06 utc:1253:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h43.06 utc:1253:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-15 13h43.09 utc:1262:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h43.09 utc:1262:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas redis
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-15 13h44.09 utc:1319:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h44.09 utc:1319:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-15 13h44.13 utc:1325:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h44.13 utc:1325:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas redis
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-15 13h45.12 utc:1382:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h45.12 utc:1382:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-15 13h45.15 utc:1388:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-15 13h45.15 utc:1388:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas redis
Hansehart commented 1 year ago

I got the same problem

immauss commented 1 year ago

Thank you.

I've recently added those health checks to help diagnose these problems. Openvas is dependent on redis. So if redis dies, openvas will too.

Can you give me some details on your environment? ( OS, CPU, Memory etc.)

Also make sure you are pulling the latest. I've tested it just now and it works fine on my three test systems. ( A linode with docker-ce & 8G of RAM, RaspberryPi 4 with 4G of RAM and Docker Desktop on my Mac. )

All start and run fine.

immauss commented 1 year ago

I did a little more testing with memory limits and found that if I restrict the container to 256M of memory, I see the same results. So please make sure you have at least 256M of available memory. You can also try to add the memory reservation directive to the compose. This is something I will likely add in the near future to the default. I've long suspected that low memory was causing other issues, which is why I added the extra healthchecks to help find what was dying easier.

Below is snipped from a working docker-compose with memory limits. Obviously, you can set the high limit to whatever you have available, the reservation should ensure there's enough to get things going.. I'm not sure what happens if that memory is not available. I assume docker would refuse to start it, but not sure.

version: "3.3"
services:
  openvas:
    mem_limit: 512m
    mem_reservation: 384m
    cpus: 1
    ports:
DRIgnazGortngschirl commented 1 year ago

Can you give me some details on your environment? ( OS, CPU, Memory etc.)

Debian GNU/Linux 11 AMD EPYC 7282 (8) @ 2.794GHz Memory 32 GB SSD 1,2 TB

I did assign 4 cores and also 4 GB RAM, but that did not work for me.

    mem_limit: 4096m
    mem_reservation: 4000m
    cpus: 4

Also updated the image tag to latest

DRIgnazGortngschirl commented 1 year ago

Maybe something interesting to add here.

openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-17 10h40.28 utc:1927:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-17 10h40.28 utc:1927:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-17 10h40.30 utc:1933:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-17 10h40.30 utc:1933:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  Healthchecks completed with no issues.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-17 10h41.31 utc:1990:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-17 10h41.31 utc:1990:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-17 10h41.32 utc:1999:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-17 10h41.32 utc:1999:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  Healthchecks completed with no issues.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-17 10h42.33 utc:2055:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-17 10h42.33 utc:2055:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-17 10h42.36 utc:2061:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-17 10h42.36 utc:2061:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  Healthchecks completed with no issues.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/gvmd.log <==
openvas    | md   main:MESSAGE:2022-12-17 10h43.37 utc:2118:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-17 10h43.37 utc:2118:    Getting scanners.
openvas    | md   main:MESSAGE:2022-12-17 10h43.39 utc:2124:    Greenbone Vulnerability Manager version 22.4.0~dev1 (DB revision 250)
openvas    | md manage:   INFO:2022-12-17 10h43.39 utc:2124:    Verifying scanner.
openvas    |
openvas    | ==> /usr/local/var/log/gvm/healthchecks.log <==
openvas    |  HEALTHECHECK FAILED !
openvas    |  These services failed
openvas    |  openvas redis

I did forget to stop the container and checked the logs new once again as I saw the Web interface is up, but login is not working.

immauss commented 1 year ago

How about Disk space?

Can you remove the volume and try completely fresh?

Thanks, Scott

DRIgnazGortngschirl commented 1 year ago

Maybe I am missing something, but did it like.

docker-compose stop && docker-compose rm && docker volumes prune

immauss commented 1 year ago

I think that would work ..... But I would just do a "docker volume rm openvas" after removing the container to be sure the volume is gone. I take it that did not resolve the problem .....

Hansehart commented 1 year ago

Without updating it, the service is now running as expected. I was not familiar with Docker, but after executing the docker-compose it runs fluently for me. Thanks for your work @immauss

Hansehart commented 1 year ago

Next question is, when I am looking into the logs of the container, the latest message is: "Healthchecks completed with no issues". However if I run docker ps the status shows "Up x minutes (unhealty)". From my point everything is right, the GUI works and the scan too. So it should show up healthy, right?

immauss commented 1 year ago

THat is odd. It should show healthy. I sounds like everything is running. Does it stay that way if you restart it too ?

-Scott

Hansehart commented 1 year ago

Everything works now properly.

immauss commented 1 year ago

Thanks for the follow up!