apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
14.48k stars 2.52k forks source link

bug: plugin ext-plugin-post-resp not invoked #8637

Closed sashokbg closed 9 months ago

sashokbg commented 1 year ago

Current Behavior

When a route has the ext-plugin-post-resp plugin configured, then the plugin is not called

Expected Behavior

The ext-plugin-post-resp should be called on my route

Error Logs

apache-apisix | 2023/01/09 11:53:52 [warn] 943#943: 182326 [lua] plugin.lua:202: load(): new plugins: {"consumer-restriction":true,"gzip":true,"limit-count":true,"redirect":true,"traffic-split":true,"ext-plugin-post-resp":true,"echo":true,"ip-restriction":true,"referer-restriction":true,"request-id":true,"http-logger":true,"grpc-web":true,"ext-plugin-pre-req":true,"azure-functions":true,"skywalking-logger":true,"kafka-proxy":true,"udp-logger":true,"key-auth":true,"inspect":true,"forward-auth":true,"proxy-mirror":true,"prometheus":true,"basic-auth":true,"wolf-rbac":true,"kafka-logger":true,"openfunction":true,"request-validation":true,"authz-casbin":true,"real-ip":true,"server-info":true,"zipkin":true,"ua-restriction":true,"loggly":true,"serverless-pre-function":true,"aws-lambda":true,"hmac-auth":true,"ext-plugin-post-req":true,"opa":true,"file-logger":true,"serverless-post-function":true,"proxy-control":true,"syslog":true,"openwhisk":true,"limit-req":true,"response-rewrite":true,"splunk-hec-logging":true,"tencent-cloud-cls":true,"clickhouse-logger":true,"fault-injection":true,"proxy-cache":true,"authz-casdoor":true,"datadog":true,"cors":true,"sls-logger":true,"cas-auth":true,"csrf":true,"jwt-auth":true,"api-breaker":true,"elasticsearch-logger":true,"public-api":true,"workflow":true,"proxy-rewrite":true,"limit-conn":true,"ldap-auth":true,"openid-connect":true,"grpc-transcode":true,"rocketmq-logger":true,"client-control":true,"authz-keycloak":true,"example-plugin":true,"uri-blocker":true,"google-cloud-logging":true,"ai":true,"tcp-logger":true,"mocking":true}, context: init_worker_by_lua

Steps to Reproduce

Using the following config:

upstreams:
  -
    id: 1
    nodes:
      "127.0.0.1:8080": 1
    type: roundrobin

routes:
  -
    uri: /configuration/message-types
    upstream_id: 1
    plugins:
      ext-plugin-post-resp:
        conf:
          - name: "ProxymFilter"
            value: "{\"enable\":\"feature\"}"}

When testing with curl Then my plugin is not invoked.

Replacing ext-plugin-post-resp with ext-plugin-pre-req and everytihing works fine.

Environment

monkeyDluffy6017 commented 1 year ago

The ext-plugin-post-resp plugin will be executed after the request gets a response from the upstream. Could you check if there is a response from the upstream?

sashokbg commented 1 year ago

Hello @monkeyDluffy6017 yes I even receive the answer back to the curl client (check image bellow).

It looks like the plugin is just bypassed

image

soulbird commented 1 year ago
  1. Is there any other information in the error log? For example, is there a log with error level?
  2. Have you correctly configured the path of ext-runner? Show the value of ext-plugin configuration item in some yaml configuration: https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L406
github-actions[bot] commented 9 months ago

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.

github-actions[bot] commented 9 months ago

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.