dyc87112 / blog-comments

5 stars 1 forks source link

Spring Cloud Alibaba基础教程:使用Sentinel实现接口限流 | 程序猿DD #339

Open dyc87112 opened 5 years ago

dyc87112 commented 5 years ago

http://blog.didispace.com/spring-cloud-alibaba-sentinel-1/

最近管点闲事浪费了不少时间,感谢网友libinwalan的留言提醒。及时纠正路线,继续跟大家一起学习Spring Cloud Alibaba。 Nacos作为注册中心和配置中心的基础教程,到这里先告一段落,后续与其他结合的内容等讲到的时候再一起拿出来说,不然内容会有点跳跃。接下来我们就来一起学习一下Spring Cloud Alibaba下的另外一个重要组件:Sentinel。 Sentine

BeautifulHao commented 5 years ago

试一把:wrk -t12 -c1000 -d10s -T30s --latency localhost:8001/hello 限流曲线会跟优美

libingspace commented 5 years ago

楼主加油,另外:我在“Nacos配置的多环境管理” 文章下 留下了新的疑问评论

zhonghuazhi commented 5 years ago

使用以上教程在配置时,总是提示 192.168.1.13:8720/metric?startTime= 这个东西,在Sentinel 服务端的控制台对应的日志中显示出来。 换了电脑依然如此: 2019-04-17 00:02:10 [pool-2-thread-1] ERROR c.t.c.s.d.metric.MetricFetcher - fetch metric http://192.168.1.13:8720/metric?startTime=1555430522000&endTime=1555430528000&refetch=false failed: java.net.SocketException: Host is down at sun.nio.ch.Net.connect0(Native Method)

dyc87112 commented 5 years ago

@zhonghuazhi 使用以上教程在配置时,总是提示 192.168.1.13:8720/metric?startTime= 这个东西,在Sentinel 服务端的控制台对应的日志中显示出来。 换了电脑依然如此: 2019-04-17 00:02:10 [pool-2-thread-1] ERROR c.t.c.s.d.metric.MetricFetcher - fetch metric http://192.168.1.13:8720/metric?startTime=1555430522000&endTime=1555430528000&refetch=false failed: java.net.SocketException: Host is down at sun.nio.ch.Net.connect0(Native Method)

看看网络配置是不是有问题:

ping localhost,看看是啥地址 cat /etc/hosts,有没有做过特殊的配置

zhonghuazhi commented 5 years ago

问题解决了,谢谢指导 原来是在 Mac上 Host文件自己配置了一些其他的IP。问题解决 谢谢 !

pengls commented 5 years ago

我在本地启的provider服务,在局域网内的另外一台linux上启的Sentinel-Dashborad, 本地provider启动后,在sentinel-dashboard里看机器列表,IP地址是本地的IPV6的地址, 导致sentinel-dashboard一直报错:java.net.NoRouteToHostException: No route to host。。。

ganlergit commented 5 years ago

是不是漏掉什么了 一步步差的配置 完全没效果

nicksoki13 commented 4 years ago

不同的两台机器,Sentinel控制台在docker上,被监控的应用在另外一台机器上,是否能正常监控?

zhangsungelan commented 4 years ago

sentinel配置的启动参数个都不管用,无论是

-Dserver.port=8888

还是用

-Dsentinel.dashboard.auth.username=sentinel
-Dsentinel.dashboard.auth.password=123456
-Dserver.servlet.session.timeout=7200

配置账户密码都不管用

zhangsungelan commented 4 years ago

还有就是我sentinel.jar所在服务器ping不通启动代码的机器的时候sentinel控制台获取不到数据