当前位置:   article > 正文

微服务之注册中心SOFARegistry

sofaregistry

目录

1.SOFARegistry部署链接

2.访问registry-data提供的健康监测api,返回false;(进程能ps到)

3.知识:

4.SOFARPC 已支持使用 SOFARegistry 作为服务注册中心

5.疑问:

6.了解

7.ERROR:registry-session/logs/registry/session/common-error.log


1.SOFARegistry部署链接

https://www.sofastack.tech/projects/sofa-registry/server-quick-start/

https://www.sofastack.tech/projects/sofa-registry/deployment/

2.访问registry-data提供的健康监测api,返回false;(进程能ps到)

效果:

registry-data/logs/bolt/common-error.log

查看日志:registry-data-std.out

registry-data/logs/registry/registry-startup.log

解决方案:

https://www.cnblogs.com/dashuai-wang/p/13037375.html

step1:修改startup.sh

step2:添加指定网卡配置:JAVA_OPTS="$JAVA_OPTS -Dnetwork_interface_binding=???"

step3:sh shutdown.sh

step4:重启服务

3.知识:

海量数据下的注册中心 - SOFARegistry 架构介绍:https://www.sofastack.tech/blog/sofa-registry-introduction/

CAP:https://juejin.im/post/6844903833521356807

服务注册中心 Session 存储策略 | SOFARegistry 解析:https://www.sofastack.tech/blog/sofa-registry-session-storage/

蚂蚁金服服务注册中心数据分片和同步方案详解 | SOFARegistry 解析:https://www.shangmayuan.com/a/f429206d4e784bc4b29b6267.html

java增加日志输出:https://m.yisu.com/zixun/215050.html   https://blog.csdn.net/Joseph_Cherry/article/details/77113323

蚂蚁金服服务注册中心如何实现 DataServer 平滑扩缩容 | SOFARegistry 解析:https://segmentfault.com/a/1190000022311465

JAVA多线程,如何设置等待线程执行完毕,才可执行主线程:https://www.jianshu.com/p/962bc7225ce8

4.SOFARPC 已支持使用 SOFARegistry 作为服务注册中心

https://www.sofastack.tech/projects/sofa-rpc/registry-sofa/

5.疑问:

5.1.https://www.sofastack.tech/blog/sofa-registry-introduction/

6.了解

通过扩容dataserver来解决服务数据量(注册信息)大的问题;

SOFARegistry 中文文档https://www.bookstack.cn/read/SOFARegistry/96322

注册格式1:

receive data success, dataId: com.alipay.test.demo.thread-1:1.0@DEFAULT, data: DefaultUserData{zoneData={DEFAULT_ZONE=[10.10.1.1:12200?xx=yy, 10.10.1.1:12200?xx=yy, 10.10.1.1:12200?xx=yy]}, localZone='DEFAULT_ZONE'}

注册格式2:

  1. receive data success, dataId: com.alipay.test.demo.thread-1:1.0@DEFAULT, data: DefaultUserData{zoneData={DEFAULT_ZONE=[10.10.1.1:12200?xx=yy]}, localZone='DEFAULT_ZONE'}
  2. receive data success, dataId: com.alipay.test.demo.thread-2:1.0@DEFAULT, data: DefaultUserData{zoneData={DEFAULT_ZONE=[10.10.1.2:12200?xx=yy]}, localZone='DEFAULT_ZONE'}

 

7.ERROR:

(1)registry-session/logs/registry/session/common-error.log

  1. [2020-11-09 17:06:16,573][ERROR][SessionScheduler-connectMetaServer-6-thread-1][MetaNodeExchanger] - MetaNode Exchanger connect channel error!url:URL{address='ip:9610'}
  2. java.lang.RuntimeException: Bolt client connect server got a RemotingException!
  3. at com.alipay.sofa.registry.remoting.bolt.BoltClient.getChannel(BoltClient.java:171)
  4. at com.alipay.sofa.registry.server.session.remoting.MetaNodeExchanger.connectServer(MetaNodeExchanger.java:132)
  5. at com.alipay.sofa.registry.server.session.scheduler.ExecutorManager.lambda$startScheduler$10(ExecutorManager.java:227)
  6. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  7. at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  8. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  9. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  10. at java.lang.Thread.run(Thread.java:748)
  1. [2020-11-09 17:06:21,173][ERROR][SessionScheduler-renewData-3-thread-3][AbstractClientService] - Fail to connect ip:9614, remoting exception: com.alipay.remoting.exception.RemotingException: Create connection failed. The address is ip:9614.
  2. [2020-11-09 17:06:21,173][ERROR][SessionScheduler-renewData-3-thread-3][RaftClient] - Refresh leader failed
  3. java.lang.IllegalStateException: Refresh leader failed,error=Fail to init channel to ip:9614
  4. at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:150)
  5. at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:141)
  6. at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.getLeader(RaftClient.java:179)
  7. at com.alipay.sofa.registry.server.session.node.RaftClientManager.getLeader(RaftClientManager.java:116)
  8. at com.alipay.sofa.registry.server.session.node.SessionNodeManager$1.getRequestUrl(SessionNodeManager.java:89)
  9. at com.alipay.sofa.registry.server.session.remoting.MetaNodeExchanger.request(MetaNodeExchanger.java:74)
  10. at com.alipay.sofa.registry.server.session.node.SessionNodeManager.renewNode(SessionNodeManager.java:94)
  11. at com.alipay.sofa.registry.server.session.scheduler.ExecutorManager.lambda$startScheduler$8(ExecutorManager.java:214)
  12. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  13. at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  14. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  15. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  16. at java.lang.Thread.run(Thread.java:748)
  1. [2020-11-09 17:06:21,590][ERROR][SessionScheduler-connectMetaServer-6-thread-1][BoltClient] - Bolt client connect server got a RemotingException! target url:URL{address='ip:9610'}
  2. com.alipay.remoting.exception.RemotingException: Create connection failed. The address is ip:9610
  3. at com.alipay.remoting.DefaultConnectionManager.create(DefaultConnectionManager.java:513)
  4. at com.alipay.remoting.DefaultConnectionManager.doCreate(DefaultConnectionManager.java:805)
  5. at com.alipay.remoting.DefaultConnectionManager.access$000(DefaultConnectionManager.java:52)
  6. at com.alipay.remoting.DefaultConnectionManager$ConnectionPoolCall.call(DefaultConnectionManager.java:744)
  7. at com.alipay.remoting.DefaultConnectionManager$ConnectionPoolCall.call(DefaultConnectionManager.java:710)
  8. at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  9. at com.alipay.remoting.util.RunStateRecordedFutureTask.run(RunStateRecordedFutureTask.java:39)
  10. at com.alipay.remoting.DefaultConnectionManager.getConnectionPoolAndCreateIfAbsent(DefaultConnectionManager.java:602)
  11. at com.alipay.remoting.DefaultConnectionManager.getAndCreateIfAbsent(DefaultConnectionManager.java:463)
  12. at com.alipay.remoting.rpc.RpcClient.getConnection(RpcClient.java:419)
  13. at com.alipay.sofa.registry.remoting.bolt.BoltClient.getBoltConnection(BoltClient.java:138)
  14. at com.alipay.sofa.registry.remoting.bolt.BoltClient.getChannel(BoltClient.java:164)

(2)hash算法分片,虚拟节点是什么意思?

https://www.sofastack.tech/blog/sofa-registry-introduction/

(3)data的性能:

跟什么有关呢?什么存储原理呐?

(4)断连指的那里?

是否断连是指的吗?

没有断连,但data挂了,是无法感知的?

8.查看性能用到的Linux命令:

(1)ps -aux --sort -pmem  #-aux 按照CPU或者内存用量来筛选进程(http://noahsnail.com/2017/02/21/2017-02-21-Linux%E7%9A%84ps%E5%91%BD%E4%BB%A4/

输出格式:USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

(2)ps -auxf | sort -nr -k 4 | head -10  #找出占用内存最多的前十个进程;

(3)修改JAVA进程的CPU和内存使用大小,通过执行java -Xmx4096m  ................等命令即可;

 

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/125619?site
推荐阅读
相关标签
  

闽ICP备14008679号