Debugging grpc over unix domain socket

36 views
Skip to first unread message

Ganesh Sangle

unread,
Jan 4, 2021, 8:33:22 PM1/4/21
to grpc.io
hello,
i am trying to debug using grpc over unix domain socket on linux.
the server (in c++) starts and creates the sockets and the Wait API call is waiting.
the client (in go) also connects fine:

conn, err := grpc.Dial("unix:///....)
if err != nil {
    /// ...
}

err is nil so i assume connection works fine. fwiw i use "nc" to connect to it and it works fine as well.

however, when making an rpc call, it returns "all SubConns are in TransientFailure".

how do i debug this ? any pointers will help. thanks.

Ganesh Sangle

unread,
Jan 5, 2021, 1:32:38 PM1/5/21
to grpc.io
the issue seems to be resolved by using grpc with "grpc.WithDialer" option (which then used a net.DialTimeout call to create the connection) in grpc.Dial call
Also, i needed to add an extra "/" to the absolute path, so a path line "unix:///var/run/xyz" would now become "unix:////var/run/xyz". 
Reply all
Reply to author
Forward
0 new messages