romil
11/24/2022, 9:49 AMhttps://github.com/authzed/authzed-java/blob/main/examples/v1/App.java
If I am running Spicedb locally via docker container, what should be the value of
private static final String target = "localhost:50051";
as I keep getting below exception upon running the sample
ov 24, 2022 3:16:26 PM v1.App writeSchema
INFO: Writing schema...
Nov 24, 2022 3:16:26 PM v1.App writeSchema
WARNING: RPC failed: UNAVAILABLE: io exception
Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0]
Nov 24, 2022 3:16:26 PM v1.App readSchema
INFO: Reading schema...
Nov 24, 2022 3:16:26 PM v1.App readSchema
WARNING: RPC failed: UNAVAILABLE: io exception
Logs upon starting the container
{"level":"info","upstream":":50051","time":"2022-11-24T09:45:57Z","message":"starting REST gateway"}
{"level":"info","addr":":8443","service":"http","insecure":true,"time":"2022-11-24T09:45:57Z","message":"http server started serving"}
{"level":"info","addr":":9090","service":"metrics","insecure":true,"time":"2022-11-24T09:45:57Z","message":"http server started serving"}
{"level":"info","addr":":8080","service":"dashboard","insecure":true,"time":"2022-11-24T09:45:57Z","message":"http server started serving"}
{"level":"info","interval":"1h0m0s","endpoint":"https://telemetry.authzed.com","next":"3m28s","time":"2022-11-24T09:45:57Z","message":"telemetry reporter scheduled"}
Code Snippet which throws exception
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder
.forTarget(target)
//.useTransportSecurity()
.build();
try {
App client = new App(channel);