Skip to content
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

应用注册不上 #3507

Open
scmod opened this issue Mar 11, 2025 · 1 comment
Open

应用注册不上 #3507

scmod opened this issue Mar 11, 2025 · 1 comment

Comments

@scmod
Copy link

scmod commented Mar 11, 2025

控制台:
java -Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8080 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard-1.8.8.jar

应用依赖,默认1.8.0以为有bug升级到1.8.8一样返回400

<dependency>
	<groupId>com.alibaba.cloud</groupId>
	<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
	<version>2021.1</version>
</dependency>

<dependency>
	<groupId>com.alibaba.cloud</groupId>
	<artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
	<version>2021.1</version>
</dependency>

<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-annotation-aspectj</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-api-gateway-adapter-common</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-cluster-client-default</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-cluster-common-default</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-cluster-server-default</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-core</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-datasource-extension</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-parameter-flow-control</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-reactor-adapter</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-spring-cloud-gateway-adapter</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-spring-webflux-adapter</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-spring-webmvc-adapter</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-transport-common</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-transport-simple-http</artifactId><version>1.8.8</version></dependency>

应用日志:

2025-03-11 15:32:23.470 WARNING [SimpleHttpHeartbeatSender] Failed to send heartbeat to Endpoint{protocol=HTTP, host='192.168.30.39, port=8719}, http status code: 400
2025-03-11 15:32:33.466 WARNING [SimpleHttpHeartbeatSender] Failed to send heartbeat to Endpoint{protocol=HTTP, host='192.168.30.39, port=8719}, http status code: 400
2025-03-11 15:32:43.464 WARNING [SimpleHttpHeartbeatSender] Failed to send heartbeat to Endpoint{protocol=HTTP, host='192.168.30.39, port=8719}, http status code: 400
2025-03-11 15:32:53.462 WARNING [SimpleHttpHeartbeatSender] Failed to send heartbeat to Endpoint{protocol=HTTP, host='192.168.30.39, port=8719}, http status code: 400

控制台日志没看到任何报错
logging.level.root=debug修改控制台日志配置
只看到dashboard自己发自己的心跳

控制台:
java -Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8080 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard-1.8.8.jar

应用依赖,默认1.8.0以为有bug升级到1.8.8一样返回400

<dependency>
	<groupId>com.alibaba.cloud</groupId>
	<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
	<version>2021.1</version>
</dependency>

<dependency>
	<groupId>com.alibaba.cloud</groupId>
	<artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
	<version>2021.1</version>
</dependency>

<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-annotation-aspectj</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-api-gateway-adapter-common</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-cluster-client-default</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-cluster-common-default</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-cluster-server-default</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-core</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-datasource-extension</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-parameter-flow-control</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-reactor-adapter</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-spring-cloud-gateway-adapter</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-spring-webflux-adapter</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-spring-webmvc-adapter</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-transport-common</artifactId><version>1.8.8</version></dependency>
<dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-transport-simple-http</artifactId><version>1.8.8</version></dependency>

应用日志:

2025-03-11 15:32:23.470 WARNING [SimpleHttpHeartbeatSender] Failed to send heartbeat to Endpoint{protocol=HTTP, host='192.168.30.39, port=8719}, http status code: 400
2025-03-11 15:32:33.466 WARNING [SimpleHttpHeartbeatSender] Failed to send heartbeat to Endpoint{protocol=HTTP, host='192.168.30.39, port=8719}, http status code: 400
2025-03-11 15:32:43.464 WARNING [SimpleHttpHeartbeatSender] Failed to send heartbeat to Endpoint{protocol=HTTP, host='192.168.30.39, port=8719}, http status code: 400
2025-03-11 15:32:53.462 WARNING [SimpleHttpHeartbeatSender] Failed to send heartbeat to Endpoint{protocol=HTTP, host='192.168.30.39, port=8719}, http status code: 400

控制台日志没看到任何报错
logging.level.root=debug修改控制台日志配置
只看到dashboard自己发自己的心跳,列表只能看到自己,无语了不知道为什么

Image

@scmod
Copy link
Author

scmod commented Mar 11, 2025

哦知道了,应用也要指定csp.sentinel.dashboard.server=192.168.30.39:8080,而不是csp.sentinel.dashboard.server=192.168.30.39:8719
https://sentinelguard.io/zh-cn/docs/dashboard.html
现在我也没明白

启动时加入 JVM 参数 -Dcsp.sentinel.dashboard.server=consoleIp:port 指定控制台地址和端口。若启动多个应用,则需要通过 -Dcsp.sentinel.api.port=xxxx 指定客户端监控 API 的端口(默认是 8719)。

这后半句是什么意思,给我一顿误导...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant