tutuV opened a new issue, #7176:
URL: https://github.com/apache/apisix/issues/7176
### Description
route:
{
"uri": "/persion.Greeter/SayHello",
"name": "test-grpc",
"methods": [
"POST"
],
"upstream_id": "410253309387997998",
"status": 1
}
upstream:
{
"nodes": [
{
"host": "192.168.1.21",
"port": 8080,
"weight": 1
}
],
"timeout": {
"connect": 6,
"send": 6,
"read": 6
},
"type": "roundrobin",
"scheme": "grpc",
"pass_host": "pass",
"name": "test-grpc",
"keepalive_pool": {
"idle_timeout": 60,
"requests": 1000,
"size": 320
}
}
grpc client code:
const (
//192.168.70.44 apisix gateway
address = "192.168.70.44:80/persion.Greeter/SayHello"
// grpc server address. access this address and the grpc client will
work normally
// address = "192.168.1.21:8080"
)
func main() {
conn, err := grpc.Dial(address, grpc.WithInsecure())
if err != nil {
log.Fatal("did not connect: ", err)
}
defer conn.Close()
c := pb.NewGreeterClient(conn)
r, err := c.SayHello(context.Background(), &pb.HelloRequest{Name:
"xiaoming"})
if err != nil {
log.Fatal("could not greet: %v", err)
}
fmt.Println(r)
}
grpc client error:
could not greet: %vrpc error: code = Unavailable desc = connection error:
desc = "transport: Error while dialing dial tcp: lookup
tcp/80/persion.Greeter/SayHello: getaddrinfow: The specified class was not
found."
I don't know the cause of the problem
### Environment
- apisix 2.13.1
- k8s 1.21.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]