robertdebock / ansible-role-openvas

Install and configure openvas on your system.
https://robertdebock.nl/
Apache License 2.0
7 stars 2 forks source link

robertdebock.openvas failed on check setup openvas task (Ubuntu 18.04.3 LTS) #4

Closed konstantin-schura closed 4 years ago

konstantin-schura commented 4 years ago

Ansible failed to install openvas on Ubuntu 18.04.3 LTS openvas-scanner.service failed to start because cant connect to redis (cant find socket)

To Reproduce Localhost installation

Expected behavior A clear and concise description of what you expected to happen.

Error

RUNNING HANDLER [robertdebock.openvas : check setup openvas]**** changed: [localhost] => changed=true ansible_job_id: '48393706743.29626' attempts: 100 cmd: openvas-setup delta: '0:16:36.663118' end: '2019-10-15 08:31:24.380272' finished: 1 rc: 0 start: '2019-10-15 08:14:47.717154' stdout: |- ERROR: Directory for keys (/var/lib/openvas/private/CA) not found! ERROR: Directory for certificates (/var/lib/openvas/CA) not found! ERROR: CA key not found in /var/lib/openvas/private/CA/cakey.pem ERROR: CA certificate not found in /var/lib/openvas/CA/cacert.pem ERROR: CA certificate failed verification, see /tmp/tmp.UkeqmSKGRa/openvas-manage-certs.log for details. Aborting. ERROR: Your OpenVAS certificate infrastructure did NOT pass validation. See messages above for details. Generated private key in /tmp/tmp.7Nm3J1Pu7u/cakey.pem. Generated self signed certificate in /tmp/tmp.7Nm3J1Pu7u/cacert.pem. Installed private key to /var/lib/openvas/private/CA/cakey.pem. Installed certificate to /var/lib/openvas/CA/cacert.pem. Generated private key in /tmp/tmp.7Nm3J1Pu7u/serverkey.pem. Generated certificate request in /tmp/tmp.7Nm3J1Pu7u/serverrequest.pem. . . . sent 514 bytes received 62,187,460 bytes 24,875,189.60 bytes/sec total size is 62,170,682 speedup is 1.00 /usr/sbin/openvasmd (openvassd:31510): lib kb_redis-[1;35mCRITICAL[0m : [34m08:29:37.592[0m: get_redis_ctx: redis connection error: No such file or directory (openvassd:31510): lib kb_redis-[1;35mCRITICAL[0m : [34m08:29:37.592[0m: redis_new: cannot access redis at '/tmp/redis.sock' (openvassd:31510): lib kb_redis-[1;35mCRITICAL[0m **: [34m08:29:37.593[0m: get_redis_ctx: redis connection error: No such file or directory openvassd: no process found Job for openvas-scanner.service failed because a timeout was exceeded. See "systemctl status openvas-scanner.service" and "journalctl -xe" for details. User created with password '15c372dd-ce6a-4eb9-9530-c75c1fdb903d'.

TASK [robertdebock.openvas : enable openvas] . . . failed: [localhost] (item=gsad) => changed=false ansible_loop_var: item item: gsad msg: 'Could not find the requested service gsad: host'

Environment

Additional context After investigation found that redis listen on /var/run/redis/redis.sock.

robertdebock commented 4 years ago

Thanks for your feedback, I'll try to reproduce and write a fix for it.

prinzpi commented 4 years ago

Hi, are there any updates regarding this issue?

I'm facing the same issue:

TASK [robertdebock.openvas : enable openvas] ***************************************************************
ok: [xxx.xxx.xxx.xx] => (item=openvas-manager)
ok: [xxx.xxx.xxx.xx] => (item=openvas-scanner)
failed: [xxx.xxx.xxx.xx] (item=gsad) => {"ansible_loop_var": "item", "changed": false, "item": "gsad", "msg": "Could not find the requested service gsad: host"}

Both system: 18.04.4 LTS Ansible Version: 2.9.6 - Python 3.6.9

robertdebock commented 4 years ago

I'm going to take a look again, thanks for the input.

robertdebock commented 4 years ago

Hi,

I've decided I can't maintain this role anymore, the installation differs very much per distribution, configuration differs, it's basically unstable, CI keeps on failing for new reasons.

Sorry. I'll update this repository.