Getting 401 Client Error in Cloudant after a while

9/17/2018

I am developing a service in IBM Cloud, and I'm using Cloudant Service.

I'm using the IBM Cloudant Client Library for python to access my database. After pushing my service to a kubernetes cluster, my service is able to be used. It's possible to call the service with no issues for a while. But after one day or something like that, when I call my service, I get 401 Client Error from my cloudant database and I don't know why. The problem is solved if I delete and create the pods/service again in kubernetes.

Could someone help me?

Thanks.

Error:

401 Client Error: Unauthorized unauthorized one of _writer, _creator is required for this request for url: "myurl"

I'm calling my service in this way:

cloudant_client = Cloudant("540...-bluemix",
                       "4276dd...",
                       url="https://540...-bluemix.cloudant.com")
-- Felipe Eduardo
cloudant
ibm-cloud
kubernetes
nosql

0 Answers