Hey, guys. Started spicedb on docker.
# spicedb
l
Hey, guys. Started spicedb on docker. Ports exposed, but when trying to connect to python or go I get an error with ssl certificate. Python logs:
Copy code
grpc_status:14, grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv4:192.168.74.26:50051: Ssl handshake failed: SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER
Golang logs:``` rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake" ```
v
are you starting SpiceDB with TLS? If you are not, you need to configure your clients to use insecure transport. For example, in go it looks like:
Copy code
grpcutil.WithInsecureBearerToken(presharedSecureKey),
 grpc.WithTransportCredentials(insecure.NewCredentials()))
l
Ty a lot. Worked on go. Could you help to make it work with python too?
v
sure, you want to use the insecure credentials channel:
Copy code
client = Client(
    "localhost:50051",
    insecure_bearer_token_credentials("presharedkey"),
)
Please note that if you are connecting without TLS to anything that is not localhost, there is a limitation in python gRPC, we are tracking the issue here: https://github.com/authzed/authzed-py/issues/89
l
Ty, this discussion can be closed. I understand what the problem was and how to proceed, I hope the problem with the address as only localhost will be solved
75 Views