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/12/23 05:42:47 UTC

[GitHub] [apisix] jujiale opened a new issue, #8560: help request: proxy-mirror plugin seems doesnot work

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

   ### Description
   
   hello:
   when I test proxy-mirror plugin. I find that it doesnot work. the following is my config:
   `
   
       {
       "uri": "/test*",
       "name": "test_proxy_mirror",
       "methods": [
         "GET",
         "POST",
         "PUT",
         "DELETE",
         "PATCH",
         "HEAD",
         "OPTIONS",
         "CONNECT",
         "TRACE"
       ],
       "plugins": {
         "proxy-mirror": {
           "disable": false,
           "host": "http://172.xx.xx.11:9001",
           "sample_ratio": 1
         }
       },
       "upstream": {
         "nodes": [
           {
             "host": "172.xx.xx.12",
             "port": 9001,
             "weight": 1
           }
         ],
         "timeout": {
           "connect": 6,
           "send": 6,
           "read": 6
         },
         "type": "roundrobin",
         "scheme": "http",
         "pass_host": "pass",
         "keepalive_pool": {
           "idle_timeout": 60,
           "requests": 1000,
           "size": 320
         }
       },
       "status": 1
      }
   
   
   
   `
   
   the upstream 172.xx.xx.11 and proxy-mirror host 172.xx.xx.12 are openresty. the openresty config is very simple as following:
   `
   
       server {
             listen 9001;
             location /test {
                 default_type text/html;
                 proxy_http_version  1.1;
                 content_by_lua '
                     ngx.say("Hello, World I am 11/12!")
                 ';
             }
         }
   
   `
   
   I use tcpdump to find that when I invoke "curl http://apisix_host:port/test",the request proxy to upstream success. but no mirror request send to mirror host, tcpdump prove it. and there is not have error log record
   
   so I want to know what situation may result in such problem. 
   
   by the way. our apisix is running on apisix-base-1.21.4.1.1-0.el7.x86_64.
   
   ### Environment
   
   - APISIX version (run `apisix version`):2.12.0
   - Operating system (run `uname -a`):Linux 3.10.0-1160.36.2.el7.x86_64
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):apisix-base-1.21.4.1.1-0.el7.x86_64
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):3.5.0
   - APISIX Dashboard version, if relevant:
   - 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


[GitHub] [apisix] jujiale commented on issue #8560: help request: proxy-mirror plugin seems doesnot work

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

   I find in nginx.conf,generate the following config
   `
   
       location = /proxy_mirror {
                   internal;
       
       
                   proxy_http_version 1.1;
                   proxy_set_header Host $upstream_host;
                   proxy_pass $upstream_mirror_host$request_uri;
               }
   
   `
   
   I don't know how or when , or use what kind of way. the location will take effect.


-- 
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] jujiale closed issue #8560: help request: proxy-mirror plugin seems doesnot work

Posted by GitBox <gi...@apache.org>.
jujiale closed issue #8560: help request: proxy-mirror plugin seems doesnot work
URL: https://github.com/apache/apisix/issues/8560


-- 
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] jujiale commented on issue #8560: help request: proxy-mirror plugin seems doesnot work

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

   resolved. because we use 2.11.0 earlier. we update to 2.12.0 according CHANGELOG.md. but in 2.12.0 changelog.md. there is not have [http://github.com/apache/apisix/pull/5943](url), when I merged the change. it works well.


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