最新版sentinel console空白,找不到服务列表

2023-05-16

原文:https://www.lskyf.com/post/240

最新版本的sentinel控制台服务列表空白需要进行如下检查

检查1:java版本太高

sentinel还不支持最新的java版本列如java19,需要切换到所支持的版本,如java8

检查2:spring boot , spring cloud alibaba和spring cloud 版本对应关系

点击查看https://github.com/alibaba/spring-cloud-alibaba/wiki/版本说明

检查3:注意pom.xml文件需要引入spring-boot-actuator依赖

        <!--sentinel start-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
        </dependency>
        <!--sentinel end-->

检查4:application.yml配置,

注意配置spring.cloud.sentinel.eager=true以及management.endpoint.sentinel.enabled=true,端口被占用也会空白,可将默认8719修改为其他端口

spring:
  application:
    name: service-order

  # nacos注册中心配置
  cloud:
    nacos:
      discovery:
        server-addr: 127.0.0.1:8848

    sentinel:
      transport:
        # sentinel api端口,默认8719
        port: 8719
        # dashboard地址
        dashboard: localhost:8080
        # 配置心跳
      eager: true
management:
  endpoint:
    sentinel:
      enabled: true

这些将对你有帮助:

sentinel github demo

sentinel官方文档

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

最新版sentinel console空白,找不到服务列表 的相关文章

随机推荐