WSO2 API Manager 限流失效及网关部署异常问题求助
环境
- WSO2 API Manager 4.3.0(单节点,Docker部署)
- WSO2 Identity Server 6.1(作为密钥管理器使用)
- Docker Compose;容器采用
host网络模式运行 - 外部MSSQL数据库(已通过
deployment.toml完成配置)
问题描述
创建了一个订阅策略(10次请求/分钟)并应用到某个应用后,出现以下问题:
- 网关未执行订阅策略,超出配额的请求返回200而非429;
- 在Publisher中修改API并点击部署后,变更无法实时同步到运行中的网关,必须重启APIM容器才能生效;
- 启动日志存在三类错误:恢复Siddhi执行计划状态时触发ClassCastException、API部署时提示无效URI模板、API部署时提示重复资源映射。
排查证据
- synapse api目录仅存在默认文件(无API XML):
/home/wso2/wso2am-4.3.0/repository/deployment/server/synapse-configs/default/api Output: total 4 -rw-r--r-- 1 wso2 wso2 570 Aug 12 2024 _OpenService_.xml
- 关键脱敏日志片段:
- Siddhi恢复错误(Bronze/Gold/Silver执行计划均重复出现该错误):
ERROR ... Execution plan is not deployed and in inactive state : carbon.super_sub_AsyncBronze.siddhiql java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class org.wso2.siddhi.core.event.stream.StreamEvent ... at org.wso2.carbon.apimgt.throttling.siddhi.extension.AsyncAPIThrottleStreamProcessor.restoreState(...) ...- API部署错误:
ERROR {org.apache.synapse.api.API} Two resources cannot have the same path mapping and methods ERROR {org.wso2.carbon.apimgt.gateway.InMemoryAPIDeployer} Error in deploying <api-name> to the Gateway AxisFault: Error while publishing API to the Gateway. Two resources cannot have the same path mapping and methods ERROR ... Error while parsing the URI template Caused by: URITemplateException: Invalid character: ')' in expression - 同时观察到DataBridge连接成功的日志:
INFO - DataBridge user Wso2adminuser connected INFO - JMSConnectionFactory JMS ConnectionFactory : notificationJMSPublisher initialized
已尝试操作
- 确认
deployment.toml中apim.sync_runtime_artifacts.gateway = true配置项已正确设置; - 已在
deployment.toml中将apim.event_hub配置为tcp://<host>:5672,最初未部署RabbitMQ,后续尝试添加RabbitMQ并启用本地传输接收器。
内容的提问来源于stack exchange,提问作者behzad
相关产品推荐
相关产品推荐

