Getting the following errors after installing v2 of the dropbox app
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.dropboxapi.com', port=443): Read timed out. (read timeout=5.0)",)': /2/team_log/get_events/continue
Confirmed connectivity and that my token is working by running a query to https://api.dropboxapi.com/2/team_log/get_events, receiving a response as expected (size is 1.15MB)
Is there a way to increase/remove the timeout value?
Thanks,getting the following error after installing v2 of the app:
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.dropboxapi.com', port=443): Read timed out. (read timeout=5.0)",)': /2/team_log/get_events/continue
Running the query with postman returns results as expected (1.15 MB response)
I have checked all the obvious things, firewall shows allowed traffic to dropbox api
Is there any way to increase the timeout value?
Thanks
This issue in our install was a timeout waiting for data to return from the Dropbox API. While confirming that the API worked via Postman, I noted that it took a significant amount of time for the call to return. Checking the DEBUG logs from the TA showed the following ConnectionError.
ConnectionError: HTTPSConnectionPool(host='api.dropboxapi.com', port=443): Max retries exceeded with url: /2/team_log/get_events (Caused by ReadTimeoutError("HTTPSConnectionPool(host='api.dropboxapi.com', port=443): Read timed out. (read timeout=5.0)",))
I found that this 5.0 was the default, as defined in /splunk-app-dropbox/bin/splunk_app_dropbox/modinput_wrapper/base_modinput.py
:param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a (connect timeout, read timeout) tuple. Default to (10.0, 5.0).
I found the call inside input_module_dropbox.py
and updated it from timeout=None to timeout=30.0, as below. This gave the call 30 seconds complete, which seemed to be enough.
# call Dropbox API response = helper.send_http_request(url, 'POST', parameters=None, payload=payload, headers=headers, cookies=None, verify=True, cert=None, **timeout=None,** use_proxy=False, )
Updated to:
# call Dropbox API response = helper.send_http_request(url, 'POST', parameters=None, payload=payload, headers=headers, cookies=None, verify=True, cert=None, **timeout=30.0,** use_proxy=False, )
I also note that the category
parameter in the input configuration screen has a typo (spelled as categroy), which prevents that value from being passed to the API call. The result is that the API call will run without a filter, returning events in all categories. This may impact the time taken by the call, which may put it over the 5.0 second default.
I tried changing the index and it did not help. I think the problem is more likely a start time error. Edit the input and try a more recent "Start Time" field value. I kept getting the same errors when I configured a start time 75 days ago. I changed the start time to 15 days ago and still got the same errors. I then changed the start value to 4 hours previously and events finally started coming in; no more errors.
This fixed it for me, thanks!
Turns out, for me at least, the problem was that I had set a specific index, misleading error message to say the least. After deleting everything and leaving the index as 'main' - data started flowing...hope that helps.
I had mine set to main then decided to create a separate index but still no luck.
I'm also having this problem. Setting index=main didn't solve it
Any update on this? I am having the same problem.