-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentinel 1.7.1 版本,SpringMVC模式后台报错 #1392
Comments
也帮忙提供下 |
csp.zip |
This comment has been minimized.
This comment has been minimized.
You may use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It's not related to this issue. Please open a new issue to discuss this. |
能留个qq么?或微信,QQ上找不到群。 |
已经把异步的另提了一个issure |
从日志来看,像是开启了 HTTP method 前缀支持,这样的话资源名里面理论上不应该有不包含 HTTP method 前缀的 URL(比如 |
没有了,所有的配置都在这里了
我也尝试过设置HttpMethodSpecify为false,但是还是报错 |
可否帮忙提供一个能够复现问题的最小化的项目?社区来看一下 |
附件里面我新初始化的一个项目,随便请求几次接口就复现了 `com.alibaba.csp.sentinel.ErrorEntryFreeException: The order of entry exit can't be paired with the order of entry, current entry in context: GET:/error, but expected: ` |
看了下,应该是重复引入了 SentinelWebInterceptor。Spring Cloud Alibaba 2.2.0.RELEASE 及以上版本默认已经自动配置了 SentinelWebInterceptor,代码里不要重复配置,配置方式可参考 SCA 的文档。 |
可以试一下 2.2.1.RELEASE 版本 |
我以前是没有配置的,但是不配置的话,SCA的自动注册链路,很多URL都捕获不到,不过我刚刚升级到了2.2.1.RELEASE版本,好像解决了链路注册不到的问题 如果不用这个MVC配置的话,SCA中的BlockExceptionHandler这个怎么指定呢?不然只能返回默认的错误信息:Blocked by Sentinel (flow limiting) 我看了下SCA的文档里面没有体现 |
不要尝试注册SentinelWebMvcConfig了,因为starter默认配置一个SentinelWebAutoConfiguration,会注册一个SentinelWebMvcConfig。如果自己再注册一个,位置在第二个,出现异常,第一个就已经处理了,不会过滤到第二个mvcConfig中配置的interceptor中。正确的自定义BlockExceptionHandler姿势: |
谢谢,已经解决了 |
版本:
SpringBoot:2.2.6.RELEASE
SpringCloud:Hoxton.SR3
SpringCloud Alibaba:2.2.0.RELEASE
Sentinel:1.7.1
JDK:1.8
运行环境:undertow
使用Demo里面的案例来配置了自动埋点
然后流量控制没有问题,但是后台一直在报错
The text was updated successfully, but these errors were encountered: