Full GVM-11 Build Guide for CentOS 8

If those messages are showing up then you might have missed the AS GVM: modify the default scanner with the new socket location: (use the UUID that’s actually shown however) step.

See also:

1 Like

I have not missed that step, when I run “gvmd --get-scanners” it shows that it is pointed to the correct socket location, and when I run “gvmd --verify-scanner=08b69003-5fc2-4037-a479-93b440211c73” it reports back “Scanner version: OpenVAS 7.0.1.”

Strange. I have only seen such kind of messages if the socket path was wrong / pointed to the wrong or non-existent socket.

I re-built the machine and re-compiled gvm and it worked fine for a while but I started getting this error again after I rebooted it.
lib osp:WARNING:2020-07-21 09h00.38 utc:238730: osp_get_vts_version: element VTS missing. md manage:WARNING:2020-07-21 09h00.38 utc:238730: manage_update_nvt_cache_osp: failed to get scanner_version

Hi!

How to fix this at systemctl start gvmd ?

md main:MESSAGE:2020-07-26 23h33.47 utc:100155: Greenbone Vulnerability Manager version 9.0.1 (DB revision 221)
md manage:WARNING:2020-07-26 23h33.47 utc:100157: sql_exec_internal: PQexec failed: ERROR: could not access file “/opt/gvm/lib/libgvm-pg-server”: Permissão negada
(7)
md manage:WARNING:2020-07-26 23h33.47 utc:100157: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS ‘/opt/gvm/lib/libgvm-pg-server’, ‘sql_hosts_contains’ LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-07-26 23h33.47 utc:100157: sqlv: sql_exec_internal failed
md main:MESSAGE:2020-07-26 23h44.00 utc:100309: Greenbone Vulnerability Manager version 9.0.1 (DB revision 221)
md manage:WARNING:2020-07-26 23h44.00 utc:100310: sql_exec_internal: PQexec failed: ERROR: could not access file “/opt/gvm/lib/libgvm-pg-server”: Permissão negada
(7)
md manage:WARNING:2020-07-26 23h44.00 utc:100310: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS ‘/opt/gvm/lib/libgvm-pg-server’, ‘sql_hosts_contains’ LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-07-26 23h44.00 utc:100310: sqlv: sql_exec_internal failed

Thanks for your job!

Thank you very much for your Build Guide!

I have been fighting on and off for months to figure out how to build the new version since my old version was tainting all scan reports with a warning message about needing en upgrade.

You saved me a ton of work!

I did find that I needed to add some additional steps to enable full scanning.

Here’s a link to where I found the additional steps:

Hey @caseybea thank you so much for this tutorial!
Do you mind if i translated it to portuguese (BR) and put in my website? Of course i will credit you for the job. Thanks!

Did you find any solution to this??

Hi, I followed all the steps of this guide and everything was going well untill I tried to log in through the web portal - When I log in my user I get the error: -

Network error: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Any help would be appreciated thanks.

The installation stucks on setting up Postgres Database

gvmd=# grant dba to gvm;
GRANT ROLE
gvmd=# create extension “uuid-ossp”;
FEHLER: Syntaxfehler bei »-«
ZEILE 1: create extension “uuid-ossp”;
^
gvmd=# create extension “pgcrypto”;
FEHLER: konnte Erweiterungskontrolldatei »/usr/share/pgsql/extension/“pgcrypto”.control« nicht öffnen: Datei oder Verzeichnis nicht gefunden

what can I do. Install on Centos 8.1 latest

Regards,
Frank

Hi,

I am running CentOS Linux release 8.2.2004 (Core) and I am referring to Full GVM-11 Build Guide for CentOS 8 - Greenbone Community Edition - Greenbone Community Forum

while building each package I am facing CMake Error as mentioned below.

[root@openvas8 build]# pwd
/opt/gvm/src/gvm-libs-11.0.1/build

[root@openvas8 build]#cmake … -DCMAKE_INSTALL_PREFIX=/opt/gvm
CMake Error: The source directory “/opt/gvm/src/gvm-libs-11.0.1/build/…” does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

Any help will be highly appreciated. Thanks in advance and I look forward to hearing from you.

Best Regards,

Kaushal

Hi,

I am following Full GVM-11 Build Guide for CentOS 8. I am facing the below issue while restarting gsad service

[root@openvas8 gvm]# cat /opt/gvm/var/log/gvm/gsad.log
gsad main:MESSAGE:2020-08-15 00h13.17 utc:26014: Starting GSAD version 9.0.1
gsad main:CRITICAL:2020-08-15 00h13.17 utc:26015: main: Could not load private SSL key from /opt/gvm/var/lib/gvm/private/CA/serverkey.pem: Failed to open file “/opt/gvm/var/lib/gvm/private/CA/serverkey.pem”: No such file or directory
gsad main:MESSAGE:2020-08-15 00h13.29 utc:26056: Starting GSAD version 9.0.1
gsad main:CRITICAL:2020-08-15 00h13.29 utc:26057: main: Could not load private SSL key from /opt/gvm/var/lib/gvm/private/CA/serverkey.pem: Failed to open file “/opt/gvm/var/lib/gvm/private/CA/serverkey.pem”: No such file or directory
gsad main:MESSAGE:2020-08-15 00h14.28 utc:26144: Starting GSAD version 9.0.1
gsad main:CRITICAL:2020-08-15 00h14.28 utc:26145: main: Could not load private SSL key from /opt/gvm/var/lib/gvm/private/CA/serverkey.pem: Failed to open file “/opt/gvm/var/lib/gvm/private/CA/serverkey.pem”: No such file or directory
gsad main:MESSAGE:2020-08-15 00h24.06 utc:26692: Starting GSAD version 9.0.1
gsad main:CRITICAL:2020-08-15 00h24.06 utc:26693: main: Could not load private SSL key from /opt/gvm/var/lib/gvm/private/CA/serverkey.pem: Failed to open file “/opt/gvm/var/lib/gvm/private/CA/serverkey.pem”: No such file or directory
gsad main:MESSAGE:2020-08-15 00h33.42 utc:27293: Starting GSAD version 9.0.1
gsad main:CRITICAL:2020-08-15 00h33.42 utc:27294: main: Could not load SSL certificate from /opt/gvm/var/lib/gvm/CA/servercert.pem: Failed to open file “/opt/gvm/var/lib/gvm/CA/servercert.pem”: No such file or directory
gsad main:MESSAGE:2020-08-15 00h34.53 utc:27360: Starting GSAD version 9.0.1
gsad main:CRITICAL:2020-08-15 00h34.53 utc:27361: main: Could not load SSL certificate from /opt/gvm/var/lib/gvm/CA/servercert.pem: Failed to open file “/opt/gvm/var/lib/gvm/CA/servercert.pem”: No such file or directory
[root@openvas8 gvm]# systemctl status gsad
● gsad.service - Job that runs the gsa daemon
Loaded: loaded (/etc/systemd/system/gsad.service; enabled; vendor preset: disabled)
Active: failed (Result: protocol) since Fri 2020-08-14 20:34:53 EDT; 34s ago
Docs: man:gsa
Process: 27360 ExecStart=/opt/gvm/sbin/gsad --listen=0.0.0.0 (code=exited, status=0/SUCCESS)
Main PID: 26058 (code=killed, signal=KILL)

