在立即购买课程时出现错误,没有跳转到支付页面
1. 远程调用ClientException: Load balancer does not have available server for client: service-edu
2.java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have available server for client: service-edu
原因剖析
找不到这个服务?很好,咱去nacos瞅瞅有没有启动
好家伙,所有服务的名称名字不统一?没办法了,不知道整了啥骚操作,只能统一一下了(把所有的模块的配置文件都检查一下):
修改配置后,重启所有模块,搞定!
点击课程中任意非免费的课程,然后点击立即购买,后端显示为:
},Server stats: [[Server:10.6.86.223:8001; Zone:UNKNOWN; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0]
]}ServerList:org.springframework.cloud.alibaba.nacos.ribbon.NacosServerList@79d3bf6e
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4515456e] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@1578294567 wrapping com.mysql.cj.jdbc.ConnectionImpl@40a7a572] will not be managed by Spring
==> Preparing: INSERT INTO t_order ( id, order_no, course_id, course_title, course_cover, teacher_name, member_id, nickname, mobile, total_fee, pay_type, status, gmt_create, gmt_modified ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
==> Parameters: 1543503939876052993(String), 20220703155630875(String), 1192252213659774977(String), java基础课程:test(String), https://edu-xuyy.oss-cn-beijing.aliyuncs.com/2022/06/10/XiYangYang.jpeg(String), 晴天(String), 1086387099449442306(String), 用户XTMUeHDAoj(String), 13520191388(String), 0.01(BigDecimal), 1(Integer), 0(Integer), 2022-07-03 15:56:30.839(Timestamp), 2022-07-03 15:56:30.839(Timestamp)
<== Updates: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4515456e]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@749725c7] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@1724558784 wrapping com.mysql.cj.jdbc.ConnectionImpl@40a7a572] will not be managed by Spring
==> Preparing: SELECT id,order_no,course_id,course_title,course_cover,teacher_name,member_id,nickname,mobile,total_fee,pay_type,status,is_deleted,gmt_create,gmt_modified FROM t_order WHERE order_no = ?
==> Parameters: 20220703155630875(String)
<== Columns: id, order_no, course_id, course_title, course_cover, teacher_name, member_id, nickname, mobile, total_fee, pay_type, status, is_deleted, gmt_create, gmt_modified
<== Row: 1543503939876052993, 20220703155630875, 1192252213659774977, java?????test, https://edu-xuyy.oss-cn-beijing.aliyuncs.com/2022/06/10/XiYangYang.jpeg, ??, 1086387099449442306, ??XTMUeHDAoj, 13520191388, 0.01, 1, 0, 0, 2022-07-03 15:56:31, 2022-07-03 15:56:31
<== Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@749725c7]
2022-07-03 15:56:31.424 INFO 19324 --- [erListUpdater-0] c.netflix.config.ChainedDynamicProperty : Flipping property: service-ucenter.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2022-07-03 15:56:31.502 INFO 19324 --- [erListUpdater-1] c.netflix.config.ChainedDynamicProperty : Flipping property: service-edu.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
前端显示为: