bug: Route url
Issue description
when I set url: "/index.html" ,there is nothing wrong. But I set url: "foo/index.html" or "foo/bar/index.html", it will give me {"error_msg":"failed to match any routes"}. Is it controled by route's rules , or it's a bug?
Environment
- apisix version (cmd:
apisix version): 2.1 - OS: centos7
What are your steps? In my environment, APISIX does not have this problem, but the dashboard will prompt that this setting is not allowed.
What are your steps? In my environment, APISIX does not have this problem, but the dashboard will prompt that this setting is not allowed.
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/v1/receipt/verify",
"upstream": {
"type": "roundrobin",
"nodes": {
"192.168.199.1:8080": 1
}
}
}'
curl http://127.0.0.1:9080/v1/receipt/verify
It will get a mistake.
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "uri": "/v1/receipt/verify", "upstream": { "type": "roundrobin", "nodes": { "192.168.199.1:8080": 1 } } }' curl http://127.0.0.1:9080/v1/receipt/verify It will get a mistake.
do you mean "uri": "v1/receipt/verify" ?
because if I use /v1/receipt/verify, my environment (2.1) cannot reproduce the problem
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "uri": "/v1/receipt/verify", "upstream": { "type": "roundrobin", "nodes": { "192.168.199.1:8080": 1 } } }' curl http://127.0.0.1:9080/v1/receipt/verify It will get a mistake.do you mean
"uri": "v1/receipt/verify"? because if I use/v1/receipt/verify, my environment (2.1) cannot reproduce the problem
I found that the connection between etcd and apisix may not be stable. This happens sometimes during routing and forwarding. curl http://127.0.0.1:9080/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' sometimes get Connection Refused ,It's about a quarter chance of going wrong.
I found that the connection between etcd and apisix may not be stable. This happens sometimes during routing and forwarding. curl http://127.0.0.1:9080/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' sometimes get Connection Refused ,It's about a quarter chance of going wrong.
I get your point. The unstable environment causes APISIX to be unstable. Now there is a PR doing this test. I hope this problem can be solved.