Aug 14 20:34:53 openvas8 systemd[1]: Stopped Job that runs the gsa daemon.
Aug 14 20:34:53 openvas8 systemd[1]: Starting Job that runs the gsa daemon...
Aug 14 20:34:53 openvas8 systemd[1]: gsad.service: Can't open PID file /opt/gvm/var/run/gsad.pid (yet?) after start: No such file or directory
Aug 14 20:34:53 openvas8 systemd[1]: gsad.service: Failed with result 'protocol'.
Aug 14 20:34:53 openvas8 systemd[1]: Failed to start Job that runs the gsa daemon.
[root@openvas8 gvm]# ll /opt/gvm/var/lib/gvm/private/CA/serverkey.pem
-rw-r--r-- 1 gvm gvm 1285 Aug 14 20:33 /opt/gvm/var/lib/gvm/private/CA/serverkey.pem
[root@openvas8 gvm]#

Any help will be highly appreciated. Thanks in Advance.

Best Regards,

Kaushal

hi i am facing this error
can anyone help me in this

Hi,

Is it single dot or double dot or three dot as per the below command line?

cmake … -DCMAKE_INSTALL_PREFIX=/opt/gvm

Thanks and Regards,

Kaushal

1 Like

It is the path to the directory where the sources are located. In this case it is two dots.

@indusvalley @kaushalshriyan but nevertheless I have to admit you should not build from sources if you have such basic issues already. If you don’t know how to install a compiler, run make and cmake it will be a big hurdle for you. Especially with such a big and complicated suite like GVM.

2 Likes

@bricks Thanks for the clarification. Are there binaries for CentOS / RHEL OS?

Hi,

Checking in again if there are any binaries available for GVM based OpenVAS application or is it only to compile from source code available in compressed tar ball file as of now?

[root@openvas8 src]# pwd
/opt/gvm/src
[root@openvas8 src]# ll
total 5168
drwxrwxr-x 11 gvm gvm 4096 Aug 14 20:58 gsa-9.0.1
-rw-r–r-- 1 gvm gvm 1936391 Aug 11 13:47 gsa-9.0.1.tar.gz
drwxrwxr-x 12 gvm gvm 4096 Aug 12 00:32 gvm-libs-11.0.1
-rw-r–r-- 1 gvm gvm 213553 Aug 11 13:47 gvm-libs-11.0.1.tar.gz
drwxr-xr-x 12 gvm gvm 4096 Aug 11 22:14 gvm-libs-master
drwxrwxr-x 11 gvm gvm 4096 Aug 13 21:02 gvmd-9.0.1
-rw-r–r-- 1 gvm gvm 1446748 Aug 11 13:47 gvmd-9.0.1.tar.gz
drwxrwxr-x 13 gvm gvm 4096 Aug 11 21:05 openvas-7.0.1
-rw-r–r-- 1 gvm gvm 429012 Aug 11 13:47 openvas-7.0.1.tar.gz
drwxrwxr-x 10 gvm gvm 4096 Aug 11 20:59 openvas-smb-1.0.5
-rw-r–r-- 1 gvm gvm 1081679 Aug 11 13:48 openvas-smb-1.0.5.tar.gz
drwxrwxr-x 10 gvm gvm 333 Aug 14 12:27 ospd-2.0.1
-rw-r–r-- 1 gvm gvm 87313 Aug 11 13:47 ospd-2.0.1.tar.gz
drwxrwxr-x 11 gvm gvm 4096 Aug 14 12:28 ospd-openvas-1.0.1
-rw-r–r-- 1 gvm gvm 50455 Aug 11 13:47 ospd-openvas-1.0.1.tar.gz
[root@openvas8 src]#

Please comment

Best Regards,

Kaushal

@caseybea
I got here in your order and there was an error

gvm@localhost ~]$ greenbone-ntv-sync
-bash: greenbone-ntv-sync:Command not found
[gvm@localhost ~]$ find /opt/gvm/var/lib/openvas/plugins | wc -l
1

It’s greenbone-nvt-sync. Network Vulnerability Test (NVT).

@caseybea

When I type “greenbone-ntv-sync”, “greenbone-scapdata-sync” and also “greenbone-certdata-sync”, it always comes out the error information “-bash: greenbone-ntv-sync:Command not found”.
I do the steps by your post, and I want to know where I have done wrong.