greenbone / gvmd

Greenbone Vulnerability Manager - The database backend for the Greenbone Community Edition
GNU Affero General Public License v3.0
290 stars 157 forks source link

Http Alerts don't work #2089

Open x4team opened 1 year ago

x4team commented 1 year ago

Used a clean install of these components with docker compose version_gvmd: 22.9.0 version_gvm_libs: 22.4.2 version_pg_gvm: 22.6.1 version_dsa: 22.7.1 version_ospd: 22.6 version_notus_scanner: 22.6

image

With any HTTP alert test, even on a get request https://www.google.com the "Internal error" error occurs. There is nothing in the gvmd logs at this moment.

The same situation is with gvmd versions 22.8, 22.7, 22.7. If I use version 22.4, then everything is fine, alerts go away and work

HassbergKliniken commented 11 months ago

I have the latest version.

Mails outside of Docker using

echo "test" | mail -s "test" address@domain.com 

goes through without any problems. In the log i see:

greenbone-community-edition-gvmd-1                 | event alert:MESSAGE:2023-12-12 14h26.48 CET:1729: The alert Bericht was triggered (Event: Task status changed to 'Done', Condition: Always)
greenbone-community-edition-gvmd-1                 | md manage:WARNING:2023-12-12 14h26.49 CET:1729: email: system failed with ret 19968, 78, read FROM TO < /tmp/gvmd-args-xg3RBU; /usr/sbin/sendmail -f "$FROM" "$TO" < /tmp/gvmd-content-BOCZKU > /dev/null 2>&1
Anurag9090 commented 6 months ago

Hi, any update on this issue? I am facing same issue when using the HTTP GET Alert method.

"Testing the alert api_alert_done failed. Internal error."

But no error in the gvmd.log: http-get-alert-test

event alert:MESSAGE:2024-05-27 08h46.56 UTC:838: The alert api_alert_done was triggered (Event: Task status changed to 'Done', Condition: Always)

Then, I changed the Debug level in gvmd_log.conf to level=128 and got the following detail from the logs:

md manage: DEBUG:2024-05-26 20h42.43 UTC:3015: HTTP_GET https://perfectly.working.get.api?value=$n md manage: DEBUG:2024-05-26 20h42.43 UTC:3015: http_get: Spawning in /tmp/: /usr/bin/wget -O - https://perfectly.working.get.api?value=$n md manage: DEBUG:2024-05-26 20h42.43 UTC:3015: http_get: wget failed: 1223392512 (WIF 1, WEX 125) md manage: DEBUG:2024-05-26 20h42.43 UTC:3015: http_get: stdout: (null) md manage: DEBUG:2024-05-26 20h42.43 UTC:3015: http_get: stderr: (null)

My gvm version: Greenbone Vulnerability Manager 23.6.2

I am using immauss/openvas docker image to run the OpenVAS.

I also made sure the same "/usr/bin/wget -O - https://perfectly.working.get.api?value=$n" cmd runs fine in the docker container.

I have an automation dependent on this HTTP GET API method, Any hep and suggestion would be greatly appreciated. Thanks.