Gvmd does not return anything


#1

I have successfully compiled and installed openvas scanner and gvmd but when i run gvmd command with any option except help, noting is returned in terminal.

pi@NanoPi-NEO2:/tmp/gvmd/build$ sudo gvmd
pi@NanoPi-NEO2:/tmp/gvmd/build$

gvmd.log gives following output:

pi@NanoPi-NEO2:/tmp/gvmd/build$ sudo cat /usr/var/log/gvm/gvmd.log
md main:MESSAGE:2019-02-22 03h58.30 utc:21861: Greenbone Vulnerability Manager version 9.0+alpha (DB revision 206)
md manage:WARNING:2019-02-22 03h58.30 utc:21861: Failed to open lock file ‘/usr/var/run/gvm-checking’: No such file or directory
md main:CRITICAL:2019-02-22 03h58.30 utc:21861: main: Error trying to get checking lock
md main:MESSAGE:2019-02-22 04h00.53 utc:21878: Greenbone Vulnerability Manager version 9.0+alpha (DB revision 206)
md manage:WARNING:2019-02-22 04h00.53 utc:21878: Failed to open lock file ‘/usr/var/run/gvm-checking’: No such file or directory


Remote closed the connection [gvm-cli] while fetching reports
#2

Also I tried with openvas manager 7.0 , which would return following output

pi@NanoPi-NEO2:/tmp/gvmd/build$ sudo openvasmd --get-users
openvasmd: error while loading shared libraries: libopenvas_omp.so.9: cannot open shared object file: No such file or directory


#3

It seems your path and environment is not correct …


#4

Thanks for the response.

How can I correct them ?
sudo gvmd -h works fine. I need to run scans from terminal. Do I need to install OMP as well or is it possible to do via gvmd. I just cannot find the correct documentation regarding my need.


