Skip to content

ServiceUnavailable: 503 DNS resolution failed for service: firestore.googleapis.com #461

@eugenevk

Description

@eugenevk

I am trying to access the Google's Firestore in my project with Python code (in Jupyter Notebook) and for some reason the Python program never finishes. Also tried to create a document in Firestore but then I get this error:

ServiceUnavailable: 503 DNS resolution failed for service: firestore.googleapis.com

I created a service account in Firestore (ServiceAccount.json contains the settings). This is my code:

import firebase_admin

from firebase_admin import credentials
from firebase_admin import firestore

cred = credentials.Certificate('ServiceAccount.json')
firebase_admin.initialize_app(cred)
db = firestore.client()
db.collection('company').add({'name': 'Test'})

Only the last statement fails. This is also returned:

C:\ProgramData\Anaconda3\lib\site-packages\google\api_core\grpc_helpers.py in error_remapped_callable(*args, **kwargs)
     65         try:
---> 66             return callable_(*args, **kwargs)
     67         except grpc.RpcError as exc:

C:\ProgramData\Anaconda3\lib\site-packages\grpc\_channel.py in __call__(self, request, timeout, metadata, credentials, wait_for_ready, compression)
    945                                       wait_for_ready, compression)
--> 946         return _end_unary_response_blocking(state, call, False, None)
    947 

C:\ProgramData\Anaconda3\lib\site-packages\grpc\_channel.py in _end_unary_response_blocking(state, call, with_call, deadline)
    848     else:
--> 849         raise _InactiveRpcError(state)
    850 

_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.UNAVAILABLE
    details = "DNS resolution failed for service: firestore.googleapis.com"
    debug_error_string = "{"created":"@1632831473.221000000","description":"Resolver transient failure","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":1356,"referenced_errors":[{"created":"@1632831473.221000000","description":"DNS resolution failed for service: firestore.googleapis.com","file":"src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc","file_line":202,"grpc_status":14,"referenced_errors":[{"created":"@1632831473.221000000","description":"OS Error","file":"src/core/lib/iomgr/resolve_address_windows.cc","file_line":93,"os_error":"The specified class was not found.\r\n","syscall":"getaddrinfo","wsa_error":10109}]}]}"
>

The above exception was the direct cause of the following exception:

ServiceUnavailable                        Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\google\api_core\retry.py in retry_target(target, predicate, sleep_generator, deadline, on_error)
    189         try:
--> 190             return target()
    191
...

Please advise. I am out of ideas.

Metadata

Metadata

Assignees

Labels

api: firestoreIssues related to the googleapis/python-firestore API.externalThis issue is blocked on a bug with the actual product.needs more infoThis issue needs more information from the customer to proceed.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions