Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openvas_lib.VulnscanServerError: Error while connecting to the server: [Errno 111] Connection refused #27

Open
majidmc2 opened this issue Jan 15, 2019 · 1 comment

Comments

@majidmc2
Copy link

Hello
I installed Openvas9 and use Python2.7. This is my code:

from openvas_lib import VulnscanManager, VulnscanException
try:
    scanner = VulnscanManager("127.0.0.1", "admin", "admin")
except VulnscanException as e:
    print(e)

When I run my code, I get this Error:

Error while connecting to the server: [Errno 111] Connection refused

What is the problem?

@blackat87
Copy link
Contributor

Hi @majidmc2 , checks if the openvas-manager service is listening on host 127.0.0.1 and port 9390 with the command
netstat -ant | grep 9390

If not, you can set the host and port to listen to with the command
openvasmd -p listen_port -a listen_address

or modify the conf file openvas-manager in /etc/default and restart the service.

Then, if you changes the OMP port or/and the OMP host, you can pass the new port or/and the new host on VulnscanManager object like

scanner = VulnscanManager(host="omp_listen_address", port=omp_listen_port, user="username", password="password")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants