Getting gvm-cli error

Hi Team,

I am getting this error while running the below command
: gvm-cli socket --socketpath /run/gvmd.sock --config gmp.conf --xml “<get_targets/>”

error: gvm-cli: error: unrecognized arguments --config

although --config is there as an option in help section

gvm-cli -h
usage: gvm-cli [-h] [-c [CONFIG]]
[–log [{DEBUG,INFO,WARNING,ERROR,CRITICAL}]]
[–timeout TIMEOUT] [–gmp-username GMP_USERNAME]
[–gmp-password GMP_PASSWORD] [-V] [–protocol {GMP,OSP}]
CONNECTION_TYPE …

optional arguments:
-h, --help show this help message and exit
-c [CONFIG], --config [CONFIG]
Configuration file path (default: ~/.config/gvm-
tools.conf)
–log [{DEBUG,INFO,WARNING,ERROR,CRITICAL}]
Activate logging (default level: None)
–timeout TIMEOUT Response timeout in seconds or -1 to wait
indefinitely (default: 60)
–gmp-username GMP_USERNAME
Username for GMP service (default: ‘’)
–gmp-password GMP_PASSWORD
Password for GMP service (default: ‘’)
-V, --version Show version information and exit
–protocol {GMP,OSP} Service protocol to use (default: GMP)

connections:
valid connection types

CONNECTION_TYPE Connection type to use
ssh Use SSH to connect to service
tls Use TLS secured connection to connect to service
socket Use UNIX Domain socket to connect to service

then why I am getting this error, please help me to resolve this

my config file is
cat gmp.conf
[main]

increased timeout to 5 minutes

#timeout = 60

[gmp]

username=admin

password=seceon

[unixsocket]

socketpath=/run/gvmd.sock

Hi,

you need to specify --config before socket.

3 Likes

Thank you , it worked !