I’ve installed the gvm-tools (with pip3) but when I try to run the gvm-pyshell in socket mode I get this error:
gvm.errors.GvmError: Socket /var/run/gvmd.sock does not exist
Any hint about how to fix it?
"/opt/gvm/.local/bin/gvm-pyshell", line 10, in <module> sys.exit(main()) File "/opt/gvm/.local/lib/python3.7/site-packages/gvmtools/pyshell.py", line 134, in main with protocol_class(connection, transform=transform) as protocol: File "/opt/gvm/.local/lib/python3.7/site-packages/gvm/protocols/gmp.py", line 79, in __enter__ self.connect() File "/opt/gvm/.local/lib/python3.7/site-packages/gvm/protocols/base.py", line 107, in connect self._connection.connect() File "/opt/gvm/.local/lib/python3.7/site-packages/gvm/connections.py", line 353, in connect ) from None gvm.errors.GvmError: Socket /var/run/gvmd.sock does not exist
There is no gvmd.sock in the whole system. I can only see the ospd.sock:
root@8b480bba09e3:/# ls -l /opt/gvm/var/run/
-rw-r--r-- 1 root root 4 Jan 8 15:45 gsad.pid
-rw------- 1 gvm gvm 0 Jan 2 11:56 gvm-checking
-rw------- 1 gvm gvm 0 Jan 2 11:56 gvm-create-functions
-rw------- 1 gvm gvm 0 Jan 2 11:56 gvm-helping
-rw------- 1 gvm gvm 0 Jan 2 11:56 gvm-migrating
-rw------- 1 gvm gvm 0 Jan 2 11:57 gvm-serving
-rw------- 1 gvm gvm 4 Jan 8 15:46 gvmd.pid
-rw-r--r-- 1 gvm gvm 3 Jan 8 15:45 ospd-openvas.pid
srwx------ 1 gvm gvm 0 Jan 8 15:47 ospd.sock
Hello, same issue here.
I can communicate using osp (ospd.sock does exist) but gvmd.sock doesn’t exist.
I tried touch gvmd.sock , then chmod 777 gmvd.sock and i got a Errno 111 ( i know its not the proper way to do it ) any info will be appriciated
The path to the gvmd socket depends on your installation method. If you got gvmd via packages it should be placed under /var/run/gvmd.sock. gvmd will create the socket at startup if it isn’t configured to use TLS connections. If you need different socket settings e.g. different path or permissions please take a look at the parameters shown with --help and adjust your startup configurations. These configurations are distribution and package specific. Most of the time systemd service files are used.
Thanks for the fast reply!.
I’m using this one https://github.com/Secure-Compliance-Solutions-LLC/GVM-Docker
and i have tried either dockerized and not(with some script adjusting).
From my understanding since i’m a newbie i cant use osp protocol to initiate scans through python-scripting yet, therefore i need to use gvmd.sock to use the GMP protocol
Through the docker container i can detect gvmd.sock , but at /tmp only ospd.sock exists && and its not in /var/run either.
OSP is the protocol used between gvmd and osp scanner especially ospd-openvas. gvmd stores, manages and evaluates the data provided by the scanners via OSP. GMP is the protocol used as our public API and also between gsad and gvmd. So this depends on your use case.