01-05-2016 11:41
01-05-2016 11:41
I'm using Splunk which is using python rest api libraries to connect to the Fitbit API. Splunk calls the API at regular intervals (1 minte) to grab a new data set.
The first time I call the API after creating a connection, it pulls back data succesfully. All subsequent calls after the first are failing. Here are the only message i'm seeing from python. Could my connection be getting reset some how?
2:08:52.228 PM 01-05-2016 14:08:52.228 -0500 INFO ExecProcessor - New scheduled exec process: python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"
2:08:53.271 PM 01-05-2016 14:08:53.271 -0500 INFO ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" Starting new HTTPS connection (1): api.fitbit.com
2:09:53.814 PM 01-05-2016 14:09:53.814 -0500 INFO ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" Resetting dropped connection: api.fitbit.com
2:09:54.825 PM 01-05-2016 14:09:54.825 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" Exception performing request:
2:11:24.373 PM 01-05-2016 14:11:24.373 -0500 INFO ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" Resetting dropped connection: api.fitbit.com
2:11:25.381 PM 01-05-2016 14:11:25.381 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" HTTP Request error: 401 Client Error: Unauthorized
2:12:54.912 PM 01-05-2016 14:12:54.912 -0500 INFO ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" Resetting dropped connection: api.fitbit.com
2:12:56.423 PM 01-05-2016 14:12:56.423 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" HTTP Request error: 401 Client Error: Unauthorized
2:14:26.686 PM 01-05-2016 14:14:26.686 -0500 INFO ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" Resetting dropped connection: api.fitbit.com
2:14:29.500 PM 01-05-2016 14:14:29.500 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" HTTP Request error: 401 Client Error: Unauthorized
2:15:59.479 PM 01-05-2016 14:15:59.479 -0500 INFO ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" Resetting dropped connection: api.fitbit.com
2:16:00.490 PM 01-05-2016 14:16:00.490 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" HTTP Request error: 401 Client Error: Unauthorized
2:17:30.527 PM 01-05-2016 14:17:30.527 -0500 INFO ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" Resetting dropped connection: api.fitbit.com
2:17:31.036 PM 01-05-2016 14:17:31.036 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" HTTP Request error: 401 Client Error: Unauthorized
2:19:01.060 PM 01-05-2016 14:19:01.060 -0500 INFO ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" Resetting dropped connection: api.fitbit.com
2:19:02.071 PM 01-05-2016 14:19:02.071 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\rest_ta\bin\rest.py"" HTTP Request error: 401 Client Error: Unauthorized
01-05-2016 12:53
01-05-2016 12:53
It's unlikely we're dropping connections. Are you holding the connection open for longer than a minute?
Could this be related to the 401 errors you're receiving? Could you look at the body of the 401 responses to get the exact error message?
01-05-2016 13:41
01-05-2016 13:41
Unfortunately I don't have access to the responses body. I'm trying to contact the developer of the app to get some more detailed information. It's very possible that the connection is staying open and not being closed. I will post here what I get back from them