All Apps and Add-ons

Why does Qualys Technology Add-on (TA) for Splunk stop fetching data after 503-errors?

rschutt
Explorer

Apparently the Qualys Technology Add-on (TA) for Splunk stops fetching data after 503-errors. First it will try 3 times and after the third 503 (Service Unavailable) it starts redirecting and to unclear where. The redirected requests are tried for an infinite number of times. The only way out is to kill the python-script. At the next fetch-interval it will start automatically and continues collecting data without problems. This happens for all three input-types (host_detection, was_findings, policy_posture).

Any idea how to solve this? Thanks!

Here is the logging for host_detection only:

TA-QualysCloudPlatform: 2018-08-23 22:00:14 PID=16129 [MainThread] INFO: TA-QualysCloudPlatform [host_detection] -
Making request: https://qualysapi.qualys.eu/msp/about.php with params={}
TA-QualysCloudPlatform: 2018-08-23 22:00:15 PID=16129 [MainThread] ERROR: TA-QualysCloudPlatform [host_detection] -
Unsuccessful while calling API [503 : Service Unavailable]. Retrying: https://qualysapi.qualys.eu/msp/about.php
with params={}. Retry count: 1
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/TA-QualysCloudPlatform/bin/qualysModule/lib/api/Client.py", line 253, in get
    request = urllib2.urlopen(req, timeout=timeout)  # timeout set to bail in case of timeouts
  File "/opt/splunk/lib/python2.7/urllib2.py", line 154, in urlopen
    response = meth(req, response)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable

TA-QualysCloudPlatform: 2018-08-23 22:05:15 PID=16129 [MainThread] ERROR: TA-QualysCloudPlatform [host_detection] -
Unsuccessful while calling API [503 : Service Unavailable]. Retrying: https://qualysapi.qualys.eu/msp/about.php
with params={}. Retry count: 2
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/TA-QualysCloudPlatform/bin/qualysModule/lib/api/Client.py", line 253, in get
    request = urllib2.urlopen(req, timeout=timeout)  # timeout set to bail in case of timeouts
  File "/opt/splunk/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable


TA-QualysCloudPlatform: 2018-08-23 22:10:15 PID=16129 [MainThread] ERROR: TA-QualysCloudPlatform [host_detection] -
Unsuccessful while calling API [307 : Temporary Redirect]. Retrying: https://qualysapi.qualys.eu/msp/about.php with
params={}. Retry count: 3
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/TA-QualysCloudPlatform/bin/qualysModule/lib/api/Client.py", line 253, in get
    request = urllib2.urlopen(req, timeout=timeout)  # timeout set to bail in case of timeouts
  File "/opt/splunk/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 469, in error
    result = self._call_chain(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 635, in http_error_302
    new = self.redirect_request(req, fp, code, msg, headers, newurl)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 596, in redirect_request
    raise HTTPError(req.get_full_url(), code, msg, headers, fp)
HTTPError: HTTP Error 307: Temporary Redirect

TA-QualysCloudPlatform: 2018-08-23 22:15:15 PID=16129 [MainThread] ERROR: TA-QualysCloudPlatform [host_detection] -
Unsuccessful while calling API [307 : Temporary Redirect]. Retrying: https://qualysapi.qualys.eu/msp/about.php with
params={}. Retry count: 4
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/TA-QualysCloudPlatform/bin/qualysModule/lib/api/Client.py", line 253, in get
    request = urllib2.urlopen(req, timeout=timeout)  # timeout set to bail in case of timeouts
  File "/opt/splunk/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 469, in error
    result = self._call_chain(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 635, in http_error_302
    new = self.redirect_request(req, fp, code, msg, headers, newurl)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 596, in redirect_request
    raise HTTPError(req.get_full_url(), code, msg, headers, fp)
HTTPError: HTTP Error 307: Temporary Redirect


TA-QualysCloudPlatform: 2018-08-27 13:58:33 PID=16129 [MainThread] ERROR: TA-QualysCloudPlatform [host_detection] -
Unsuccessful while calling API [307 : Temporary Redirect]. Retrying: https://qualysapi.qualys.eu/msp/about.php with
params={}. Retry count: 1056
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/TA-QualysCloudPlatform/bin/qualysModule/lib/api/Client.py", line 253, in get
    request = urllib2.urlopen(req, timeout=timeout)  # timeout set to bail in case of timeouts
  File "/opt/splunk/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 469, in error
    result = self._call_chain(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 635, in http_error_302
    new = self.redirect_request(req, fp, code, msg, headers, newurl)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 596, in redirect_request
    raise HTTPError(req.get_full_url(), code, msg, headers, fp)
HTTPError: HTTP Error 307: Temporary Redirect
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...