OSPD[22941] 2024-07-07 07:21:31,688: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.

Hi

Just a new installation on Ubuntu from sources.

I have this error in /var/log/gvm/ospd-openvas.log

OSPD[22941] 2024-07-07 07:21:31,688: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.

1 Like

Can also confirm the issue. Currently I have the same errors in the same logfile.

Clean install of Greenbone Source Edition (as of yesterday), on fresh, updated Debian 12 Bookworm VM.

I noticed this most recent version of Greenbone Source Edition’s instructions removed the installation and configuration of Mosquitto. It no longer calls for sudo apt install -y mosquitto as it had in previous versions.

tail of /var/log/gvm/ospd-openvas.log:

user@GREENBONE:/var/log/gvm$ tail ospd-openvas.log
OSPD[20622] 2024-07-11 12:13:06,224: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.
OSPD[20622] 2024-07-11 12:13:16,226: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.
OSPD[20622] 2024-07-11 12:13:26,227: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.
OSPD[20622] 2024-07-11 12:13:36,229: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.
OSPD[20622] 2024-07-11 12:13:46,231: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.
OSPD[20622] 2024-07-11 12:13:56,232: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.
OSPD[20622] 2024-07-11 12:14:06,234: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.
OSPD[20622] 2024-07-11 12:14:16,235: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.
OSPD[20622] 2024-07-11 12:14:26,237: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.
OSPD[20622] 2024-07-11 12:14:36,239: WARNING: (ospd_openvas.messaging.mqtt) Could not connect to MQTT broker, error was: [Errno 111] Connection refused. Trying again in 10s.

I had a look into this. We have replaced the notus scanner with the new openvasd module in the latest community release, and since mosquitto was a dependency of only notus, it is no longer required. We need to clean up the documentation regarding this and are on it.

Regarding the problem at hand, did you configure the setting for openvasd as outlined in https://greenbone.github.io/docs/latest/22.4/source-build/index.html#openvas-scanner?

printf "openvasd_server = http://127.0.0.1:3000\n" | sudo tee -a /etc/openvas/openvas.conf

1 Like

Yes, I can add that if the openvas process is not configured with the openvasd_server scan option, ospd-openvas will try to connect to MQTT scan_only_params here.

You can check whether it’s configured by executing this from the command line:

openvas -s | grep openvasd_server

if not, then it needs to be added to /etc/openvas/openvas.conf as Martin suggested above.

Thanks for the responses! I did indeed configure openvasd_server using printf, as specified in the guide and in @Martin’s command.

@rippledj, here’s the output of sudo openvas -s | grep openvasd_server

user@GREENBONE:/var/log/gvm$ sudo openvas -s | grep openvasd_server
openvasd_server = http://127.0.0.1:3000

@DarkTech I just built all components from source code on Ubuntu 22.04 yesterday and there were no issues with with the build. I would suggest you to check that you are using the most updated version of the docs, and try to build and install ospd-openvas again and install. Unless I’m missing something, it should not be looking for an MQTT connection if openvasd_server config is set in openvas-scanner. :thinking: