-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
all SubConns are in TransientFailure #490
Comments
Nvm, I haven't started GRPC server |
Could you give some more information? How did you start it? |
For anybody else getting this error - I have seen it on the client if the server panics and crashes. So, for a couple seconds, the server is down until kubernetes replaces the pod. It can be confusing to find the problem because you need the logs from the crashed container. |
I have this issue on Mac OS X, any idea? |
This is just indicative of the client not being able to connect to the server. Check your setup. |
Ok so I did check my setup and, I found this link on internet that, even if I have others problems now, helped me to get rid of this error : https://github.com/mycodesmells/golang-examples/blob/master/grpc/cmd/server/main.go The thing I just don't get with this example is that, the guy initialize the grpc server, half in main, half in a go routine, then he serv the http part of its server and, the only difference I see is that he initialize a part of it before the go routine instead of initializing everything inside of this go routine (I hope I am clear, english isn't my first language sorry) |
@johanbrandhorst I'm getting the same error now. I did no code change with the setup. Could you please help? |
@vaikzs I'm not sure what else I can add, this is an error returned from the gRPC client when it cannot connect to the server. Please ensure your gateway can connect to the gRPC backend. |
@vaikzs Just as a side question, do you have any |
@Emixam23 @johanbrandhorst Thanks for the responses. I guess my grpc server was not running for some reason. It seems to be fine now. |
The README example just start Http server, not start rpc server func run() error {
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
defer cancel()
// Register gRPC server endpoint
// Note: Make sure the gRPC server is running properly and accessible
mux := runtime.NewServeMux()
opts := []grpc.DialOption{grpc.WithInsecure()}
err := gw.RegisterPushServiceHandlerFromEndpoint(ctx, mux, "localhost:8888", opts)
if err != nil {
return err
}
go func() {
listener, err := net.Listen("tcp", conf.Config.Listen)
if err != nil {
log.Fatalln("listen failed:", err)
}
rpcServer := grpc.NewServer()
gw.RegisterPushServiceServer(rpcServer, &service.PushServer{})
if err := rpcServer.Serve(listener); err != nil {
log.Fatalln("serve error:", err)
}
}()
// Start HTTP server (and proxy calls to gRPC server endpoint)
return http.ListenAndServe(":9999", mux)
} |
Hi guys,
I tried to run this repo
examples
folder but didn't work as expected.Step to reproduce:
cd $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/examples
go build && ./examples
orgo run main.go
I also got the same result with other endpoints POST
http://localhost:8080/v1/example/echo/myid
.Any idea why I keep getting
{"error":"all SubConns are in TransientFailure","code":14}%
? How to make it work?Thank you.
The text was updated successfully, but these errors were encountered: