The Python sample script fails
skulltech opened this issue · comments
Sumit Ghosh commented
I deployed cloud-tasks-emulator
using Docker by running the following command
$ docker run ghcr.io/aertje/cloud-tasks-emulator:latest
Then, running the Python sample code from the README fails with the following error message
Traceback (most recent call last):
File "/home/sumit/Coding/cloud-tasks/venv/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 73, in error_remapped_callable
return callable_(*args, **kwargs)
File "/home/sumit/Coding/cloud-tasks/venv/lib/python3.8/site-packages/grpc/_channel.py", line 946, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/home/sumit/Coding/cloud-tasks/venv/lib/python3.8/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1619040655.581206892","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":5419,"referenced_errors":[{"created":"@1619040655.581205383","description":"failed to connect to all addresses","file":"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":397,"grpc_status":14}]}"
>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "script.py", line 15, in <module>
client.create_queue(queue={'name': queue_name}, parent=parent)
File "/home/sumit/Coding/cloud-tasks/venv/lib/python3.8/site-packages/google/cloud/tasks_v2/services/cloud_tasks/client.py", line 634, in create_queue
response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
File "/home/sumit/Coding/cloud-tasks/venv/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py", line 145, in __call__
return wrapped_func(*args, **kwargs)
File "/home/sumit/Coding/cloud-tasks/venv/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 75, in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)
File "<string>", line 3, in raise_from
google.api_core.exceptions.ServiceUnavailable: 503 failed to connect to all addresses
Sumit Ghosh commented
I forgot to expose the port, very impatient and careless for me to create this issue. I'll close it.