All Apps and Add-ons

urlopen error [Errno -97] Address family not supported by protocol when sending an alert to Xmatters?

splunk_karishma
Engager

Hello,

While sending alerts to xmatters encountering the below errors:


ERROR [xmatters.alert_action.main] [xmatters] [<module>] [62654] <urlopen error [Errno 97] Address family not supported by protocol> Traceback (most recent call last): File "/splunk/lib/python3.7/urllib/request.py", line 1350, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/splunk/lib/python3.7/http/client.py", line 1281, in request self._send_request(method, url, body, headers, encode_chunked) File "/splunk/lib/python3.7/http/client.py", line 1327, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/splunk/lib/python3.7/http/client.py", line 1276, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/splunk/lib/python3.7/http/client.py", line 1036, in _send_output self.send(msg) File "/splunk/lib/python3.7/http/client.py", line 976, in send self.connect() File "/splunk/lib/python3.7/http/client.py", line 1443, in connect super().connect() File "/splunk/lib/python3.7/http/client.py", line 948, in connect (self.host,self.port), self.timeout, self.source_address) File "/splunk/lib/python3.7/socket.py", line 728, in create_connection raise err File "/splunk/lib/python3.7/socket.py", line 711, in create_connection sock = socket(af, socktype, proto) File "/splunk/lib/python3.7/socket.py", line 151, in __init__ _socket.socket.__init__(self, family, type, proto, fileno) OSError: [Errno 97] Address family not supported by protocol During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/splunk/etc/apps/xmatters_alert_action/bin/xmatters.py", line 147, in <module> REQUEST_ID = XM_ALERT.execute() File "/splunk/etc/apps/xmatters_alert_action/bin/xmatters.py", line 119, in execute request_id = xm_client.send_event(self.endpoint_url, xm_event) File "/splunk/etc/apps/xmatters_alert_action/lib/xmatters_sdk/xm_client.py", line 62, in send_event force_https=True File "/splunk/etc/apps/xmatters_alert_action/lib/common_utils/rest.py", line 159, in post return self._send_request(req, headers) File "/splunk/etc/apps/xmatters_alert_action/lib/common_utils/rest.py", line 99, in _send_request res = urlopen(req) File "/splunk/lib/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/splunk/lib/python3.7/urllib/request.py", line 525, in open response = self._open(req, data) File "/splunk/lib/python3.7/urllib/request.py", line 543, in _open '_open', req) File "/splunk/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/splunk/lib/python3.7/urllib/request.py", line 1393, in https_open context=self._context, check_hostname=self._check_hostname) File "/splunk/lib/python3.7/urllib/request.py", line 1352, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [Errno 97] Address family not supported by protocol>

Any clue where i might be wrong?

Labels (1)
Tags (1)
0 Karma
1 Solution

splunk_karishma
Engager

Setting up the proxy in splunk-launch.conf resolved this:
HTTP_PROXY = http://<server>:<port>
HTTPS_PROXY = http://<server>:<port>

View solution in original post

0 Karma

splunk_karishma
Engager

Setting up the proxy in splunk-launch.conf resolved this:
HTTP_PROXY = http://<server>:<port>
HTTPS_PROXY = http://<server>:<port>

0 Karma
Get Updates on the Splunk Community!

Announcing the Expansion of the Splunk Academic Alliance Program

The Splunk Community is more than just an online forum — it’s a network of passionate users, administrators, ...

Learn Splunk Insider Insights, Do More With Gen AI, & Find 20+ New Use Cases You Can ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Buttercup Games: Further Dashboarding Techniques (Part 7)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...