I have deployed my spiceDB instance with docker li...
# spicedb
y
I have deployed my spiceDB instance with docker like this
Copy code
# encoding: utf-8
services:
  spicedb:
    image: authzed/spicedb:latest-debug
    container_name: snake-spicedb
    command: serve --grpc-preshared-key "myrandomkey" --log-level trace --dashboard-addr :8081
    container_name: spicedb
    ports:
      - 50051:50051
      - 9090:9090
      - 8081:8081 # 8080被占了
    network_mode: bridge
, but I am currently encountering the following situation: If the caller and the gRPC service are both deployed on the same machine (in Docker containers), and the caller accesses the UDS address
Copy code
localhost:50051
via gRPC, there is no problem. code is like this:
Copy code
client = Client(
    "localhost:50051",
    insecure_bearer_token_credentials("myrandomkey"),
)
If the gRPC service is deployed remotely (in a Docker container) and the endpoint address is set to ip:50051, I get this error: “failed to connect to all addresses; last error: UNKNOWN: ipv4::50051: Endpoint is neither UDS or TCP loopback address. {grpc_status:14, created_time:“2023-06-12T20:48:14.956224718+08:00”}”. in this case code is like this:
Copy code
client = Client(
    "<myIP>:50051",
    insecure_bearer_token_credentials("myrandomkey"),
)
BTW, the spicedb container has no logs output when i invoke gRPC API with authzed-py i am sure it's not caused by network issue or firewall strategy, i wonder if i'am wrong using the authzed-py's
Copy code
Client
class
2 Views