Sn0rt opened a new issue, #9979: URL: https://github.com/apache/apisix/issues/9979
### Current Behavior I user get 404 error when access the router which created by higher version (3.2.2) this issues is part of https://github.com/apache/apisix/issues/9951#issuecomment-1663492718 ### Expected Behavior access normal ### Error Logs NP ### Steps to Reproduce # check out 3.2.2 check the code from tag 3.2.2 ```bash ~/w/apisix> git co 3.2.2 HEAD is now at 77704832 feat: release APISIX 3.2.2 (#9723) ~/w/apisix> make deps Wrote variables.OPENSSL_LIBDIR = "/opt/homebrew/opt/openresty-openssl111/lib" to /Users/guohao/.luarocks/config-5.1.lua Wrote variables.OPENSSL_INCDIR = "/opt/homebrew/opt/openresty-openssl111/include" to /Users/guohao/.luarocks/config-5.1.lua apisix master-0 depends on lua-resty-ctxdump 0.1-0 (0.1-0 installed) apisix master-0 depends on api7-lua-resty-dns-client 7.0.1 (7.0.1-0 installed) apisix master-0 depends on lua-resty-template 2.0 (2.0-1 installed) apisix master-0 depends on lua-resty-etcd 1.10.4 (1.10.4-0 installed) apisix master-0 depends on api7-lua-resty-http 0.2.0 (0.2.0-0 installed) apisix master-0 depends on lua-resty-balancer 0.04 (0.04-0 installed) apisix master-0 depends on lua-resty-ngxvar 0.5.2 (0.5.2-0 installed) apisix master-0 depends on lua-resty-jit-uuid 0.0.7 (0.0.7-2 installed) apisix master-0 depends on lua-resty-healthcheck-api7 2.2.2 (2.2.2-0 installed) apisix master-0 depends on api7-lua-resty-jwt 0.2.5 (0.2.5-0 installed) apisix master-0 depends on lua-resty-hmac-ffi 0.05 (0.05-0 installed) apisix master-0 depends on lua-resty-cookie 0.1.0 (0.1.0-2 installed) apisix master-0 depends on lua-resty-session 3.10 (3.10-1 installed) apisix master-0 depends on opentracing-openresty 0.1 (0.1-0 installed) apisix master-0 depends on lua-resty-radixtree 2.8.2 (2.8.2-0 installed) apisix master-0 depends on lua-protobuf 0.4.1 (0.4.1-1 installed) apisix master-0 depends on lua-resty-openidc 1.7.5 (1.7.5-1 installed) apisix master-0 depends on luafilesystem 1.7.0-2 (1.7.0-2 installed) apisix master-0 depends on api7-lua-tinyyaml 0.4.2 (0.4.2-0 installed) apisix master-0 depends on nginx-lua-prometheus 0.20220527 (0.20220527-1 installed) apisix master-0 depends on jsonschema 0.9.8 (0.9.8-0 installed) apisix master-0 depends on lua-resty-ipmatcher 0.6.1 (0.6.1-0 installed) apisix master-0 depends on lua-resty-kafka 0.20-0 (0.20-0 installed) apisix master-0 depends on lua-resty-logger-socket 2.0.1-0 (2.0.1-0 installed) apisix master-0 depends on skywalking-nginx-lua 0.6.0 (0.6.0-0 installed) apisix master-0 depends on base64 1.5-2 (1.5-2 installed) apisix master-0 depends on binaryheap 0.4 (0.4-1 installed) apisix master-0 depends on api7-dkjson 0.1.1 (0.1.1-0 installed) apisix master-0 depends on resty-redis-cluster 1.02-4 (1.02-4 installed) apisix master-0 depends on lua-resty-expr 1.3.2 (1.3.2-0 installed) apisix master-0 depends on graphql 0.0.2 (0.0.2-1 installed) apisix master-0 depends on argparse 0.7.1-1 (0.7.1-1 installed) apisix master-0 depends on luasocket 3.1.0-1 (3.1.0-1 installed) apisix master-0 depends on luasec 0.9-1 (0.9-1 installed) apisix master-0 depends on lua-resty-consul 0.3-2 (0.3-2 installed) apisix master-0 depends on penlight 1.9.2-1 (1.9.2-1 installed) apisix master-0 depends on ext-plugin-proto 0.6.0 (0.6.0-0 installed) apisix master-0 depends on casbin 1.41.5 (1.41.5-1 installed) apisix master-0 depends on api7-snowflake 2.0-1 (2.0-1 installed) apisix master-0 depends on inspect 3.1.1 (3.1.1-0 installed) apisix master-0 depends on lualdap 1.2.6-1 (1.2.6-1 installed) apisix master-0 depends on lua-resty-rocketmq 0.3.0-0 (0.3.0-0 installed) apisix master-0 depends on opentelemetry-lua 0.2-3 (0.2-3 installed) apisix master-0 depends on net-url 0.9-1 (0.9-1 installed) apisix master-0 depends on xml2lua 1.5-2 (1.5-2 installed) apisix master-0 depends on nanoid 0.1-1 (0.1-1 installed) apisix master-0 depends on lua-resty-mediador 0.1.2-1 (0.1.2-1 installed) apisix master-0 depends on lua-resty-ldap 0.1.0-0 (0.1.0-0 installed) Stopping after installing dependencies for apisix master-0 ~/w/apisix> make reload [ info ] reload -> [ Start ] /Users/guohao/workspace/apisix/bin/apisix reload /usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua reload [ info ] reload -> [ Done ] ``` test the router not be installed ```bash ~/w/apisix> curl http://localhost:9080/anything -v * processing: http://localhost:9080/anything * Trying [::1]:9080... * Connected to localhost (::1) port 9080 > GET /anything HTTP/1.1 > Host: localhost:9080 > User-Agent: curl/8.2.1 > Accept: */* > < HTTP/1.1 404 Not Found < Date: Thu, 03 Aug 2023 08:13:49 GMT < Content-Type: text/plain; charset=utf-8 < Transfer-Encoding: chunked < Connection: keep-alive < Server: APISIX/3.2.2 < {"error_msg":"404 Route Not Found"} * Connection #0 to host localhost left intact ``` ## create service and router create a service and router ```bash ~/w/apisix> curl http://127.0.0.1:9180/apisix/admin/services/200 \ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "upstream": { "type": "roundrobin", "nodes": { "httpbin.org:80": 1 } } }' {"value":{"create_time":1691050434,"upstream":{"nodes":{"httpbin.org:80":1},"type":"roundrobin","hash_on":"vars","scheme":"http","pass_host":"pass"},"update_time":1691050434,"id":"200"},"key":"/apisix/services/200"} ~/w/apisix> curl http://127.0.0.1:9180/apisix/admin/routes/100 \ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "methods": ["GET"], "uri": "/anything", "service_id": "200" }' {"value":{"uri":"/anything","create_time":1691050439,"priority":0,"id":"100","methods":["GET"],"service_id":"200","update_time":1691050439,"status":1},"key":"/apisix/routes/100"} ``` and test the router. ```bash ~/w/apisix> curl http://localhost:9080/anything -v * processing: http://localhost:9080/anything * Trying [::1]:9080... * Connected to localhost (::1) port 9080 > GET /anything HTTP/1.1 > Host: localhost:9080 > User-Agent: curl/8.2.1 > Accept: */* > < HTTP/1.1 200 OK < Content-Type: application/json < Content-Length: 382 < Connection: keep-alive < Date: Thu, 03 Aug 2023 08:14:28 GMT < Access-Control-Allow-Origin: * < Access-Control-Allow-Credentials: true < Server: APISIX/3.2.2 < { "args": {}, "data": "", "files": {}, "form": {}, "headers": { "Accept": "*/*", "Host": "localhost", "User-Agent": "curl/8.2.1", "X-Amzn-Trace-Id": "Root=1-64cb61e0-5e4919de62e639d160823fde", "X-Forwarded-Host": "localhost" }, "json": null, "method": "GET", "origin": "::1, 220.246.124.214", "url": "http://localhost/anything" } * Connection #0 to host localhost left intact ``` Now it works. # check out 3.2.1 check out the tag 3.2.1 and `make reload` ```bash ~/w/apisix> git co 3.2.1 Previous HEAD position was 77704832 feat: release APISIX 3.2.2 (#9723) HEAD is now at f81a386d feat: release apisix 3.2.1 (#9559) ~/w/apisix> make deps Wrote variables.OPENSSL_LIBDIR = "/opt/homebrew/opt/openresty-openssl111/lib" to /Users/guohao/.luarocks/config-5.1.lua Wrote variables.OPENSSL_INCDIR = "/opt/homebrew/opt/openresty-openssl111/include" to /Users/guohao/.luarocks/config-5.1.lua Missing dependencies for apisix master-0: api7-lua-resty-jwt 0.2.4 (not installed) apisix master-0 depends on lua-resty-ctxdump 0.1-0 (0.1-0 installed) apisix master-0 depends on api7-lua-resty-dns-client 7.0.1 (7.0.1-0 installed) apisix master-0 depends on lua-resty-template 2.0 (2.0-1 installed) apisix master-0 depends on lua-resty-etcd 1.10.4 (1.10.4-0 installed) apisix master-0 depends on api7-lua-resty-http 0.2.0 (0.2.0-0 installed) apisix master-0 depends on lua-resty-balancer 0.04 (0.04-0 installed) apisix master-0 depends on lua-resty-ngxvar 0.5.2 (0.5.2-0 installed) apisix master-0 depends on lua-resty-jit-uuid 0.0.7 (0.0.7-2 installed) apisix master-0 depends on lua-resty-healthcheck-api7 2.2.2 (2.2.2-0 installed) apisix master-0 depends on api7-lua-resty-jwt 0.2.4 (not installed) Installing https://luarocks.org/api7-lua-resty-jwt-0.2.4-0.src.rock api7-lua-resty-jwt 0.2.4-0 depends on lua >= 5.1 (5.1-1 provided by VM) api7-lua-resty-jwt 0.2.4-0 depends on lua-resty-openssl >= 0.6.8 (0.8.22-1 installed) api7-lua-resty-jwt 0.2.4-0 is now installed in /Users/guohao/workspace/apisix/deps (license: Apache License Version 2) Checking stability of dependencies in the absence of api7-lua-resty-jwt 0.2.5-0... Removing api7-lua-resty-jwt 0.2.5-0... Removal successful. apisix master-0 depends on lua-resty-hmac-ffi 0.05 (0.05-0 installed) apisix master-0 depends on lua-resty-cookie 0.1.0 (0.1.0-2 installed) apisix master-0 depends on lua-resty-session 3.10 (3.10-1 installed) apisix master-0 depends on opentracing-openresty 0.1 (0.1-0 installed) apisix master-0 depends on lua-resty-radixtree 2.8.2 (2.8.2-0 installed) apisix master-0 depends on lua-protobuf 0.4.1 (0.4.1-1 installed) apisix master-0 depends on lua-resty-openidc 1.7.5 (1.7.5-1 installed) apisix master-0 depends on luafilesystem 1.7.0-2 (1.7.0-2 installed) apisix master-0 depends on api7-lua-tinyyaml 0.4.2 (0.4.2-0 installed) apisix master-0 depends on nginx-lua-prometheus 0.20220527 (0.20220527-1 installed) apisix master-0 depends on jsonschema 0.9.8 (0.9.8-0 installed) apisix master-0 depends on lua-resty-ipmatcher 0.6.1 (0.6.1-0 installed) apisix master-0 depends on lua-resty-kafka 0.20-0 (0.20-0 installed) apisix master-0 depends on lua-resty-logger-socket 2.0.1-0 (2.0.1-0 installed) apisix master-0 depends on skywalking-nginx-lua 0.6.0 (0.6.0-0 installed) apisix master-0 depends on base64 1.5-2 (1.5-2 installed) apisix master-0 depends on binaryheap 0.4 (0.4-1 installed) apisix master-0 depends on api7-dkjson 0.1.1 (0.1.1-0 installed) apisix master-0 depends on resty-redis-cluster 1.02-4 (1.02-4 installed) apisix master-0 depends on lua-resty-expr 1.3.2 (1.3.2-0 installed) apisix master-0 depends on graphql 0.0.2 (0.0.2-1 installed) apisix master-0 depends on argparse 0.7.1-1 (0.7.1-1 installed) apisix master-0 depends on luasocket 3.1.0-1 (3.1.0-1 installed) apisix master-0 depends on luasec 0.9-1 (0.9-1 installed) apisix master-0 depends on lua-resty-consul 0.3-2 (0.3-2 installed) apisix master-0 depends on penlight 1.9.2-1 (1.9.2-1 installed) apisix master-0 depends on ext-plugin-proto 0.6.0 (0.6.0-0 installed) apisix master-0 depends on casbin 1.41.5 (1.41.5-1 installed) apisix master-0 depends on api7-snowflake 2.0-1 (2.0-1 installed) apisix master-0 depends on inspect 3.1.1 (3.1.1-0 installed) apisix master-0 depends on lualdap 1.2.6-1 (1.2.6-1 installed) apisix master-0 depends on lua-resty-rocketmq 0.3.0-0 (0.3.0-0 installed) apisix master-0 depends on opentelemetry-lua 0.2-3 (0.2-3 installed) apisix master-0 depends on net-url 0.9-1 (0.9-1 installed) apisix master-0 depends on xml2lua 1.5-2 (1.5-2 installed) apisix master-0 depends on nanoid 0.1-1 (0.1-1 installed) apisix master-0 depends on lua-resty-mediador 0.1.2-1 (0.1.2-1 installed) apisix master-0 depends on lua-resty-ldap 0.1.0-0 (0.1.0-0 installed) Stopping after installing dependencies for apisix master-0 ~/w/apisix> make reload [ info ] reload -> [ Start ] /Users/guohao/workspace/apisix/bin/apisix reload /usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua reload [ info ] reload -> [ Done ] ``` test the router ```bash ~/w/apisix> curl http://localhost:9080/anything -v * processing: http://localhost:9080/anything * Trying [::1]:9080... * Connected to localhost (::1) port 9080 > GET /anything HTTP/1.1 > Host: localhost:9080 > User-Agent: curl/8.2.1 > Accept: */* > < HTTP/1.1 404 Not Found < Date: Thu, 03 Aug 2023 08:14:56 GMT < Content-Type: text/plain; charset=utf-8 < Transfer-Encoding: chunked < Connection: keep-alive < Server: APISIX/3.2.1 < {"error_msg":"404 Route Not Found"} * Connection #0 to host localhost left intact ``` # check the etcd ```bash ~/w/apisix> etcdctl get /apisix/routes/100 /apisix/routes/100 {"uri":"/anything","service_id":"200","priority":0,"id":"100","create_time":1691050439,"methods":["GET"],"update_time":1691050439,"status":1} ~/w/apisix> etcdctl get /apisix/services/200 /apisix/services/200 {"create_time":1691050434,"upstream":{"nodes":{"httpbin.org:80":1},"type":"roundrobin","hash_on":"vars","scheme":"http","pass_host":"pass"},"update_time":1691050434,"id":"200"} ``` ### Environment - APISIX version (run `apisix version`): 3.2.2 -> 3.2.1 - Operating system (run `uname -a`): ubuntu - 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: - 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
