You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Baoyuantop (via GitHub)" <gi...@apache.org> on 2023/02/27 08:01:04 UTC

[GitHub] [apisix] Baoyuantop opened a new issue, #8952: bug: failed to find proto by id in grpc-transcode plugin

Baoyuantop opened a new issue, #8952:
URL: https://github.com/apache/apisix/issues/8952

   ### Current Behavior
   
   When I was troubleshooting the issue https://github.com/apache/apisix-dashboard/issues/2662, I found that the `proto_id` field of the `grpc-transcode` plugin is of type `string/integer`. but the strange thing is that when configured as string, everything is fine, and when configured as integer, APISIX shows the following error log:
   
   ```
   2023/02/27 07:47:13 [error] 51#51: *377378 [lua] grpc-transcode.lua:146: phase_func(): proto load error: failed to find proto by id: 1, client: 172.19.0.1, server: _, request: "GET /grpctest HTTP/1.1", host: "127.0.0.1:9080"
   ```
   
   ### Expected Behavior
   
   The configuration should work correctly regardless of whether string or integer types are used. Otherwise, the documentation needs to be updated.
   
   ### Error Logs
   
   ```
   2023/02/27 07:47:13 [error] 51#51: *377378 [lua] grpc-transcode.lua:146: phase_func(): proto load error: failed to find proto by id: 1, client: 172.19.0.1, server: _, request: "GET /grpctest HTTP/1.1", host: "127.0.0.1:9080"
   ```
   
   ### Steps to Reproduce
   
   Follow the steps in https://apisix.apache.org/docs/apisix/plugins/grpc-transcode/#enabling-the-plugin
   1. Create proto resource
   2. Create Route with
   ```
   curl http://127.0.0.1:9180/apisix/admin/routes/111 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/grpctest",
       "plugins": {
           "grpc-transcode": {
               "proto_id": 1,
               "service": "helloworld.Greeter",
               "method": "SayHello"
           }
       },
       "upstream": {
           "scheme": "grpc",
           "type": "roundrobin",
           "nodes": {
               "127.0.0.1:50051": 1
           }
       }
   }'
   ```
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.1.0
   - Operating system (run `uname -a`): Linux cedc51dc68a5 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant: 3.0.0
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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


Re: [I] bug: failed to find proto by id in grpc-transcode plugin [apisix]

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #8952:
URL: https://github.com/apache/apisix/issues/8952#issuecomment-1870835106

   Is this issue still active?
   
   There's another piece of doc for reference now: https://docs.api7.ai/apisix/how-to-guide/transformation/transcode-http-to-grpc


-- 
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 #8952: bug: failed to find proto by id in grpc-transcode plugin

Posted by "tokers (via GitHub)" <gi...@apache.org>.
tokers commented on issue #8952:
URL: https://github.com/apache/apisix/issues/8952#issuecomment-1447436565

   @Baoyuantop I don't think if you pass `1` in the /apisix/admin/protos` endpoint, APISIX will treat it as an integer. So you need to use `"1"` in the Route.


-- 
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 #8952: bug: failed to find proto by id in grpc-transcode plugin

Posted by "tokers (via GitHub)" <gi...@apache.org>.
tokers commented on issue #8952:
URL: https://github.com/apache/apisix/issues/8952#issuecomment-1445965357

   How did you create the proto object? You just specify the ID directly?


-- 
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


Re: [I] bug: failed to find proto by id in grpc-transcode plugin [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8952: bug: failed to find proto by id in grpc-transcode plugin
URL: https://github.com/apache/apisix/issues/8952


-- 
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] Baoyuantop commented on issue #8952: bug: failed to find proto by id in grpc-transcode plugin

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #8952:
URL: https://github.com/apache/apisix/issues/8952#issuecomment-1446028906

   follow https://apisix.apache.org/docs/apisix/plugins/grpc-transcode/#enabling-the-plugin
   
   ```
   curl http://127.0.0.1:9180/apisix/admin/protos/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "content" : "syntax = \"proto3\";
       package helloworld;
       service Greeter {
           rpc SayHello (HelloRequest) returns (HelloReply) {}
       }
       message HelloRequest {
           string name = 1;
       }
       message HelloReply {
           string message = 1;
       }"
   }'
   ```


-- 
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


Re: [I] bug: failed to find proto by id in grpc-transcode plugin [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8952:
URL: https://github.com/apache/apisix/issues/8952#issuecomment-2541060185

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
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


Re: [I] bug: failed to find proto by id in grpc-transcode plugin [apisix]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #8952:
URL: https://github.com/apache/apisix/issues/8952#issuecomment-1871653413

   Thank you, I will use the latest document to verify again.


-- 
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


Re: [I] bug: failed to find proto by id in grpc-transcode plugin [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8952:
URL: https://github.com/apache/apisix/issues/8952#issuecomment-2564286229

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
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