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

我甚至能夠恢復我的大規模掃描...

相關內容