All Apps and Add-ons

getting timeout errors after install dropbox v2 app,getting read timeout errors with v2 app

greggernigant
Explorer

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

madcitygeek
Explorer

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.

fredchase
Explorer

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.

sohalloran_gemi
Engager

This fixed it for me, thanks!

0 Karma

greggernigant
Explorer

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.

0 Karma

bkillian
New Member

I had mine set to main then decided to create a separate index but still no luck.

0 Karma

sohalloran_gemi
Engager

I'm also having this problem. Setting index=main didn't solve it

0 Karma

bkillian
New Member

Any update on this? I am having the same problem.

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...