KALI openvas // scanner not starting since reboot

Support/Development for OpenVAS
smaubian
New Forum User
New Forum User
Posts: 4
Joined: Fri Aug 10, 2018 5:10 am
Location: France

KALI openvas // scanner not starting since reboot

Unread post by smaubian »

Greetings,

i have an Openvas 9 kali that stopped working since a reboot. the scanner was performing scan when it rebooted.

I checked logs and found nothing. Did an strace and foudn it seems to be waiting for the redis server

it is redoing the below mulitple times
socket(AF_UNIX, SOCK_STREAM, 0) = 5
fcntl(5, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(5, {sa_family=AF_UNIX, sun_path="/var/run/redis-openvas/redis-server.sock"}, 110) = 0
fcntl(5, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(5, F_SETFL, O_RDWR) = 0
write(5, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(5, ":0\r\n", 16384) = 4
write(5, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(5, ":0\r\n", 16384) = 4
write(5, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60

the redis server is up & running & the /var/run/redis-openvas/redis-server.sock file is present
ps -aux | grep redis
redis 808 0.2 1.4 147872 115516 ? Ssl 04:41 0:04 /usr/bin/redis-server 127.0.0.1:0



Anyone can help me to understand what is prevening the openvassd to start ?

systemctl reported event
systemctl status openvas-scanner.service
● openvas-scanner.service - Open Vulnerability Assessment System Scanner Dae
Loaded: loaded (/lib/systemd/system/openvas-scanner.service; enabled; ven
Active: failed (Result: timeout) since Fri 2018-08-10 04:53:58 EDT; 24min
Docs: man:openvassd(8)
http://www.openvas.org/
Process: 3237 ExecStart=/usr/sbin/openvassd --unix-socket=/var/run/openvas

Aug 10 04:52:28 frdrtsuova01p systemd[1]: Starting Open Vulnerability Assess
Aug 10 04:53:58 frdrtsuova01p systemd[1]: openvas-scanner.service: Start openvassd
Aug 10 04:53:58 frdrtsuova01p systemd[1]: openvas-scanner.service: Failed with result "timeout". Terminating.
Aug 10 04:53:58 frdrtsuova01p systemd[1]: Failed to start Open Vulnerability Assessment System Scanner Daemon.
lines 1-11/11 (END)...skipping...
smaubian
New Forum User
New Forum User
Posts: 4
Joined: Fri Aug 10, 2018 5:10 am
Location: France

Re: KALI openvas // scanner not starting since reboot

Unread post by smaubian »

found a solution to my issue. I had to connect to the local redis server and do a flushdb

Code: Select all

-> redis-cli
->     flushDB
then stop/start openvas-scanner. Logs did not help me a lot to gathetr the reason but i think my DB was corrupted when i did stop the server


Now i'm facing another kind of issues. Openvas works fine, i can start to scan some hosts (about 200). After some time i'm no more able to connect to the greenbone interface.
first time i was thinking i made a mistake on the password and changed it command line (openvasmd --user=<user> --user-password=<password> but this does not resolve my issue as openvasmd was never able to complete the command (remains stucked).

I again went to the redis reset to make a dbflush and then restart openvasmd (manager now, no longer scanner) and that again resolved the issue.

I'm unsure on what is happening there. anyone facing this already ?
Last edited by smaubian on Tue Aug 14, 2018 4:19 am, edited 1 time in total.
smaubian
New Forum User
New Forum User
Posts: 4
Joined: Fri Aug 10, 2018 5:10 am
Location: France

Re: KALI openvas // scanner not starting since reboot

Unread post by smaubian »

next. I found in openvasmd config file some errors related to sqlite3. digging into this i found that this is an already reported issue.

error logs in openvasmd

Code: Select all

md manage:WARNING:2018-08-14 03h54.46 utc:15776: manage_schedule: manage_update_nvti_cache error (Pe$
md manage:WARNING:2018-08-14 03h54.56 utc:15776: sql_exec_internal: sqlite3_step failed: cannot star$
md manage:WARNING:2018-08-14 03h54.56 utc:15776: sqlv: sql_exec_internal failed
To make it secure i moved my sqlite3 (and libsqlite3-0) to the debian stable channel 3.16.2-5,
and then i did put on hold updates for this package.

apt-mark hold libsqlite3-0
apt-mark hold sqlite3

I'm now running scan again. will update this thread is error occurs again

forgot to mention i'm using up2date Kali distribution.
smaubian
New Forum User
New Forum User
Posts: 4
Joined: Fri Aug 10, 2018 5:10 am
Location: France

Re: KALI openvas // scanner not starting since reboot

Unread post by smaubian »

after 24 hours system is now stable and scans are progressing

Issue on SqlLite 3.24 package from Kali 2018.2 resulted in scan stopping can be resoved moving to the debian stable sqlite3
Post Reply