apache / apache/apisix

help request: plugins question that cant use grpc-transcode with ext-plugin-post-resp

Open
#10,787 10 comments 0 reactions 0 assignees View on GitHub
doc good first issue
Dominant language
Lua
Stars
17.1k
Forks
2.9k
Avg merge
3d 16h
Merged PRs (30d)
63

Description

### Description

I need use two plugins: grpc-transcode and ext-plugin-post-resp.
There is no problem with these two plugins when used alone, but some problems occur when they are used together.
When i use grpc-transcode and ext-plugin-post-resp together,
the api response is :
```
{
"code": 5,
"message": "Not Found",
"details": []
}
```
and some errors in apisix:
```
access_by_lua(nginx.conf:292):2: in main chunk xxx
/apisix/apisix/init.lua:730: in function 'http_access_phase'
[C]: in function 'handle_upstream'
coroutine 0:
stack traceback:
[error] 57#57: *872933 lua entry thread aborted: runtime error: /apisix/apisix/init.lua:730: attempt to call ngx.exec after sending out response headers
```
both plugins do their job correctly, upstream grpc service receive the request and returns right and ext-plugin-post-resp also print out logs after grpc service returns.
I don't know how I should troubleshoot the problem next.

### Environment

- APISIX version : 3.6.0
- Operating system : Ubuntu 16.04.1 LTS
- OpenResty / Nginx version : nginx/1.20.1
- etcd version, if relevant : 3.5.0

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the interaction between grpc-transcode and ext-plugin-post-resp using the reported APISIX 3.6.0 environment, then inspect the failure at apisix/init.lua:730 and the ngx.exec after sending response headers error. Compare each plugin's behavior alone and together; done means the incompatibility or configuration cause is identified and a verified resolution is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, lua
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.