OSPD socket /var/run/ospd/ospd.sock does not exist (greenbone community container)

Despite copying the exact docker compose file (attached) I am getting the error

ospd-openvas-1 | OSPD[7] 2024-07-24 14:32:48,716: INFO: (ospd.main) Starting OSPd OpenVAS version 22.7.1.
ospd-openvas-1 | OSPD[7] 2024-07-24 14:32:58,768: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait…
ospd-openvas-1 | OSPD[7] 2024-07-24 14:33:31,421: INFO: (ospd_openvas.daemon) Finished loading VTs. The VT cache has been updated from version 0 to 202407240611.
openvasd-1 | 2024-07-24T14:32:42.908251Z WARN openvasd: OSPD socket /var/run/ospd/ospd.sock does not exist. Some commands will not work until the socket is created!
redis-server-1 | 8:C 24 Jul 2024 14:30:42.691 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo

and subsequently

gvmd-1 | md manage:WARNING:2024-07-24 14h32.23 utc:94: osp_scanner_feed_version: failed to connect to /run/ospd/ospd-openvas.sock

Although all containers have started without issue.
root@openvas:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bc46730dfc51 greenbone/gsa:stable “/usr/local/bin/entr…” 19 minutes ago Up 18 minutes 0.0.0.0:443->443/tcp, :::443->443/tcp greenbone-community-edition-gsa-1
dcb8bb48b350 greenbone/gvmd:stable “/usr/local/bin/entr…” 19 minutes ago Up 18 minutes greenbone-community-edition-gvmd-1
761ee419b1ed greenbone/ospd-openvas:stable “/usr/bin/tini – /u…” 19 minutes ago Up 17 minutes greenbone-community-edition-ospd-openvas-1
3692529cb906 greenbone/openvas-scanner:stable “/bin/sh -c /usr/loc…” 19 minutes ago Up 17 minutes greenbone-community-edition-openvasd-1
432b17c39c8a greenbone/openvas-scanner:stable “/bin/sh -c 'cat /et…” 19 minutes ago Up 18 minutes greenbone-community-edition-openvas-1
243f51bfb6c7 greenbone/pg-gvm:stable “/usr/local/bin/entr…” 19 minutes ago Up 19 minutes greenbone-community-edition-pg-gvm-1
2e3b6ecccfbd greenbone/redis-server “/bin/sh -c 'rm -f /…” 19 minutes ago Up 19 minutes greenbone-community-edition-redis-server-1
root@openvas:~#

Following is the excerpt from the docker compose file
gvmd:
image: greenbone/gvmd:stable
restart: on-failure
volumes:
- gvmd_data_vol:/var/lib/gvm
- scap_data_vol:/var/lib/gvm/scap-data/
- cert_data_vol:/var/lib/gvm/cert-data
- data_objects_vol:/var/lib/gvm/data-objects/gvmd
- vt_data_vol:/var/lib/openvas/plugins
- psql_data_vol:/var/lib/postgresql
- /tmp/gvm/gvmd:/run/gvmd
- ospd_openvas_socket_vol:/run/ospd
- psql_socket_vol:/var/run/postgresql
depends_on:
pg-gvm:
condition: service_started
scap-data:
condition: service_completed_successfully
cert-bund-data:
condition: service_completed_successfully
dfn-cert-data:
condition: service_completed_successfully
data-objects:
condition: service_completed_successfully
report-formats:
condition: service_completed_successfully

I just pulled the containers from the current docker-compose.yml file and the containers started up with no errors. You can try pulling the containers again.

docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition pull
docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition up -d
1 Like

Ok thanks a lot ! - let me try once

Hi @rippledj - thanks for your response - i did the same but observed some errors again - could you please refer the log below - conerns highlighted in bold (still see openvasd-1 | 2024-07-25T10:26:50.910572Z WARN openvasd: OSPD socket /var/run/ospd/ospd.sock does not exist. Some commands will not work until the socket is created!):

