Error sending notification webhook: 503 in Ansible AWX - ansible-awx

In AWX 21.0.0, when I set a notification Webhook to a target API and I test it, I got the following message:
Error sending notification webhook: 503
If, from the AWX server I try to call the same external URL with curl, I got a response without issue.
After some logs search, we found these:
Blockquote
2022-12-19 08:42:27,917 ERROR [b38e3ee645b5457b8e726338581efb81] awx.main.notifications.webhook_backend Error sending notification webhook: 503
2022-12-19 08:42:27,919 ERROR [b38e3ee645b5457b8e726338581efb81] awx.main.tasks.system Send Notification Failed Error sending notification webhook: 503
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/system.py", line 293, in send_notifications
sent = notification.notification_template.send(notification.subject, notification.body)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/models/notifications.py", line 185, in send
return backend_obj.send_messages([notification_obj])
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/notifications/webhook_backend.py", line 81, in send_messages
raise Exception(smart_str(_("Error sending notification webhook: {}").format(r.status_code)))
Exception: Error sending notification webhook: 503
It doesn't help us much, but at least, we got some logs.

It appears that it was because a proxy configured in AWX. Excluding the target from using that proxy make it work.

Related

send notification from Prometheus alertmanager to Google Chat room

we recently started using Google Chat in our organisation therefor we need to send alerts from Prometheus-Alertmanager to Google Chat room. below is my alertmanager config for Google chat
receiver:
- name: 'gchat-receiver'
webhook_configs:
- url: "https://chat.googleapis.com/v1/spaces/AAAArcv5Snw/messages?key=KEY&token=TOKEN"
send_resolved: false
and when we implementing above config we are getting below error in our alertmanager logs:
level=error ts=2021-02-23T06:23:43.931Z caller=dispatch.go:309 component=dispatcher msg="Notify for alerts failed" num_alerts=2 err="gchat-receiver/webhook[0]: notify retry canceled due to unrecoverable error after 1 attempts: unexpected status code 400: https://chat.googleapis.com/v1/spaces/AAAArcv5Snw/messages?key=KEY&token=TOKEN"
level=error ts=2021-02-23T06:23:43.971Z caller=dispatch.go:309 component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="gchat-receiver/webhook[0]: notify retry canceled due to unrecoverable error after 1 attempts: unexpected status code 400: https://chat.googleapis.com/v1/spaces/AAAArcv5Snw/messages?key=KEY&token=TOKEN"
level=error ts=2021-02-23T06:23:43.976Z caller=dispatch.go:309 component=dispatcher msg="Notify for alerts failed" num_alerts=21 err="gchat-receiver/webhook[0]: notify retry canceled due to unrecoverable error after 1 attempts: unexpected status code 400: https://chat.googleapis.com/v1/spaces/AAAArcv5Snw/messages?key=KEY&token=TOKEN"
level=error ts=2021-02-23T06:23:43.994Z caller=dispatch.go:309 component=dispatcher msg="Notify for alerts failed" num_alerts=2 err="gchat-receiver/webhook[0]: notify retry canceled due to unrecoverable error after 1 attempts: unexpected status code 400: https://chat.googleapis.com/v1/spaces/AAAArcv5Snw/messages?key=KEY&token=TOKEN"
any help or guidance on this would be highly appreciated
That is because Google Chat expects a specific JSON payload schema to be posted to that webhook address and the default Alertmanager payload doesn't match it, so you get HTTP 400 response: bad request.
You might need to put a custom application in between to transform the JSON to Google Chat acceptable format. There are already some repos in Github that match that general criteria as well. (e.g calert)

Get error to call HandshakeException:unable to get local issuer certificate(handshake.cc:363))

I get this error when i call api with get and post Method using http or dio.
How can i resolve this error.
This is my api calling code and below is console showing error

WSO2 REST request box not working

I get the following error when I send a REST request with a request_box payload to WSO2 using WSO2 Tryit tool:
<axis2ns539:DataServiceFault xmlns:axis2ns539="http://ws.wso2.org/dataservice">
<axis2ns539:ds_code>UNKNOWN_ERROR</axis2ns539:ds_code>
This is what is echoed on the console:
[2017-12-08 20:01:22,939] [] ERROR - ServerWorker Error processing POST request for : /services/TestICM.HTTPEndpoint/request_box
org.apache.axis2.AxisFault: DS Fault Message: Input Message and request_box Axis Operation didn't match.
I tried also with Postman and got the same error.
Thank you very much

Why can't I wget from this address?

I'm trying to wget from the "Download Now" link on this website but it returns the following error:
$wget https://www.spigotmc.org/resources/supervanish.1331/download?version=46330
--2015-09-27 19:13:53-- https://www.spigotmc.org/resources/supervanish.1331/download?version=46330
Resolving www.spigotmc.org (www.spigotmc.org)... 198.41.204.94, 198.41.205.94, 2400:cb00:2048:1::c629:cd5e, ...
Connecting to www.spigotmc.org (www.spigotmc.org)|198.41.204.94|:443... connected.
HTTP request sent, awaiting response... 503 Service Temporarily Unavailable
2015-09-27 19:13:53 ERROR 503: Service Temporarily Unavailable.
Here is the page:
https://www.spigotmc.org/resources/supervanish.1331
Here is the URL:
https://www.spigotmc.org/resources/supervanish.1331/download?version=46330
You cannot wget because the server returns an error.
If you want to retrieve an error page, perhaps this page will help you.

Uknown Error after updating PayPalCoreSDK

I update the PayPalCoreSDK to the most recent version today because I was getting OAuth Errors. After I updated everything I continue to get an error but it is an undescriptive error. Below is the error that gets logged:
ERROR PayPal.Exception.PayPalException [(null)] Exception in HttpConnection Execute: The request was aborted: The request was canceled.
PayPal.Exception.PayPalException: Exception in HttpConnection Execute: The request was aborted: The request was canceled. ---> System.Net.WebException: The request was aborted: The request was canceled. ---> System.IO.IOException: Cannot close stream until all bytes are written.
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean aborting)
--- End of inner exception stack trace ---
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean aborting)
at System.Net.ConnectStream.System.Net.ICloseEx.CloseEx(CloseExState closeState)
at System.Net.ConnectStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at PayPal.HttpConnection.Execute(String payLoad, HttpWebRequest httpRequest)
The request is returning a bearer response. Anyone have any thoughts on how i can fix this?? I am currently using the Sandbox information.
Turns out there was a bug in the paypal SDK for something else i was trying to do with addresses array. PayPal finally emailed me about my ticket months after I reported the issue.