Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS resolution failed for googleads.googleapis.com (constant error) #833

Closed
pySilver opened this issue Feb 5, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working triage New issue; requires attention

Comments

@pySilver
Copy link

pySilver commented Feb 5, 2024

Hello! I was using v13 until it was recently deprecated. Once updated to

google-api-python-client = "^2.116.0"
google-auth = "^2.27.0"
google-auth-oauthlib = "^1.2.0"
google-auth-httplib2 = "^0.2.0"
google-ads = "^23.0.0"

I'm starting to see the following error in my logs every time I try to use the API:

{
error: Error sending result: '"(1, <ExceptionInfo: Retry(Retry(...), ServiceUnavailable('DNS resolution failed for googleads.googleapis.com: C-ares status is not ARES_SUCCESS qtype=A name=googleads.googleapis.com is_balancer=0: DNS query cancelled'), 18)>, None)"'. Reason: ''TypeError("cannot pickle \'_thread.RLock\' object")''., 
exc_info: True, 
exception: <MaybeEncodingError: Error sending result: '"(1, <ExceptionInfo: Retry(Retry(...), ServiceUnavailable('DNS resolution failed for googleads.googleapis.com: C-ares status is not ARES_SUCCESS qtype=A name=googleads.googleapis.com is_balancer=0: DNS query cancelled'), 18)>, None)"'. Reason: ''TypeError("cannot pickle \'_thread.RLock\' object")''.>
}

My code is running under Docker and I can CURL to googleads.googleapis.com from both host and dockerized container at the same time.

Describe the bug:

Steps to Reproduce:

Expected behavior:

Client library version and API version:
Client library version:
Google Ads API version:

Request/Response Logs:

Anything else we should know about your project / environment:

@pySilver pySilver added bug Something isn't working triage New issue; requires attention labels Feb 5, 2024
@BenRKarl BenRKarl self-assigned this Feb 9, 2024
@BenRKarl
Copy link
Contributor

BenRKarl commented Feb 9, 2024

@pySilver When you upgraded to google-ads version 23.0.0, did you also upgrade the version of grpcio you're using? Also is your application doing any multiprocessing? And does this happen if you downgrade back down to the dependencies you were using for v13? Note that you can still hit the v13 endpoints, you'll just receive an API error, which won't occur if this DNS error is happening.

@pySilver
Copy link
Author

Ah, sorry to such a late response. Yes, indeed the issue was resolved by setting env variable: GRPC_DNS_RESOLVER = "native" Thats a pity it is not mentioned anywhere as I don't use grpcio myself directly and it is only the dependency of this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issue; requires attention
Projects
None yet
Development

No branches or pull requests

2 participants