pg-gvm-1 | 2024-07-25 10:26:24.908 UTC [161] gvmd@gvmd ERROR: relation “public.meta” does not exist at character 19
pg-gvm-1 | 2024-07-25 10:26:24.908 UTC [161] gvmd@gvmd STATEMENT: SELECT value FROM public.meta WHERE name = ‘database_version’;
gvmd-1 | User created.
gvmd-1 | starting gvmd
gvmd-1 | md manage: INFO:2024-07-25 10h26.38 utc:42: Getting users.
gvmd-1 | md manage:MESSAGE:2024-07-25 10h26.38 utc:42: No SCAP database found
gvmd-1 | md manage:MESSAGE:2024-07-25 10h26.38 utc:42: No CERT database found
gvmd-1 | md main:MESSAGE:2024-07-25 10h26.39 utc:45: Greenbone Vulnerability Manager version 23.8.0 (DB revision 256)
gvmd-1 | md manage: INFO:2024-07-25 10h26.39 utc:45: Modifying setting.
gvmd-1 | md manage:MESSAGE:2024-07-25 10h26.39 utc:45: No SCAP database found
gvmd-1 | md manage:MESSAGE:2024-07-25 10h26.39 utc:45: No CERT database found
gvmd-1 | md main:MESSAGE:2024-07-25 10h26.40 utc:46: Greenbone Vulnerability Manager version 23.8.0 (DB revision 256)
gvmd-1 | md manage:MESSAGE:2024-07-25 10h26.40 utc:47: No SCAP database found
gvmd-1 | md manage:MESSAGE:2024-07-25 10h26.40 utc:47: No CERT database found
pg-gvm-1 | 2024-07-25 10:26:41.043 UTC [167] gvmd@gvmd WARNING: there is already a transaction in progress
gvmd-1 | event port_list:MESSAGE:2024-07-25 10h26.41 utc:47: Port list All IANA assigned TCP and UDP (4a4717fe-57d2-11e1-9a26-406186ea4fc5) has been created by admin
gvmd-1 | event port_list:MESSAGE:2024-07-25 10h26.41 utc:47: Port list All TCP and Nmap top 100 UDP (730ef368-57e2-11e1-a90f-406186ea4fc5) has been created by admin
gvmd-1 | event port_list:MESSAGE:2024-07-25 10h26.41 utc:47: Port list All IANA assigned TCP (33d0cd82-57c6-11e1-8ed1-406186ea4fc5) has been created by admin
gvmd-1 | event report_format:MESSAGE:2024-07-25 10h26.41 utc:47: Report format TXT (a3810a62-1f62-11e1-9219-406186ea4fc5) has been created by admin
gvmd-1 | event report_format:MESSAGE:2024-07-25 10h26.41 utc:47: Report format XML (a994b278-1f62-11e1-96ac-406186ea4fc5) has been created by admin
gvmd-1 | event report_format:MESSAGE:2024-07-25 10h26.41 utc:47: Report format PDF (c402cc3e-b531-11e1-9163-406186ea4fc5) has been created by admin
gvmd-1 | event report_format:MESSAGE:2024-07-25 10h26.41 utc:47: Report format Anonymous XML (5057e5cc-b825-11e4-9d0e-28d24461215b) has been created by admin
gvmd-1 | event report_format:MESSAGE:2024-07-25 10h26.41 utc:47: Report format CSV Results (c1645568-627a-11e3-a660-406186ea4fc5) has been created by admin
gvmd-1 | libgvm util:MESSAGE:2024-07-25 10h26.42 utc:47: error searching for OpenPGP key ‘GVM Credential Encryption’: Not found
gvmd-1 | libgvm util: INFO:2024-07-25 10h26.42 utc:47: starting key generation …
vulnerability-tests-1 | changed user permissions to 1001
vulnerability-tests-1 | changed group permissions to 1001
vulnerability-tests-1 | files copied.
pg-gvm-1 | 2024-07-25 10:26:45.074 UTC [167] gvmd@gvmd WARNING: there is no transaction in progress
gvmd-1 | libgvm util: INFO:2024-07-25 10h26.44 utc:47: OpenPGP key ‘GVM Credential Encryption - 2024-07-25T10:26:42Z’ has been generated
gvmd-1 | md manage:WARNING:2024-07-25 10h26.45 utc:77: osp_scanner_feed_version: failed to connect to /run/ospd/ospd-openvas.sock
gvmd-1 | md manage:WARNING:2024-07-25 10h26.45 utc:76: update_scap: No SCAP db present, rebuilding SCAP db from scratch
gvmd-1 | md manage: INFO:2024-07-25 10h26.45 utc:78: Initializing CERT database
vulnerability-tests-1 exited with code 0
openvasd-1 | 2024-07-25T10:26:50.910572Z WARN openvasd: OSPD socket /var/run/ospd/ospd.sock does not exist. Some commands will not work until the socket is created!
openvasd-1 | 2024-07-25T10:26:50.910642Z INFO openvasd: configuring storage devices mode=ServiceNotus storage_type=InMemory
openvasd-1 | 2024-07-25T10:26:50.910674Z INFO openvasd: using in memory store. No sensitive data will be stored on disk.
openvasd-1 | 2024-07-25T10:26:50.915648Z WARN openvasd::controller::context: Neither mTLS nor an API key are set. /scans endpoint is unsecured.
openvasd-1 | 2024-07-25T10:26:50.915771Z INFO openvasd::controller: running in config.mode=ServiceNotus
openvasd-1 | 2024-07-25T10:26:50.915826Z INFO openvasd::controller: listening on http://0.0.0.0:80

I didn’t use the container, but rather built from source. I was able to resolve the OSPD socket error by adding

--ospd-socket /run/ospd/ospd-openvas.sock

to the ExecStart string in openvasd.service.