openvassd挂

openvassd挂

openvassd我在启动时遇到挂起问题:

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}, 

似乎相关,redis但似乎还可以:

$ 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"

跑步openvasmd --rebuild也没有带来什么……

任何想法?

答案1

我终于找到了一些见解这个邮件列表

默认的 redis 配置最多有 16 个数据库。在 openvassd 运行时停止它会使数据库锁定,下次启动它会创建一个新数据库。经过 16 次这样的非正常关闭后,openvassd 将由于缺少 redis 数据库而在启动时挂起。

解决此问题的一种强力方法是使用flushallredis 指令(根据需要替换您的 redis sock 文件):

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

我什至能够恢复我的大规模扫描......

相关内容