greenbone / notus-scanner

Notus is a vulnerability scanner for creating results from local security checks
https://greenbone.github.io/docs/
GNU Affero General Public License v3.0
41 stars 12 forks source link

notus-scanner 22.4.4 #454

Closed Bepsi closed 1 year ago

Bepsi commented 1 year ago

Hi all, I am using docker container greenbone/notus-scanner:22.4.4. This container was created with this docker-compose:

notus-scanner: image: greenbone/notus-scanner:22.4.4 hostname: notus-scanner environment: NOTUS_SCANNER_MQTT_BROKER_ADDRESS: mqtt-broker NOTUS_SCANNER_PRODUCTS_DIRECTORY: /var/lib/notus/products NOTUS_SCANNER_LOG_LEVEL: DEBUG stdin_open: true volumes:

When I start this container, i have this message:

notus-scanner: DEBUG: (notus.scanner.utils) Finishing daemon process notus-scanner: INFO: (notus.scanner.daemon) Starting notus-scanner version 22.4.4. notus-scanner: DEBUG: (notus.scanner.loader.gpg_sha_verifier) Using /etc/openvas/gnupg as GnuPG home. notus-scanner: DEBUG: (gnupg) stderr reader: <Thread(Thread-1, initial daemon)> notus-scanner: DEBUG: (gnupg) stdout reader: <Thread(Thread-2, initial daemon)> Traceback (most recent call last): File "/usr/local/bin/notus-scanner", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/dist-packages/notus/scanner/daemon.py", line 154, in main run_daemon( File "/usr/local/lib/python3.9/dist-packages/notus/scanner/daemon.py", line 116, in run_daemon daemon = MQTTDaemon(client) File "/usr/local/lib/python3.9/dist-packages/notus/scanner/messaging/mqtt.py", line 160, in init self._client.connect() File "/usr/local/lib/python3.9/dist-packages/notus/scanner/messaging/mqtt.py", line 66, in connect return super().connect( File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 1044, in reconnect sock = self._create_socket_connection() File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source) File "/usr/lib/python3.9/socket.py", line 822, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -5] No address associated with hostname notus-scanner: DEBUG: (notus.scanner.utils) Finishing daemon process

Can you help me ?

Thank you.

nichtsfrei commented 1 year ago

It seems that the mqtt-server is not reachable.

How did you start the mqtt-broker and notus-server?

Bepsi commented 1 year ago

docker-compose for mqtt-broker:

mqtt-broker: image: greenbone/mqtt-broker stdin_open: true tty: true ports:

Container up.

mosquitto version 2.0.11 starting Config loaded from /etc/mosquitto.conf. Opening ipv6 listen socket on port 1883. New connection from 10.42.84.79:36173 on port 1883. New client connected from 10.42.84.79:36173 as ospd (p5, c1, k60). mosquitto version 2.0.11 starting Config loaded from /etc/mosquitto.conf. Opening ipv4 listen socket on port 1883. Opening ipv6 listen socket on port 1883. mosquitto version 2.0.11 running New connection from 10.42.84.79:45305 on port 1883. New client connected from 10.42.84.79:45305 as ospd (p5, c1, k60).

I used this link https://greenbone.github.io/docs/latest/22.4/container/index.html (no notus-server ... only notus-data and notus-scanner).

Bepsi commented 1 year ago

Find ! Start command is:
"notus-scanner", "-f", "--pid-file=/notus/notus-scanner.pid", "-b", "broker"

-b MQTT_BROKER_ADDRESS, --mqtt-broker-address MQTT_BROKER_ADDRESS : Hostname or IP address of the MQTT broker. (default: mqtt-broker)

broker was not define.