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

failed to connect to all addresses #5

Open
valentinc94 opened this issue Nov 19, 2020 · 0 comments
Open

failed to connect to all addresses #5

valentinc94 opened this issue Nov 19, 2020 · 0 comments

Comments

@valentinc94
Copy link

https://djangogrpcframework.readthedocs.io/en/latest/quickstart.html

I did this tutorial but when executing this:

with grpc.insecure_channel('localhost:50051') as channel:
stub = account_pb2_grpc.UserControllerStub(channel)
for user in stub.List(account_pb2.UserListRequest()):
print(user, end='')

always return

grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses"
debug_error_string = "{"created":"@1605744210.127297754","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":4165,"referenced_errors":[{"created":"@1605744210.127291858","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}]}"

i have a docker for this project

version: '3'

services:
db:
image: postgres
env_file:
- ./backend/.env
ports:
- "6543:5432"
networks:
- webappnetwork
backend:
build: ./backend
volumes:
- ./backend/:/code
env_file:
- ./backend/.env
ports:
- "8000:8000"
command: python manage.py runserver 0.0.0.0:8000
depends_on:
- db
networks:
- webappnetwork
grpc:
build: ./backend
volumes:
- ./backend/:/code
env_file:
- ./backend/.env
ports:
- "50051:50051"
command: python manage.py grpcrunserver --dev
depends_on:
- db
- backend
networks:
- webappnetwork

networks:
webappnetwork:
driver: bridge

volumes:
database-data:
pgadmin-data:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant