ilteriseroglu-ty opened a new issue #6563: URL: https://github.com/apache/apisix/issues/6563
### Issue description Almost exactly the same as https://github.com/apache/apisix/issues/6184 I've created a shim plugin for https://github.com/ilteriseroglu-ty/lua-resty-waf which is available on https://github.com/ilteriseroglu-ty/apisix-shim-lua-resty-waf Happens on any request that passes the WAF check (any request not terminating with HTTP 403). I assume this is caused by context modified by the WAF plugin. Any request that is detected by WAF does get terminated properly. ### Environment - apisix version: ``` /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua version 2.12.1 ``` - OS: `Linux apisix-apisix 5.13.19-4-pve #1 SMP PVE 5.13.19-9 (Mon, 07 Feb 2022 11:01:14 +0100) x86_64 x86_64 x86_64 GNU/Linux` - OpenResty / Nginx version: ``` nginx version: openresty/1.19.9.1 built with OpenSSL 1.1.1k 25 Mar 2021 (running with OpenSSL 1.1.1l 24 Aug 2021) TLS SNI support enabled configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl111/include' --add-module=../ngx_devel_kit-0.3.1 --add-module=../echo-nginx-module-0.62 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.32 --add-module=../ngx_lua-0.10.20 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../ngx_stream_lua-0.0.10 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/l ocal/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl111/lib' --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-stream --with-http_ssl_module ``` - etcd version: 3.4.0 - apisix-dashboard version: 2.10.1 - ~~the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):~~ - luarocks version, if the issue is about installation: ``` /usr/local/bin/luarocks 3.8.0 LuaRocks main command-line interface ``` ### Steps to reproduce Assuming APISIX is installed from source, with Openresty being installed from binary distribution: 0. Create a catch-all route: ```yaml uri: /* name: catchall methods: - GET - POST - PUT - DELETE - PATCH - HEAD - OPTIONS - CONNECT - TRACE plugins: proxy-rewrite: host: iye.be upstream: nodes: - host: 172.16.1.7 port: 6868 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 enable_websocket: true status: 1 ``` 2. Install https://github.com/ilteriseroglu-ty/lua-resty-waf with `make && make install` 3. Install https://github.com/ilteriseroglu-ty/apisix-shim-lua-resty-waf as an APISIX plugin 4. Enable `shim-lua-resty-waf` globally 5. Make a curl request ### Actual result ``` ~ ❯ cat $(which debugcurl) #!/usr/bin/env bash curl -vso /dev/null "$@" 2>&1 >/dev/null | grep -vE "^(\*|[{}]|\s+)" ~ ❯ debugcurl 10.18.36.201 > GET / HTTP/1.1 > Host: 10.18.36.201 > User-Agent: curl/7.81.0 > Accept: */* > < HTTP/1.1 500 Internal Server Error < Date: Wed, 09 Mar 2022 12:43:35 GMT < Content-Type: text/html; charset=utf-8 < Transfer-Encoding: chunked < Connection: close < Server: APISIX/2.12.1 < ~ ❯ ``` ### Error log ``` root@apisix-apisix:/usr/local/apisix# (echo "" > logs/error.log) && systemctl restart apisix && tail -f logs/error.log 2022/03/09 12:44:13 [notice] 77758#77758: start worker process 77760 2022/03/09 12:44:13 [notice] 77758#77758: start cache manager process 77761 2022/03/09 12:44:13 [notice] 77758#77758: start cache loader process 77762 2022/03/09 12:44:13 [notice] 77758#77758: start privileged agent process 77763 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] init.lua:100: http_init_worker(): random test in [1, 10000]: 8323, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/admin/ operator: <=, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] radixtree.lua:234: insert_route(): insert route path: /apisix/admin/ dataprt: 1, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/admin/plugins/list operator: =, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/admin/plugins/reload operator: =, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] timers.lua:76: init_worker(): succeed to create background timer, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: sched_setaffinity(): using cpu #0 2022/03/09 12:44:13 [alert] 77760#77760: sched_setaffinity() failed (22: Invalid argument) 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] init.lua:100: http_init_worker(): random test in [1, 10000]: 5653, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/admin/ operator: <=, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] radixtree.lua:234: insert_route(): insert route path: /apisix/admin/ dataprt: 1, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/admin/plugins/list operator: =, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/admin/plugins/reload operator: =, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] timers.lua:76: init_worker(): succeed to create background timer, context: init_worker_by_lua* 2022/03/09 12:44:13 [warn] 77763#77763: *1 [lua] plugin.lua:172: load(): new plugins: {"gzip":true,"request-validation":true,"fault-injection":true,"ip-restriction":true,"zipkin":true,"opa":true,"ua-restriction":true,"request-id":true,"ext-plugin-post-req":true,"limit-req":true,"wolf-rbac":true,"openwhisk":true,"azure-functions":true,"serverless-pre-function":true,"tcp-logger":true,"openid-connect":true,"limit-count":true,"grpc-web":true,"authz-casbin":true,"kafka-logger":true,"echo":true,"datadog":true,"forward-auth":true,"basic-auth":true,"ldap-auth":true,"jwt-auth":true,"ext-plugin-pre-req":true,"skywalking-logger":true,"rocketmq-logger":true,"prometheus":true,"aws-lambda":true,"proxy-control":true,"traffic-split":true,"sls-logger":true,"proxy-rewrite":true,"google-cloud-logging":true,"proxy-cache":true,"syslog":true,"client-control":true,"cors":true,"consumer-restriction":true,"splunk-hec-logging":true,"real-ip":true,"http-logger":true,"udp-logger":true,"wafdemo":true,"grpc-tr anscode":true,"response-rewrite":true,"redirect":true,"api-breaker":true,"serverless-post-function":true,"referer-restriction":true,"example-plugin":true,"key-auth":true,"proxy-mirror":true,"hmac-auth":true,"uri-blocker":true,"server-info":true,"limit-conn":true,"authz-keycloak":true}, context: init_worker_by_lua* 2022/03/09 12:44:13 [warn] 77760#77760: *2 [lua] plugin.lua:172: load(): new plugins: {"gzip":true,"request-validation":true,"fault-injection":true,"ip-restriction":true,"zipkin":true,"opa":true,"ua-restriction":true,"request-id":true,"ext-plugin-post-req":true,"limit-req":true,"wolf-rbac":true,"openwhisk":true,"azure-functions":true,"serverless-pre-function":true,"tcp-logger":true,"openid-connect":true,"limit-count":true,"grpc-web":true,"authz-casbin":true,"kafka-logger":true,"echo":true,"datadog":true,"forward-auth":true,"basic-auth":true,"ldap-auth":true,"jwt-auth":true,"ext-plugin-pre-req":true,"skywalking-logger":true,"rocketmq-logger":true,"prometheus":true,"aws-lambda":true,"proxy-control":true,"traffic-split":true,"sls-logger":true,"proxy-rewrite":true,"google-cloud-logging":true,"proxy-cache":true,"syslog":true,"client-control":true,"cors":true,"consumer-restriction":true,"splunk-hec-logging":true,"real-ip":true,"http-logger":true,"udp-logger":true,"wafdemo":true,"grpc-tr anscode":true,"response-rewrite":true,"redirect":true,"api-breaker":true,"serverless-post-function":true,"referer-restriction":true,"example-plugin":true,"key-auth":true,"proxy-mirror":true,"hmac-auth":true,"uri-blocker":true,"server-info":true,"limit-conn":true,"authz-keycloak":true}, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] config_etcd.lua:659: new(): use loaded configuration /proto, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] config_etcd.lua:659: new(): use loaded configuration /proto, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] server-info.lua:206: init(): server info: {"up_time":0,"last_report_time":-1,"hostname":"apisix-apisix","id":"92de9ecc-6b8d-4499-b574-ca7912b5c254","version":"2.12.1","boot_time":1646829853,"etcd_version":"unknown"}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] server-info.lua:242: init(): timer created to report server info, interval: 60, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] plugin.lua:209: load(): load plugin times: 1, context: init_worker_by_lua* 2022/03/09 12:44:13 [warn] 77763#77763: *1 [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"limit-conn":true,"mqtt-proxy":true}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] plugin.lua:250: load_stream(): stream plugins: [{"schema":{"type":"object","oneOf":[{"required":["whitelist"]},{"required":["blacklist"]}],"$comment":"this is a mark for our injected plugin schema","properties":{"blacklist":{"type":"array","minItems":1,"items":{"anyOf":[{"title":"IPv4","type":"string","format":"ipv4"},{"title":"IPv4\/CIDR","type":"string","pattern":"^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([12]?[0-9]|3[0-2])$"},{"title":"IPv6","type":"string","format":"ipv6"},{"title":"IPv6\/CIDR","type":"string","pattern":"^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?\/[0-9]{1,3}$"}]}},"disable":{"type":"boolean"},"message":{"type":"string","default":"Your IP address is not allowed","minLength":1,"maxLength":1024},"whitelist":{"type":"array","minIt ems":1,"items":{"anyOf":"table: 0x7f2ed77449a0"}}}},"priority":3000,"name":"ip-restriction","check_schema":"function: 0x7f2ec76cd3c8","version":0.1,"restrict":"function: 0x7f2ec76cd580","preread":"function: 0x7f2ec76cd580"},{"schema":{"type":"object","required":["conn","burst","default_conn_delay","key"],"properties":{"burst":{"type":"integer","minimum":0},"key_type":{"type":"string","enum":["var","var_combination"],"default":"var"},"conn":{"type":"integer","exclusiveMinimum":0},"disable":"table: 0x7f2ec7686970","only_use_default_delay":{"type":"boolean","default":false},"key":{"type":"string"},"default_conn_delay":{"type":"number","exclusiveMinimum":0}},"$comment":"this is a mark for our injected plugin schema"},"priority":1003,"log":"function: 0x7f2ec5ec5c28","name":"limit-conn","version":0.1,"check_schema":"function: 0x7f2ec52f7c80","preread":"function: 0x7f2ec75eb378"},{"schema":{"type":"object","required":["protocol_name","protocol_level"],"properties":{"disable":"table: 0x7f2e c7686970","protocol_name":{"type":"string"},"upstream":{"description":"Deprecated. We should configure upstream outside of the plugin","type":"object","properties":{"port":{"type":"number"},"host":{"type":"string"},"ip":{"type":"string"}},"oneOf":[{"required":["host","port"]},{"required":["ip","port"]}]},"protocol_level":{"type":"integer"}},"$comment":"this is a mark for our injected plugin schema"},"priority":1000,"log":"function: 0x7f2ec5260770","name":"mqtt-proxy","version":0.1,"check_schema":"function: 0x7f2ec5261568","preread":"function: 0x7f2ec5260e40"}], context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] plugin.lua:252: load_stream(): load stream plugin times: 1, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] config_etcd.lua:659: new(): use loaded configuration /plugin_metadata, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] config_etcd.lua:659: new(): use loaded configuration /routes, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] plugin.lua:604: plugin_checker(): check plugin schema, name: proxy-rewrite, configurations: {"host":"iye.be"}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] router.lua:49: filter(): filter route: {"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":{"enable_websocket":true,"plugins":{"proxy-rewrite":{"host":"iye.be"}},"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"name":"catchall","priority":0,"update_time":1646771818,"status":1,"uri":"\/*","id":"397962856491909896","upstream":{"nodes":[{"port":6868,"host":"172.16.1.7","weight":1}],"scheme":"http","hash_on":"vars","type":"roundrobin","parent":{"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":"table: 0x7f2ec759cb48","clean_handlers":"table: 0x7f2ec5ff6cc8","has_domain":false,"orig_modifiedIndex":2446},"pass_host":"pass","keepalive_pool":{"idle_timeout":60,"requests":1000,"size":320},"timeout":{"read":6,"send":6,"connect":6}},"create_time":1646733946},"clean_handlers":{},"has_domain" :false,"orig_modifiedIndex":2446}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] plugin.lua:604: plugin_checker(): check plugin schema, name: proxy-rewrite, configurations: {"host":"iye.be"}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] router.lua:49: filter(): filter route: {"modifiedIndex":2530,"key":"\/apisix\/routes\/398029056852886280","update_count":0,"createdIndex":2530,"value":{"enable_websocket":true,"plugins":{"proxy-rewrite":{"host":"iye.be"}},"update_time":1646773405,"name":"test2","methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"status":1,"host":"127.1","id":"398029056852886280","uri":"\/*","priority":0,"upstream":{"nodes":[{"port":6868,"host":"172.16.1.7","weight":1}],"scheme":"http","hash_on":"vars","type":"roundrobin","parent":{"modifiedIndex":2530,"key":"\/apisix\/routes\/398029056852886280","update_count":0,"createdIndex":2530,"value":"table: 0x7f2ec759d3a0","clean_handlers":"table: 0x7f2ec5f57c78","has_domain":false,"orig_modifiedIndex":2530},"pass_host":"pass","keepalive_pool":{"idle_timeout":60,"requests":1000,"size":320},"timeout":{"read":6,"send":6,"connect":6}},"create_time":1646773405},"clean_handlers":{}, "has_domain":false,"orig_modifiedIndex":2530}, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] config_etcd.lua:659: new(): use loaded configuration /ssl, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] config_etcd.lua:659: new(): use loaded configuration /global_rules, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] plugin.lua:604: checker(): check plugin schema, name: wafdemo, configurations: {"disable":false}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *1 [lua] plugin.lua:604: checker(): check plugin schema, name: prometheus, configurations: {"disable":false}, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] config_etcd.lua:659: new(): use loaded configuration /services, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] config_etcd.lua:659: new(): use loaded configuration /plugin_configs, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] config_etcd.lua:659: new(): use loaded configuration /consumers, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77763#77763: *1 [lua] config_etcd.lua:659: new(): use loaded configuration /upstreams, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77763#77763: *4 [lua] timers.lua:39: run timer[plugin#server-info], context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *5 [lua] health_check.lua:115: init(): healthy check use ngx.shared dict: etcd-cluster-health-check, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] server-info.lua:206: init(): server info: {"boot_time":1646829853,"etcd_version":"unknown","up_time":0,"last_report_time":-1,"id":"92de9ecc-6b8d-4499-b574-ca7912b5c254","version":"2.12.1","hostname":"apisix-apisix"}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] server-info.lua:242: init(): timer created to report server info, interval: 60, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] plugin.lua:209: load(): load plugin times: 1, context: init_worker_by_lua* 2022/03/09 12:44:13 [warn] 77760#77760: *2 [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"limit-conn":true,"mqtt-proxy":true}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] plugin.lua:250: load_stream(): stream plugins: [{"schema":{"type":"object","oneOf":[{"required":["whitelist"]},{"required":["blacklist"]}],"$comment":"this is a mark for our injected plugin schema","properties":{"blacklist":{"type":"array","minItems":1,"items":{"anyOf":[{"title":"IPv4","type":"string","format":"ipv4"},{"title":"IPv4\/CIDR","type":"string","pattern":"^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([12]?[0-9]|3[0-2])$"},{"title":"IPv6","type":"string","format":"ipv6"},{"title":"IPv6\/CIDR","type":"string","pattern":"^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?\/[0-9]{1,3}$"}]}},"disable":{"type":"boolean"},"message":{"type":"string","default":"Your IP address is not allowed","minLength":1,"maxLength":1024},"whitelist":{"type":"array","minIt ems":1,"items":{"anyOf":"table: 0x7f2ed77449a0"}}}},"priority":3000,"name":"ip-restriction","check_schema":"function: 0x7f2ec76cd3c8","version":0.1,"restrict":"function: 0x7f2ec76cd580","preread":"function: 0x7f2ec76cd580"},{"schema":{"type":"object","required":["conn","burst","default_conn_delay","key"],"properties":{"key":{"type":"string"},"default_conn_delay":{"type":"number","exclusiveMinimum":0},"only_use_default_delay":{"type":"boolean","default":false},"key_type":{"type":"string","enum":["var","var_combination"],"default":"var"},"conn":{"type":"integer","exclusiveMinimum":0},"burst":{"type":"integer","minimum":0},"disable":"table: 0x7f2ec7686970"},"$comment":"this is a mark for our injected plugin schema"},"priority":1003,"log":"function: 0x7f2ec4db1760","name":"limit-conn","version":0.1,"check_schema":"function: 0x7f2ec4db1970","preread":"function: 0x7f2ec4dac6b8"},{"schema":{"type":"object","required":["protocol_name","protocol_level"],"properties":{"disable":"table: 0x7f2e c7686970","protocol_name":{"type":"string"},"protocol_level":{"type":"integer"},"upstream":{"description":"Deprecated. We should configure upstream outside of the plugin","type":"object","properties":{"port":{"type":"number"},"host":{"type":"string"},"ip":{"type":"string"}},"oneOf":[{"required":["host","port"]},{"required":["ip","port"]}]}},"$comment":"this is a mark for our injected plugin schema"},"priority":1000,"log":"function: 0x7f2ec5b4ec20","name":"mqtt-proxy","version":0.1,"check_schema":"function: 0x7f2ec5b3af78","preread":"function: 0x7f2ec762c738"}], context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] plugin.lua:252: load_stream(): load stream plugin times: 1, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] config_etcd.lua:659: new(): use loaded configuration /plugin_metadata, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] config_etcd.lua:659: new(): use loaded configuration /routes, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] plugin.lua:604: plugin_checker(): check plugin schema, name: proxy-rewrite, configurations: {"host":"iye.be"}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] router.lua:49: filter(): filter route: {"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":{"enable_websocket":true,"plugins":{"proxy-rewrite":{"host":"iye.be"}},"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"name":"catchall","priority":0,"update_time":1646771818,"status":1,"uri":"\/*","id":"397962856491909896","upstream":{"nodes":[{"port":6868,"host":"172.16.1.7","weight":1}],"scheme":"http","hash_on":"vars","type":"roundrobin","parent":{"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":"table: 0x7f2ec759cb48","clean_handlers":"table: 0x7f2ec7631d58","has_domain":false,"orig_modifiedIndex":2446},"pass_host":"pass","keepalive_pool":{"idle_timeout":60,"requests":1000,"size":320},"timeout":{"read":6,"send":6,"connect":6}},"create_time":1646733946},"clean_handlers":{},"has_domain" :false,"orig_modifiedIndex":2446}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] plugin.lua:604: plugin_checker(): check plugin schema, name: proxy-rewrite, configurations: {"host":"iye.be"}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] router.lua:49: filter(): filter route: {"modifiedIndex":2530,"key":"\/apisix\/routes\/398029056852886280","update_count":0,"createdIndex":2530,"value":{"enable_websocket":true,"plugins":{"proxy-rewrite":{"host":"iye.be"}},"update_time":1646773405,"name":"test2","methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"status":1,"host":"127.1","id":"398029056852886280","uri":"\/*","priority":0,"upstream":{"nodes":[{"port":6868,"host":"172.16.1.7","weight":1}],"scheme":"http","hash_on":"vars","type":"roundrobin","parent":{"modifiedIndex":2530,"key":"\/apisix\/routes\/398029056852886280","update_count":0,"createdIndex":2530,"value":"table: 0x7f2ec759d3a0","clean_handlers":"table: 0x7f2ec5a28fe8","has_domain":false,"orig_modifiedIndex":2530},"pass_host":"pass","keepalive_pool":{"idle_timeout":60,"requests":1000,"size":320},"timeout":{"read":6,"send":6,"connect":6}},"create_time":1646773405},"clean_handlers":{}, "has_domain":false,"orig_modifiedIndex":2530}, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] config_etcd.lua:659: new(): use loaded configuration /ssl, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] config_etcd.lua:659: new(): use loaded configuration /global_rules, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] plugin.lua:604: checker(): check plugin schema, name: wafdemo, configurations: {"disable":false}, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *2 [lua] plugin.lua:604: checker(): check plugin schema, name: prometheus, configurations: {"disable":false}, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] config_etcd.lua:659: new(): use loaded configuration /services, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] config_etcd.lua:659: new(): use loaded configuration /plugin_configs, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] config_etcd.lua:659: new(): use loaded configuration /consumers, context: init_worker_by_lua* 2022/03/09 12:44:13 [notice] 77760#77760: *2 [lua] config_etcd.lua:659: new(): use loaded configuration /upstreams, context: init_worker_by_lua* 2022/03/09 12:44:13 [info] 77760#77760: *24 [lua] v3.lua:98: _request_uri(): v3 request uri: /kv/range, timeout: 30, context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *5 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9wcm90bw==","range_end":"L2FwaXNpeC9wcm90cA=="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *9 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9yb3V0ZXM=","range_end":"L2FwaXNpeC9yb3V0ZXQ="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *7 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9wbHVnaW5fbWV0YWRhdGE=","range_end":"L2FwaXNpeC9wbHVnaW5fbWV0YWRhdGI="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *19 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9jb25zdW1lcnM=","range_end":"L2FwaXNpeC9jb25zdW1lcnQ="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *17 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9wbHVnaW5fY29uZmlncw==","range_end":"L2FwaXNpeC9wbHVnaW5fY29uZmlndA=="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *15 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9zZXJ2aWNlcw==","range_end":"L2FwaXNpeC9zZXJ2aWNldA=="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *13 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9nbG9iYWxfcnVsZXM=","range_end":"L2FwaXNpeC9nbG9iYWxfcnVsZXQ="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *27 [lua] health_check.lua:115: init(): healthy check use ngx.shared dict: etcd-cluster-health-check, context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *11 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9zc2w=","range_end":"L2FwaXNpeC9zc20="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *29 [lua] v3.lua:98: server_version(): v3 request uri: /version, timeout: 30, context: ngx.timer 2022/03/09 12:44:13 [info] 77763#77763: *21 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC91cHN0cmVhbXM=","range_end":"L2FwaXNpeC91cHN0cmVhbXQ="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *29 [lua] v3.lua:98: grant(): v3 request uri: /lease/grant, timeout: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *31 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9wbHVnaW5fbWV0YWRhdGE=","range_end":"L2FwaXNpeC9wbHVnaW5fbWV0YWRhdGI="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *27 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9wcm90bw==","range_end":"L2FwaXNpeC9wcm90cA=="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *35 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9zc2w=","range_end":"L2FwaXNpeC9zc20="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *33 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9yb3V0ZXM=","range_end":"L2FwaXNpeC9yb3V0ZXQ="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *39 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9zZXJ2aWNlcw==","range_end":"L2FwaXNpeC9zZXJ2aWNldA=="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *37 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9nbG9iYWxfcnVsZXM=","range_end":"L2FwaXNpeC9nbG9iYWxfcnVsZXQ="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *45 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC91cHN0cmVhbXM=","range_end":"L2FwaXNpeC91cHN0cmVhbXQ="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *43 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9jb25zdW1lcnM=","range_end":"L2FwaXNpeC9jb25zdW1lcnQ="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *41 [lua] v3.lua:670: request_chunk(): http request method: POST path: /watch body: {"create_request":{"start_revision":3540,"key":"L2FwaXNpeC9wbHVnaW5fY29uZmlncw==","range_end":"L2FwaXNpeC9wbHVnaW5fY29uZmlndA=="}} query: nil, context: ngx.timer 2022/03/09 12:44:13 [info] 77760#77760: *29 [lua] v3.lua:98: _request_uri(): v3 request uri: /kv/put, timeout: 30, context: ngx.timer 2022/03/09 12:44:14 [info] 77760#77760: *29 [lua] v3.lua:409: set(): v3 set body: {"prev_kv":{"key":"L2FwaXNpeC9kYXRhX3BsYW5lL3NlcnZlcl9pbmZvLzkyZGU5ZWNjLTZiOGQtNDQ5OS1iNTc0LWNhNzkxMmI1YzI1NA==","lease":"7587861010499051893","value":"eyJob3N0bmFtZSI6ImFwaXNpeC1hcGlzaXgiLCJib290X3RpbWUiOjE2NDY4MjkxMDMsImV0Y2RfdmVyc2lvbiI6IjMuNC4wIiwidXBfdGltZSI6NzIwLCJsYXN0X3JlcG9ydF90aW1lIjoxNjQ2ODI5ODIzLCJpZCI6IjkyZGU5ZWNjLTZiOGQtNDQ5OS1iNTc0LWNhNzkxMmI1YzI1NCIsInZlcnNpb24iOiIyLjEyLjEifQ==","version":"3021","create_revision":"24","mod_revision":"3528"},"header":{"member_id":"10276657743932975437","raft_term":"6","cluster_id":"14841639068965178418","revision":"3540"}}, context: ngx.timer 2022/03/09 12:44:14 [info] 77763#77763: *61 [lua] timers.lua:39: run timer[plugin#server-info], context: ngx.timer 2022/03/09 12:44:15 [info] 77763#77763: *86 [lua] timers.lua:39: run timer[plugin#server-info], context: ngx.timer 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/plugin/wolf-rbac/login operator: =, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/plugin/wolf-rbac/change_pwd operator: =, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/plugin/wolf-rbac/user_info operator: =, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] radixtree.lua:346: pre_insert_route(): path: /apisix/plugin/jwt/sign operator: =, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] route.lua:72: create_radixtree_uri_router(): insert uri route: {"enable_websocket":true,"plugins":{"proxy-rewrite":{"host":"iye.be"}},"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"name":"catchall","priority":0,"update_time":1646771818,"status":1,"uri":"\/*","id":"397962856491909896","upstream":{"nodes":[{"port":6868,"host":"172.16.1.7","weight":1}],"scheme":"http","hash_on":"vars","type":"roundrobin","parent":{"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":{"enable_websocket":true,"plugins":"table: 0x7f2ec759ced0","methods":"table: 0x7f2ec759cd58","name":"catchall","priority":0,"update_time":1646771818,"status":1,"uri":"\/*","id":"397962856491909896","upstream":"table: 0x7f2ec759cff8","create_time":1646733946},"clean_handlers":{},"has_domain":false,"orig_modifiedIndex":2446},"pass_host":"pass","keepalive_pool":{"idle_timeout":60," requests":1000,"size":320},"timeout":{"read":6,"send":6,"connect":6}},"create_time":1646733946}, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] route.lua:72: create_radixtree_uri_router(): insert uri route: {"enable_websocket":true,"plugins":{"proxy-rewrite":{"host":"iye.be"}},"update_time":1646773405,"name":"test2","methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"status":1,"host":"127.1","id":"398029056852886280","uri":"\/*","priority":0,"upstream":{"nodes":[{"port":6868,"host":"172.16.1.7","weight":1}],"scheme":"http","hash_on":"vars","type":"roundrobin","parent":{"modifiedIndex":2530,"key":"\/apisix\/routes\/398029056852886280","update_count":0,"createdIndex":2530,"value":{"enable_websocket":true,"plugins":"table: 0x7f2ec75bc560","update_time":1646773405,"name":"test2","methods":"table: 0x7f2ec759cda0","status":1,"host":"127.1","id":"398029056852886280","uri":"\/*","priority":0,"upstream":"table: 0x7f2ec75bc660","create_time":1646773405},"clean_handlers":{},"has_domain":false,"orig_modifiedIndex":2530},"pass_host":"pass","keepalive_po ol":{"idle_timeout":60,"requests":1000,"size":320},"timeout":{"read":6,"send":6,"connect":6}},"create_time":1646773405}, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] route.lua:94: create_radixtree_uri_router(): route items: [{"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"handler":"function: 0x7f2ec75bdbd0","priority":0,"paths":"\/*"},{"priority":0,"paths":"\/*","methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"handler":"function: 0x7f2ec4ec43e0","hosts":"127.1"}], client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] radixtree.lua:346: pre_insert_route(): path: / operator: <=, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] radixtree.lua:234: insert_route(): insert route path: / dataprt: 1, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] radixtree.lua:346: pre_insert_route(): path: / operator: <=, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] radixtree.lua:488: compare_param(): pcre pat: \/((.|\n)*), client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] init.lua:398: http_access_phase(): matched route: {"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":{"enable_websocket":true,"plugins":{"proxy-rewrite":{"host":"iye.be"}},"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"name":"catchall","priority":0,"update_time":1646771818,"status":1,"uri":"\/*","id":"397962856491909896","upstream":{"nodes":[{"port":6868,"host":"172.16.1.7","weight":1}],"scheme":"http","hash_on":"vars","type":"roundrobin","parent":{"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":"table: 0x7f2ec759cb48","clean_handlers":"table: 0x7f2ec7631d58","has_domain":false,"orig_modifiedIndex":2446},"pass_host":"pass","keepalive_pool":{"idle_timeout":60,"requests":1000,"size":320},"timeout":{"read":6,"send":6,"connect":6}},"create_time":1646733946},"clean_handlers":{} ,"has_domain":false,"orig_modifiedIndex":2446}, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] balancer.lua:183: pick_server(): route: {"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":{"enable_websocket":true,"plugins":{"proxy-rewrite":{"host":"iye.be"}},"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","CONNECT","TRACE"],"name":"catchall","priority":0,"update_time":1646771818,"status":1,"uri":"\/*","id":"397962856491909896","upstream":{"nodes":[{"port":6868,"host":"172.16.1.7","weight":1}],"scheme":"http","hash_on":"vars","type":"roundrobin","parent":{"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":"table: 0x7f2ec759cb48","clean_handlers":"table: 0x7f2ec7631d58","has_domain":false,"orig_modifiedIndex":2446},"pass_host":"pass","keepalive_pool":{"idle_timeout":60,"requests":1000,"size":320},"timeout":{"read":6,"send":6,"connect":6}},"create_time":1646733946},"clean_handlers":{},"has_doma in":false,"orig_modifiedIndex":2446} while connecting to upstream, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77760#77760: *109 [lua] balancer.lua:184: pick_server(): ctx: {"route_id":"397962856491909896","route_name":"catchall","curr_req_matched":{"_method":"GET",":ext":"","_path":"\/*"},"global_rules":{"key":"\/apisix\/global_rules","need_reload":false,"values":[{"modifiedIndex":1613,"key":"\/apisix\/global_rules\/1","value":{"id":"1","create_time":1646654835,"update_time":1646734095,"plugins":{"prometheus":{"prefer_name":false,"disable":false},"wafdemo":{"prefer_name":false,"disable":false}}},"createdIndex":146,"clean_handlers":{}}],"etcd_cli":{"sema":{"sem":"cdata<struct ngx_http_lua_sema_s *>: 0x7f2ec746e028"},"ssl_verify":true,"is_auth":false,"serializer":{"serialize":"function: 0x7f2ec77284e8","deserialize":"function: 0x7f2ec77284a8"},"timeout":30,"ttl":-1,"key_prefix":"","is_cluster":false,"endpoints":[{"api_prefix":"\/v3","host":"10.18.36.200","port":"2379","scheme":"http","http_host":"http:\/\/10.18.36.200:2379","full_prefix":"http:\/\/10.18.36.200:237 9\/v3"}],"last_auth_time":1646829853.749},"prev_index":3539,"automatic":true,"item_schema":{"type":"object","required":["plugins"],"properties":{"id":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9-_.]+$","minLength":1,"maxLength":64},{"type":"integer","minimum":1}]},"plugins":{"type":"object"},"update_time":{"type":"integer"},"create_time":"table: 0x7f2ec7718550"}},"sync_times":0,"health_check_timeout":10,"running":true,"checker":"function: 0x7f2ec75dda28","conf_version":1,"values_hash":{"1":1},"resync_delay":5},"var":{"_request":"cdata<void *>: 0x556b0d3f6cb0","_cache":{"real_request_uri":"\/","request_uri":"\/","uri":"\/","request_method":"GET","host":"10.18.36.201","remote_addr":"192.168.2.30"}},"conf_type":"global_rule","matched_route":{"modifiedIndex":2446,"key":"\/apisix\/routes\/397962856491909896","update_count":0,"createdIndex":1607,"value":{"enable_websocket":true,"plugins":{"proxy-rewrite":{"host":"iye.be"}},"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTION S","CONNECT","TRACE"],"name":"catchall","priority":0,"update_time":1646771818,"status":1,"uri":"\/*","id":"397962856491909896","upstream":{"nodes":[{"port":6868,"host":"172.16.1.7","weight":1}],"scheme":"http","hash_on":"vars","type":"roundrobin","parent":"table: 0x7f2ec75bd9a8","pass_host":"pass","keepalive_pool":{"idle_timeout":60,"requests":1000,"size":320},"timeout":{"read":6,"send":6,"connect":6}},"create_time":1646733946},"clean_handlers":{},"has_domain":false,"orig_modifiedIndex":2446},"conf_version":1613,"conf_id":"1"} while connecting to upstream, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [error] 77760#77760: *109 failed to run balancer_by_lua*: /usr/local/apisix/apisix/balancer.lua:187: attempt to index local 'up_conf' (a nil value) stack traceback: /usr/local/apisix/apisix/balancer.lua:187: in function 'pick_server' /usr/local/apisix/apisix/balancer.lua:325: in function 'run' /usr/local/apisix/apisix/init.lua:739: in function 'http_balancer_phase' balancer_by_lua:2: in main chunk while connecting to upstream, client: 192.168.2.30, server: _, request: "GET / HTTP/1.1", host: "10.18.36.201" 2022/03/09 12:44:16 [info] 77763#77763: *112 [lua] timers.lua:39: run timer[plugin#server-info], context: ngx.timer 2022/03/09 12:44:17 [info] 77763#77763: *140 [lua] timers.lua:39: run timer[plugin#server-info], context: ngx.timer ^C root@apisix-apisix:/usr/local/apisix# ``` ### Expected result ``` ~ ❯ cat $(which debugcurl) #!/usr/bin/env bash curl -vso /dev/null "$@" 2>&1 >/dev/null | grep -vE "^(\*|[{}]|\s+)" ~ ❯ debugcurl 10.18.36.201 > GET / HTTP/1.1 > Host: 10.18.36.201 > User-Agent: curl/7.81.0 > Accept: */* > < HTTP/1.1 200 OK < Content-Type: text/html; charset=utf-8 < Content-Length: 6531 < Connection: keep-alive < Accept-Ranges: bytes < Etag: "r76vlr51f" < Last-Modified: Sat, 12 Feb 2022 11:22:39 GMT < Date: Wed, 09 Mar 2022 12:45:14 GMT < Server: APISIX/2.12.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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
