apisix icon indicating copy to clipboard operation
apisix copied to clipboard

{"error_msg":"failed to match any routes"}

Open itw-hewb opened this issue 4 years ago • 13 comments

apisix version:2.6 route配置:{ "uri": "/nacos/", "name": "tnacos", "plugins": { "proxy-rewrite": { "headers": { "Referer": "http://xxxx.com/" }, "regex_uri": [ "^/nacos/(.)", "/$1" ] }, "skywalking": { "sample_ratio": 1 } }, "upstream": { "type": "roundrobin", "hash_on": "vars", "scheme": "http", "discovery_type": "nacos", "pass_host": "pass", "service_name": "mis-gateway-dev" }, "status": 1 }

正确的结果: image

一段时间后访问: {"error_msg":"failed to match any routes"}

通过route 下线 上线后操作后 恢复正常 一段时间后 继续 {"error_msg":"failed to match any routes"} 如此循环

itw-hewb avatar Jul 22 '21 09:07 itw-hewb

@itw-hewb Any abnormal logs in the error log file of APISIX?

tokers avatar Jul 22 '21 10:07 tokers

@itw-hewb APISIX的错误日志文件中是否有异常日志?

image 这是日志

itw-hewb avatar Jul 22 '21 11:07 itw-hewb

I'm surprised because the 404 exception message was already changed in this PR:https://github.com/apache/apisix/pull/2304, form "failed to match any routes" to "404 Route Not Found", please check the version of apisix or if the request was sent to a lower version of apisix.

tzssangglass avatar Jul 22 '21 15:07 tzssangglass

我很惊讶,因为这个 PR 中的 404 异常消息已经改变了:#2304,form "failed to match any routes"to "404 Route Not Found",请检查 apisix 的版本,或者请求是否发送到较低版本的 apisix。

这是我的apisix 版本 image

itw-hewb avatar Jul 23 '21 02:07 itw-hewb

you can set log_level to debug to get "failed to match any routes" in error.log of APISIX 2.6. I wanted to see if it would be in the log.

tzssangglass avatar Jul 23 '21 03:07 tzssangglass

您可以设置log_leveldebug获取"failed to match any routes"APISIX 2.6 的 error.log。 我想看看它是否会在日志中。

这是我的配置 image debug 模式已经启动 这是日志情况 这是正确的情况 image 令人惊讶的是 这种情况不是立马出现 是要等待一个不确定的 时间后出现的 我现在就在等这个问题的出现 稍等 附上日志

itw-hewb avatar Jul 23 '21 03:07 itw-hewb

你可以设置log_leveldebug获取"failed to match any routes"APISIX 2.6的error.log。 我想看看它是否会在日志中。

这是我的 调试模式已经启动 日志的情况是正确的情况 配置是这样的情况不是马出现是要等待立另一个现在的时间后出现的就在等这个问题的出现等附上 图像

图像

这是是异常后的日志 image

itw-hewb avatar Jul 23 '21 03:07 itw-hewb

I checked the logs and didn't find anything wrong. Make sure you are using the routing ttl.

And I still wonder, "failed to match any routes" should not appear in APISIX 2.6.

tzssangglass avatar Jul 23 '21 04:07 tzssangglass

I found a log entry "failed to fetch data from etcd: failed to read etcd dir", it should be unexpected and might affect the routes.

tokers avatar Jul 23 '21 08:07 tokers

I found a log entry "failed to fetch data from etcd: failed to read etcd dir", it should be unexpected and might affect the routes.

有可能,为什么会有这个?我检查了我的etcd 都是正常的

itw-hewb avatar Jul 23 '21 09:07 itw-hewb

I found a log entry "failed to fetch data from etcd: failed to read etcd dir", it should be unexpected and might affect the routes.

有可能,为什么会有这个?我检查了我的etcd 都是正常的

Hard to answer it, could you capture some network packets between APISIX and ETCD?

tokers avatar Jul 24 '21 10:07 tokers

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 [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jul 11 '22 10:07 github-actions[bot]

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

itw-hewb avatar Jul 11 '22 10:07 itw-hewb

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

itw-hewb avatar Apr 13 '23 09:04 itw-hewb