Latest version on kali fails to start

Good morning!

Updated kali today and found GVM dead afterwards.

└─# gvm-check-setup
gvm-check-setup 23.11.0
Test completeness and readiness of GVM-23.11.0
Step 1: Checking OpenVAS (Scanner)…
OK: OpenVAS Scanner is present in version 22.7.9.
OK: Notus Scanner is present in version 22.6.2.
OK: Server CA Certificate is present as /var/lib/gvm/CA/servercert.pem.
Checking permissions of /var/lib/openvas/gnupg/*
OK: _gvm owns all files in /var/lib/openvas/gnupg
OK: redis-server is present.
OK: scanner (db_address setting) is configured properly using the redis-server socket: /var/run/redis-openvas/redis-server.sock
OK: the mqtt_server_uri is defined in /etc/openvas/openvas.conf
OK: _gvm owns all files in /var/lib/openvas/plugins
OK: NVT collection in /var/lib/openvas/plugins contains 90175 NVTs.
OK: The notus directory /var/lib/notus/products contains 456 NVTs.
Checking that the obsolete redis database has been removed
Could not connect to Redis at /var/run/redis-openvas/redis-server.sock: No such file or directory
OK: No old Redis DB
Starting ospd-openvas service
Job for ospd-openvas.service failed because the service did not take the steps required by its unit configuration.
See “systemctl status ospd-openvas.service” and “journalctl -xeu ospd-openvas.service” for details.
Waiting for ospd-openvas service
ERROR: ospd-openvas service did not start.
Please check journalctl -xe

ERROR: Your GVM-23.11.0 installation is not yet complete!

Please follow the instructions marked with FIX above and run this
script again.

journalctl -xeu ospd-openvas.service

░░ The job identifier is 1770 and the job result is failed.
Apr 19 08:29:20 kali systemd[1]: ospd-openvas.service: Scheduled restart job, restart counter is at 1.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ Automatic restarting of the unit ospd-openvas.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Apr 19 08:29:20 kali systemd[1]: Starting ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)…
░░ Subject: A start job for unit ospd-openvas.service has begun execution
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ A start job for unit ospd-openvas.service has begun execution.
░░
░░ The job identifier is 1981.
Apr 19 08:29:21 kali ospd-openvas[2419]: Traceback (most recent call last):
Apr 19 08:29:21 kali ospd-openvas[2419]: File “/usr/bin/ospd-openvas”, line 8, in
Apr 19 08:29:21 kali ospd-openvas[2419]: sys.exit(main())
Apr 19 08:29:21 kali ospd-openvas[2419]: ^^^^^^
Apr 19 08:29:21 kali ospd-openvas[2419]: File “/usr/lib/python3/dist-packages/ospd_openvas/daemon.py”, line 1245, in main
Apr 19 08:29:21 kali ospd-openvas[2419]: daemon_main(‘OSPD - openvas’, OSPDopenvas, NotusParser())
Apr 19 08:29:21 kali ospd-openvas[2419]: File “/usr/lib/python3/dist-packages/ospd/main.py”, line 152, in main
Apr 19 08:29:21 kali ospd-openvas[2419]: daemon.init(server)
Apr 19 08:29:21 kali ospd-openvas[2419]: File “/usr/lib/python3/dist-packages/ospd_openvas/daemon.py”, line 501, in init
Apr 19 08:29:21 kali ospd-openvas[2419]: client = MQTTClient(
Apr 19 08:29:21 kali ospd-openvas[2419]: ^^^^^^^^^^^
Apr 19 08:29:21 kali ospd-openvas[2419]: File “/usr/lib/python3/dist-packages/ospd_openvas/messaging/mqtt.py”, line 39, in init
Apr 19 08:29:21 kali ospd-openvas[2419]: super().init(client_id=client_id, protocol=mqtt.MQTTv5)
Apr 19 08:29:21 kali ospd-openvas[2419]: TypeError: Client.init() missing 1 required positional argument: ‘callback_api_version’
Apr 19 08:29:21 kali ospd-openvas[2419]: Exception ignored in atexit callback: <function exit_cleanup at 0xffff84f10f40>
Apr 19 08:29:21 kali ospd-openvas[2419]: Traceback (most recent call last):
Apr 19 08:29:21 kali ospd-openvas[2419]: File “/usr/lib/python3/dist-packages/ospd/main.py”, line 74, in exit_cleanup
Apr 19 08:29:21 kali ospd-openvas[2419]: sys.exit()
Apr 19 08:29:21 kali ospd-openvas[2419]: SystemExit:
Apr 19 08:29:21 kali ospd-openvas[2419]: Exception ignored in: <function Client.del at 0xffff83320cc0>
Apr 19 08:29:21 kali ospd-openvas[2419]: Traceback (most recent call last):
Apr 19 08:29:21 kali ospd-openvas[2419]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 874, in del
Apr 19 08:29:21 kali ospd-openvas[2419]: self._reset_sockets()
Apr 19 08:29:21 kali ospd-openvas[2419]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 1133, in _reset_sockets
Apr 19 08:29:21 kali ospd-openvas[2419]: self._sock_close()
Apr 19 08:29:21 kali ospd-openvas[2419]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 1119, in _sock_close
Apr 19 08:29:21 kali ospd-openvas[2419]: if not self._sock:
Apr 19 08:29:21 kali ospd-openvas[2419]: ^^^^^^^^^^
Apr 19 08:29:21 kali ospd-openvas[2419]: AttributeError: ‘MQTTClient’ object has no attribute ‘_sock’
Apr 19 08:29:21 kali systemd[1]: ospd-openvas.service: Can’t open PID file /run/ospd/ospd-openvas.pid (yet?) after start: No such file or directory
Apr 19 08:30:51 kali systemd[1]: ospd-openvas.service: start operation timed out. Terminating.
Apr 19 08:30:51 kali systemd[1]: ospd-openvas.service: Failed with result ‘timeout’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ The unit ospd-openvas.service has entered the ‘failed’ state with result ‘timeout’.
Apr 19 08:30:51 kali systemd[1]: Failed to start ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas).
░░ Subject: A start job for unit ospd-openvas.service has failed
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ A start job for unit ospd-openvas.service has finished with a failure.
░░
░░ The job identifier is 1981 and the job result is failed.

I completely removed GVM from the box and reinstalled it, no change

2 Likes

Hi, sadly Kali updated the package python3-paho-mqtt to a version greater then 2.0. paho-mqtt 2.0 is currently not supported by notus-scanner. This would require a new release of notus-scanner or for Kali to downgrade the package version of python3-paho-mqtt.

You should report this issue at https://bugs.kali.org

2 Likes

Do you happen to know if other Distros still work. Aka Ubuntu, Fedora, Mint, etc?

I am not aware of any other distribution shipping our software in a current version.

Hello All,
I am trying to install gvm on kali linux machine. I have tried few times with fresh installs and each time I get stuck on “gvm-check-setup” with following error.
“Job for ospd-openvas.service failed because a timeout was exceeded.
See “systemctl status ospd-openvas.service” and “journalctl -xeu ospd-openvas.service” for details.”
Here are the deatils of the commands mentioned in the error.

"journalctl -xe
Apr 21 18:55:45 Kali notus-scanner[240447]: client = MQTTClient(
Apr 21 18:55:45 Kali notus-scanner[240447]: ^^^^^^^^^^^
Apr 21 18:55:45 Kali notus-scanner[240447]: File “/usr/lib/python3/dist-packages/notus/scanner/messaging/mqtt.py”, line 35, in init
Apr 21 18:55:45 Kali notus-scanner[240447]: super().init(client_id=client_id, protocol=mqtt.MQTTv5)
Apr 21 18:55:45 Kali notus-scanner[240447]: TypeError: Client.init() missing 1 required positional argument: ‘callback_api_version’
Apr 21 18:55:45 Kali notus-scanner[240447]: Exception ignored in atexit callback: <function exit_cleanup at 0x7ff85c0bec00>
Apr 21 18:55:45 Kali notus-scanner[240447]: Traceback (most recent call last):
Apr 21 18:55:45 Kali notus-scanner[240447]: File “/usr/lib/python3/dist-packages/notus/scanner/utils.py”, line 104, in exit_cleanup
Apr 21 18:55:45 Kali notus-scanner[240447]: sys.exit()
Apr 21 18:55:45 Kali notus-scanner[240447]: SystemExit:
Apr 21 18:55:45 Kali notus-scanner[240447]: Exception ignored in: <function Client.del at 0x7ff85c0ae340>
Apr 21 18:55:45 Kali notus-scanner[240447]: Traceback (most recent call last):
Apr 21 18:55:45 Kali notus-scanner[240447]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 874, in del
Apr 21 18:55:45 Kali notus-scanner[240447]: self._reset_sockets()
Apr 21 18:55:45 Kali notus-scanner[240447]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 1133, in _reset_sockets
Apr 21 18:55:45 Kali notus-scanner[240447]: self._sock_close()
Apr 21 18:55:45 Kali notus-scanner[240447]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 1119, in _sock_close
Apr 21 18:55:45 Kali notus-scanner[240447]: if not self._sock:
Apr 21 18:55:45 Kali notus-scanner[240447]: ^^^^^^^^^^
Apr 21 18:55:45 Kali notus-scanner[240447]: AttributeError: ‘MQTTClient’ object has no attribute ‘_sock’
Apr 21 18:55:45 Kali systemd[1]: notus-scanner.service: Can’t open PID file /run/notus-scanner/notus-scanner.pid (yet?) after start: No such file or direc>
Apr 21 18:56:44 Kali systemd[1]: ospd-openvas.service: start operation timed out. Terminating.
Apr 21 18:56:44 Kali systemd[1]: ospd-openvas.service: Failed with result ‘timeout’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ The unit ospd-openvas.service has entered the ‘failed’ state with result ‘timeout’.
Apr 21 18:56:44 Kali systemd[1]: Failed to start ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas).
░░ Subject: A start job for unit ospd-openvas.service has failed
░░ Defined-By: systemd
░░ Support:
░░
░░ A start job for unit ospd-openvas.service has finished with a failure.
░░
░░ The job identifier is 30945 and the job result is failed.
Apr 21 18:56:44 Kali systemd[1]: ospd-openvas.service: Consumed 1.374s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ The unit ospd-openvas.service completed and consumed the indicated resources.
lines 1818-1859/1859 (END)
"
Can anyone help please?
Regards

Hello All,
Just upgraded Kali and GVM won’t start with this error. Anyone else seen this?

Thanks,

Martin.

Apr 21 22:27:02 kali ospd-openvas[3497]: Traceback (most recent call last):
Apr 21 22:27:02 kali ospd-openvas[3497]: File “/usr/bin/ospd-openvas”, line 8, in
Apr 21 22:27:02 kali ospd-openvas[3497]: sys.exit(main())
Apr 21 22:27:02 kali ospd-openvas[3497]: ^^^^^^
Apr 21 22:27:02 kali ospd-openvas[3497]: File “/usr/lib/python3/dist-packages/ospd_openvas/daemon.py”, line 1245, in main
Apr 21 22:27:02 kali ospd-openvas[3497]: daemon_main(‘OSPD - openvas’, OSPDopenvas, NotusParser())
Apr 21 22:27:02 kali ospd-openvas[3497]: File “/usr/lib/python3/dist-packages/ospd/main.py”, line 152, in main
Apr 21 22:27:02 kali ospd-openvas[3497]: daemon.init(server)
Apr 21 22:27:02 kali ospd-openvas[3497]: File “/usr/lib/python3/dist-packages/ospd_openvas/daemon.py”, line 501, in init
Apr 21 22:27:02 kali ospd-openvas[3497]: client = MQTTClient(
Apr 21 22:27:02 kali ospd-openvas[3497]: ^^^^^^^^^^^
Apr 21 22:27:02 kali ospd-openvas[3497]: File “/usr/lib/python3/dist-packages/ospd_openvas/messaging/mqtt.py”, line 39, i>
Apr 21 22:27:02 kali ospd-openvas[3497]: super().init(client_id=client_id, protocol=mqtt.MQTTv5)
Apr 21 22:27:02 kali ospd-openvas[3497]: TypeError: Client.init() missing 1 required positional argument: 'callback_api>
Apr 21 22:27:02 kali ospd-openvas[3497]: Exception ignored in atexit callback: <function exit_cleanup at 0x7f41cececf40>
Apr 21 22:27:02 kali ospd-openvas[3497]: Traceback (most recent call last):
Apr 21 22:27:02 kali ospd-openvas[3497]: File “/usr/lib/python3/dist-packages/ospd/main.py”, line 74, in exit_cleanup
Apr 21 22:27:02 kali ospd-openvas[3497]: sys.exit()
Apr 21 22:27:02 kali ospd-openvas[3497]: SystemExit:
Apr 21 22:27:02 kali ospd-openvas[3497]: Exception ignored in: <function Client.del at 0x7f41cafbce00>
Apr 21 22:27:02 kali ospd-openvas[3497]: Traceback (most recent call last):
Apr 21 22:27:02 kali ospd-openvas[3497]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 874, in del
Apr 21 22:27:02 kali ospd-openvas[3497]: self._reset_sockets()
Apr 21 22:27:02 kali ospd-openvas[3497]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 1133, in reset>
Apr 21 22:27:02 kali ospd-openvas[3497]: self._sock_close()
Apr 21 22:27:02 kali ospd-openvas[3497]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 1119, in _sock_c>
Apr 21 22:27:02 kali ospd-openvas[3497]: if not self._sock:
Apr 21 22:27:02 kali ospd-openvas[3497]: ^^^^^^^^^^
Apr 21 22:27:02 kali ospd-openvas[3497]: AttributeError: ‘MQTTClient’ object has no attribute ‘_sock’
Apr 21 22:27:02 kali systemd[1]: ospd-openvas.service: Can’t open PID file /run/ospd/ospd-openvas.pid (yet?) after start: N>

Actually think its connected with this after some googling

To avoid confusion, it seems the previous postings have been merged into this topic as they had been duplicates for this one.

There seems to be a Kali Bugreport here now:

https://bugs.kali.org/view.php?id=8729

1 Like

The issues are fixed with the following PRs on our side

We will release new versions of ospd-openvas and notus-scanner today which will support both paho-mqtt version 1 and 2. Afterwards the Kali devs have to pick up, package and ship these upcoming releases.

3 Likes

Hallo, same problem after “apt full-upgrade” on Kali Linux

● ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)
Loaded: loaded (/usr/lib/systemd/system/ospd-openvas.service; bad; preset: disabled)
Active: activating (start) since Mon 2024-04-22 15:09:17 CEST; 1min 14s ago
Docs: man:ospd-openvas(8)
man:openvas(8)
Process: 4997 ExecStart=/usr/bin/ospd-openvas --config /etc/gvm/ospd-openvas.conf --log-config /etc/gvm/ospd-logging.conf (code=exited, status=0/>
Tasks: 0 (limit: 19178)
Memory: 8.0K (peak: 91.3M)
CPU: 1.016s
CGroup: /system.slice/ospd-openvas.service

Apr 22 15:10:18 pentest ospd-openvas[5001]: Traceback (most recent call last):
Apr 22 15:10:18 pentest ospd-openvas[5001]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 874, in del
Apr 22 15:10:18 pentest ospd-openvas[5001]: self._reset_sockets()
Apr 22 15:10:18 pentest ospd-openvas[5001]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 1133, in _reset_sockets
Apr 22 15:10:18 pentest ospd-openvas[5001]: self._sock_close()
Apr 22 15:10:18 pentest ospd-openvas[5001]: File “/usr/lib/python3/dist-packages/paho/mqtt/client.py”, line 1119, in _sock_close
Apr 22 15:10:18 pentest ospd-openvas[5001]: if not self._sock:
Apr 22 15:10:18 pentest ospd-openvas[5001]: ^^^^^^^^^^
Apr 22 15:10:18 pentest ospd-openvas[5001]: AttributeError: ‘MQTTClient’ object has no attribute ‘_sock’
Apr 22 15:10:18 pentest systemd[1]: ospd-openvas.service: Can’t open PID file /run/ospd/ospd-openvas.pid (yet?) after start: No such file or directory

I’m waiting for new updated pkg on Kali.
Many thanx for your info.

I am trying to install gvm on a fresh install of Kali 2024.1

I have run:

sudo apt-install update && sudo apt upgrade -y
sudo apt install gvm
sudo gvm-setup
sudo gvm-check-setup

On the check step of starting ospd-openvas service I get this error:

Job for ospd-openvas.service failed because a timeout was exceeded.
See "systemctl status ospd-openvas.service" and "journalctl -xeu ospd-openvas.service" for details.

Here is the output from ‘systemctl status ospd-openvas.service’ :

Invalid unit name "ospd-openvas.service~" escaped as "ospd-openvas.service\x>
Unit ospd-openvas.service\x7e.service could not be found.

Here is the output from ‘journalctl -xeu ospd-openvas.service’ :

Apr 23 10:51:40 kali ospd-openvas[80853]: AttributeError: 'MQTTClient' object has no attribute '_sock'
Apr 23 10:51:40 kali systemd[1]: ospd-openvas.service: Can't open PID file /run/ospd/ospd-openvas.pid (yet?) after start: No such file or directory

Any advice appreciated

@kapa i’ve moved you message into this topic. Please read this topic for more information about your issue.

1 Like


This is worked with me.
https://bugs.kali.org/view.php?id=8729

1 Like

it works for me. Waiting for the official Kali package, fixed with this patch. thank you very much

1 Like

This WORKED to resolve the issue I was having. Where Step1 of gvm-check-setup I would get an error that states ERROR: ospd-openvas service did not start. The chmod 666 as mentioned in some other posts did not fix it for me.

1 Like

Untill the Kali packages are updated, what works for me:

OpenVAS now works for me again with an updated Kali Linux

@Muhamedkhalidlx That worked for me. Thanks.

1 Like