#5
pi@NanoPi-NEO2:~$ sudo gvm-cli socket --gmp-username myuser --gmp-password password --sockpath /usr/local/var/run/gvmd.sock --xml "<get_tasks/>"
<get_tasks_response status="200" status_text="OK"><apply_overrides>0</apply_overrides><task id="8adb8c90-e857-45e5-abb1-9a39593ae480"><owner><name>myuser</name></owner><name></name><comment></comment><creation_time>2019-02-22T10:57:24Z</creation_time><modification_time>2019-02-22T10:57:24Z</modification_time><writable>1</writable><in_use>0</in_use><permissions><permission><name>Everything</name></permission></permissions><alterable>0</alterable><config id=""><name></name><type>-1</type><trash>0</trash></config><target id=""><name></name><trash>0</trash></target><hosts_ordering>(null)</hosts_ordering><scanner id=''><name></name><type>0</type><trash>0</trash></scanner><status>New</status><progress>-1</progress><report_count>0<finished>0</finished></report_count><trend></trend><schedule id=""><name></name><next_time>over</next_time><trash>0</trash></schedule><schedule_periods>0</schedule_periods><observers></observers><preferences><preference><name>Maximum concurrently executed NVTs per host</name><scanner_name>max_checks</scanner_name><value>10</value></preference><preference><name>Maximum concurrently scanned hosts</name><scanner_name>max_hosts</scanner_name><value>30</value></preference><preference><name>Network Source Interface</name><scanner_name>source_iface</scanner_name><value></value></preference><preference><name>Add results to Asset Management</name><scanner_name>in_assets</scanner_name><value>yes</value></preference><preference><name>Apply Overrides when adding Assets</name><scanner_name>assets_apply_overrides</scanner_name><value>yes</value></preference><preference><name>Min QOD when adding Assets</name><scanner_name>assets_min_qod</scanner_name><value>70</value></preference><preference><name>Auto Delete Reports</name><scanner_name>auto_delete</scanner_name><value>0</value></preference><preference><name>Auto Delete Reports Data</name><scanner_name>auto_delete_data</scanner_name><value>0</value></preference></preferences></task><task id="be386722-3036-42f0-bb80-73666d362e9a"><owner><name>myuser</name></owner><name></name><comment></comment><creation_time>2019-02-22T10:58:30Z</creation_time><modification_time>2019-02-22T10:58:30Z</modification_time><writable>1</writable><in_use>0</in_use><permissions><permission><name>Everything</name></permission></permissions><alterable>0</alterable><config id=""><name></name><type>-1</type><trash>0</trash></config><target id=""><name></name><trash>0</trash></target><hosts_ordering>(null)</hosts_ordering><scanner id=''><name></name><type>0</type><trash>0</trash></scanner><status>New</status><progress>-1</progress><report_count>0<finished>0</finished></report_count><trend></trend><schedule id=""><name></name><next_time>over</next_time><trash>0</trash></schedule><schedule_periods>0</schedule_periods><observers></observers><preferences><preference><name>Maximum concurrently executed NVTs per host</name><scanner_name>max_checks</scanner_name><value>10</value></preference><preference><name>Maximum concurrently scanned hosts</name><scanner_name>max_hosts</scanner_name><value>30</value></preference><preference><name>Network Source Interface</name><scanner_name>source_iface</scanner_name><value></value></preference><preference><name>Add results to Asset Management</name><scanner_name>in_assets</scanner_name><value>yes</value></preference><preference><name>Apply Overrides when adding Assets</name><scanner_name>assets_apply_overrides</scanner_name><value>yes</value></preference><preference><name>Min QOD when adding Assets</name><scanner_name>assets_min_qod</scanner_name><value>70</value></preference><preference><name>Auto Delete Reports</name><scanner_name>auto_delete</scanner_name><value>0</value></preference><preference><name>Auto Delete Reports Data</name><scanner_name>auto_delete_data</scanner_name><value>0</value></preference></preferences></task><filters id=""><term>apply_overrides=0 min_qod=70 first=1 rows=10 sort=name</term><keywords><keyword><column>apply_overrides</column><relation>=</relation><value>0</value></keyword><keyword><column>min_qod</column><relation>=</relation><value>70</value></keyword><keyword><column>first</column><relation>=</relation><value>1</value></keyword><keyword><column>rows</column><relation>=</relation><value>10</value></keyword><keyword><column>sort</column><relation>=</relation><value>name</value></keyword></keywords></filters><sort><field>name<order>ascending</order></field></sort><tasks start="1" max="1000"/><task_count>2<filtered>2</filtered><page>2</page></task_count></get_tasks_response>
pi@NanoPi-NEO2:/$ sudo gvm-cli socket --gmp-username myuser --gmp-password password --sockpath /usr/local/var/run/gvmd.sock  --xml "<create_task><name>one dot one task</name> \
<target id=\"9ce5715f-ca2b-4541-a6f9-36f6d1e491cb\"></target>"

timed out
pi@NanoPi-NEO2:~$ sudo gvm-cli socket --gmp-username myuser --gmp-password mypassword --sockpath /usr/local/var/run/gvmd.sock --xml '<start_task task_id="8adb8c90-e857-45e5-abb1-9a39593ae480"/>' 
Remote closed the connection

I tried with gvm-cli it says Remote closed the connection. The host I am trying to scan is live though.


#6

Please note that the github master branches / alpha versions are development versions not officially released and where all the development is happening. Such versions might show unexpected behavior or could even break/be in a temporary unusable state at any time.

For productive use it is strongly suggested to stay with the official announced source code releases in About the Source Edition (GSE) category.

If you want to contribute to the development of those you probably need to dig into such issues on your own and could consider to contribute at the issue trackers of github: http://github.com/greenbone


#7

And please read my answer about not running a tool like gvm-cli as root here. Running a tool (i am not talking about a daemon) as root is a bad habit on unix systems and can nearly always be avoided.


#8

This means you library search path is incorrect and openvasmd coudldn’t find the required library namely libopenvas_omp.so.9. Please check with ldd /bin/openmasmd is all libraries are provided. If you never had such issues before and you don’t know how to fix library search paths please thing about not using a source build and instead use some packages provided for your distribution.