-
Notifications
You must be signed in to change notification settings - Fork 14
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; Endpoint is neither UDS or TCP loopback address #89
Comments
This is a bug for sure.
I think this behavior was well-intentioned, but there are definitely cases where folks are going to need plaintext outside of localhost: docker compose is an excellent example. |
There's a workaround you can do while we wait for fix:
I've removed extra services information that stays the same but what you essentially do is move SpiceDB ports to |
adding some more context to this thread, it seems like regardless of @jzelinskie 's thread over on the grpc GH page, the experimental code that they reference would not improve the situation here without additional changes to this codebase or spicedb's codebase (though I could have missed a cli arg to spice). Some things I observed while hacking on the problem include,
which, the above, appears to be a consequence of this library requiring a sercure channel; regardless.
so except for the workaround mentioned by @jurecuhalev (which I haven't tried, but I assume works) you're either out-of-luck, or you can try using the HTTP API which (per my understanding) is just a call to spicedb's loopback address and shouldn't be affected by this? |
I think this is also what I'm facing here 👉🏼 https://github.com/orgs/authzed/discussions/1644 |
Any progress on this? I'm testing out spicedb for the first time, trying to make calls from within a k8s cluster, and I'd prefer using this client over the HTTP API if I can help it |
+1 that this is a serious issue for local docker compose setups another workaround is to use did this by adding the following line to an entrypoint script:
|
+1 Also run into this with our local docker compose dev environment |
+1 still happening |
https://gist.github.com/jakedt/100d75048c7ebefdf2fb666de58cda9b has a workaround for the insecure token to a non-localhost address |
I've added an implementation of an |
The |
Apologies, v0.18.0 never made it to pypi. Try v0.18.1. |
from authzed.api.v1 import InsecureClient
from grpc_health.v1.health_pb2_grpc import HealthStub
from grpc_health.v1.health_pb2 import HealthCheckRequest
class SpiceClient(InsecureClient, HealthStub):
def __init__(self, options=None, compression=None):
target = 'my-custom-target'
token = 'my-personal-token'
super().__init__(target, token, options, compression)
def init_stubs(self, channel):
super().init_stubs(channel)
HealthStub.__init__(self, channel)
client = SpiceClient()
check = client.Check(HealthCheckRequest())
print(check) # status: SERVING |
@alexshanabrook tracking in #207 |
Great, thank you! |
Hi, I am receiving this error when connecting to the spicedb client. The code only works when I am using
localhost:50051
as the client address. Any help will be appreciated please 🙂write_schemas.py
- https://github.com/authzed/authzed-py/tree/main/examples/v1docker-compose.yml
Steps to reproduce
write_schemas.py
anddocker-compose.yml
The text was updated successfully, but these errors were encountered: