You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/01 06:23:56 UTC

[GitHub] [apisix] tutuV opened a new issue, #7176: help request: how to proxy grpc without using plugins?

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: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tao12345666333 commented on issue #7176: help request: how to proxy grpc without using plugins?

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #7176:
URL: https://github.com/apache/apisix/issues/7176#issuecomment-1144343830

   ```
   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 think you should read the error message of your gRPC client carefully.
   
   yes. This is a very basic question. You just need to check the error message more carefully


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #7176: help request: how to proxy grpc without using plugins?

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7176:
URL: https://github.com/apache/apisix/issues/7176#issuecomment-1146527129

   The following is related to APISIX processing of the gRPC protocol
   
   1. gRPC Web Client -> APISIX -> gRPC server
   use `grpc-web` plugin.
   
   2. HTTP(s) -> APISIX -> gRPC server
   use `grpc-transcode` plugin
   
   3. gRPC server -> APISIX -> gRPC server
   use 
   
   ```
       "upstream": {
           "scheme": "grpc",
   ```
   
   Depending on your needs, select the plugin or specify the upstream schema.
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7176: help request: how to proxy grpc without using plugins?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7176:
URL: https://github.com/apache/apisix/issues/7176#issuecomment-1144316980

   I think you should read the error message of your gRPC client carefully.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tutuV closed issue #7176: help request: how to proxy grpc without using plugins?

Posted by GitBox <gi...@apache.org>.
tutuV closed issue #7176: help request: how to proxy grpc without using plugins?
URL: https://github.com/apache/apisix/issues/7176


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tutuV commented on issue #7176: help request: how to proxy grpc without using plugins?

Posted by GitBox <gi...@apache.org>.
tutuV commented on issue #7176:
URL: https://github.com/apache/apisix/issues/7176#issuecomment-1144513647

   @tao12345666333 i used grpc example and made a simple modification. In addition, apisix configuration also refers to the official website. Note that there is no GRPC plugin.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tutuV commented on issue #7176: help request: how to proxy grpc without using plugins?

Posted by GitBox <gi...@apache.org>.
tutuV commented on issue #7176:
URL: https://github.com/apache/apisix/issues/7176#issuecomment-1143348057

   @tokers @tao12345666333 help me. i tried a few times this month, but it didn't work, and the group said it could.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org