This has been plaguing me for far too long.
“Could not connect to Scanner at /var/run/ospd/ospd.sock”
(I know there are threads on this. I’ve read them. But I’m still stumped.)
I’m running in a fully updated buster container on docker.
This problem started with the most recent updates to GSE. I have tried hardcoding the sockets, I’ve tried removing all references to the sockets in my startup commands ( to use the defaults), but no matter what I do, I can not get gvmd to talk with the ospd-openvas via socket. In the past, I’ve been able to kludge around problems of this nature with chmod/chown/chgrp and/or soft links, but this time, these methods have thus far been unsuccessful.
The permissions on the socket are wide open.
root@c38b032cce21:/# ls -l /var/run/ospd/ospd.sock
srwxrwxrwx. 1 root gvm 0 Aug 25 08:50 /var/run/ospd/ospd.sock
(The group is changed via chgrp after ospd-openvas starts)
The scanner is pointed to the correct socket.
root@c38b032cce21:/# su -c “gvmd --get-scanners” gvm
08b69003-5fc2-4037-a479-93b440211c73 OpenVAS /var/run/ospd/ospd.sock 0 OpenVAS Default
I’ve also disabled SELinux on the host to verify that was not causing any issues.
I’m building with ALL default paths. If I understand correctly, this should install everything in “/usr/local/” which is essential for the multistage container build processes I’m using. If there is something being installed outside of “/usr/local” that is essential to this process, then that could be my problem, but I’ve no idea how to figure that bit out.
lsof shows the socket open:
root@a3746e7845bd:/# lsof | grep ospd.sock
ospd-open 233 root 5u unix 0x0000000000000000 0t0 23711495 /var/run/ospd/ospd.sock type=STREAM
ospd-open 233 238 ospd-open root 5u unix 0x0000000000000000 0t0 23711495 /var/run/ospd/ospd.sock type=STREAM
But I still get the “Could not Connect”.
Versions:
gvmd=v21.4.3
openvas=v21.4.2
openvas_smb=v21.4.0
gvm_libs=v21.4.2
openvas_scanner=v21.4.2
gsa=v21.4.2
ospd=v21.4.3
ospd_openvas=v21.4.2
python_gvm=v21.6.0
gvm_tools=v21.6.1
All of the container build bits and startup are in github in the “newbuild” branch.
Start comands:
ospd-openvas --log-file /usr/local/var/log/gvm/ospd-openvas.log
–unix-socket /var/run/ospd/ospd.sock --log-level INFO --socket-mode 777
su -c “gvmd -a 0.0.0.0 -p 9390 --osp-vt-update=/var/run/ospd/ospd.sock --max-email-attachment-size=64000000 --max-email-include-size=64000000 --max-email-message-size=64000000” gvm
I have that feeling that I’ve been staring at this for too long and failing to see the glaringly obvious answer.
Please help.
Thanks,
Scott