win10使用sentinel,idea启动微服务注册成功但是实时监控和簇点链路都没有数据显示
启动命令如下
java -Dserver.port=8090 -Dcsp.sentinel.dashboard.server=localhost:8090 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard.jar
以下为cmd输出日志
Starting Sentinel Dashboard...
INFO: Sentinel log output type is: file
INFO: Sentinel log charset is: utf-8
INFO: Sentinel log base directory is: C:\Users\Lenovo\logs\csp\
INFO: Sentinel log name use pid is: false
INFO: Sentinel log level is: INFO
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.5.12)
2024-04-30 08:36:02.145 INFO 1516 --- [ main] c.a.c.s.dashboard.DashboardApplication : Starting DashboardApplication using Java 17.0.10 on LAPTOP-3NJQAH6S with PID 1516 (D:\sentinel\sentinel-dashboard.jar started by Lenovo in D:\sentinel)
2024-04-30 08:36:02.152 INFO 1516 --- [ main] c.a.c.s.dashboard.DashboardApplication : No active profile set, falling back to 1 default profile: "default"
2024-04-30 08:36:03.313 INFO 1516 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8090 (http)
2024-04-30 08:36:03.314 INFO 1516 --- [ main] o.a.catalina.core.AprLifecycleListener : Loaded Apache Tomcat Native library [1.2.36] using APR version [1.7.2].
2024-04-30 08:36:03.315 INFO 1516 --- [ main] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
2024-04-30 08:36:03.315 INFO 1516 --- [ main] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2024-04-30 08:36:03.319 INFO 1516 --- [ main] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 1.1.1t 7 Feb 2023]
2024-04-30 08:36:03.327 INFO 1516 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-04-30 08:36:03.327 INFO 1516 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.60]
2024-04-30 08:36:03.430 INFO 1516 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-04-30 08:36:03.430 INFO 1516 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1220 ms
2024-04-30 08:36:03.481 INFO 1516 --- [ main] c.a.c.s.dashboard.config.WebConfig : Sentinel servlet CommonFilter registered
2024-04-30 08:36:04.093 INFO 1516 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8090 (http) with context path ''
2024-04-30 08:36:04.105 INFO 1516 --- [ main] c.a.c.s.dashboard.DashboardApplication : Started DashboardApplication in 2.455 seconds (JVM running for 3.138)
2024-04-30 08:36:06.619 INFO 1516 --- [nio-8090-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-04-30 08:36:06.619 INFO 1516 --- [nio-8090-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2024-04-30 08:36:06.621 INFO 1516 --- [nio-8090-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
此为SentinelDashboard控制台的显示内容
在微服务中我使用了
<java.version>1.8</java.version>
<spring-boot.version>2.7.6</spring-boot.version>
<spring-cloud.version>2021.0.5</spring-cloud.version>
<spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
server:
port: 5602
spring:
application:
name: fshop-cart
cloud:
sentinel:
#取消懒加载
eager: true
#sentinel服务地址
transport:
dashboard: 127.0.0.1:8090
clientIp: 10.225.196.74
http-method-specify: true # 开启请求方式前缀
其余内容使用nacos进行加载无异常报错