1

I have a problem with openvassd hanging while starting:

connect(6, {sa_family=AF_LOCAL, sun_path="/tmp/redis.sock"}, 110) = 0
fcntl64(6, F_GETFL)                     = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl64(6, F_SETFL, O_RDWR)             = 0
write(6, "*3\r\n$6\r\nCONFIG\r\n$3\r\nGET\r\n$9\r\ndat"..., 40) = 40
read(6, "*2\r\n$9\r\ndatabases\r\n$2\r\n16\r\n", 16384) = 27
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 60) = 60
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 61) = 61
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 61) = 61
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 61) = 61
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 61) = 61
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 61) = 61
read(6, ":0\r\n", 16384)                = 4
write(6, "*4\r\n$6\r\nHSETNX\r\n$23\r\nOpenVAS.__G"..., 61) = 61
read(6, ":0\r\n", 16384)                = 4
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({60, 0}, 

Seems related to redis but it seems OK:

$ redis-cli -s /tmp/redis.sock 
redis /tmp/redis.sock> monitor
OK
    1463747103.045858 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "1" "1"
1463747103.046033 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "2" "1"
1463747103.046145 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "3" "1"
1463747103.046244 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "4" "1"
1463747103.046410 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "5" "1"
1463747103.046528 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "6" "1"
1463747103.046611 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "7" "1"
1463747103.046703 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "8" "1"
1463747103.046793 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "9" "1"
1463747103.046887 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "10" "1"
1463747103.046983 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "11" "1"
1463747103.047084 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "12" "1"
1463747103.047249 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "13" "1"
1463747103.047344 [0 unix:/tmp/redis.sock] "HSETNX" "OpenVAS.__GlobalDBIndex" "14" "1"

Running openvasmd --rebuild did not also bring anything ...

Any idea?

1
  • I'm having the exact same issue, same symptoms, I even did the same strace and redis trace before I found this! Did you ever solve the issue? – Mark Sep 14 '17 at 20:17
2

I finally found some insight on this mailing list.

The default redis config has 16 maximum databases. Stopping openvassd while it is in progress leaves the database locked, and starting it next time creates a new database. After 16 such unclean shutdowns, openvassd will hang on start due to lack of redis databases.

A brute-force way of fixing this is the flushall redis directive (substitute your redis sock file as appropriate):

# redis-cli -s /tmp/redis.sock 
> flushall

I was even able to resume my massive scan...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.