当前位置:网站首页>Analysis of port 9848 error at startup of Nacos client (non-version upgrade problem)
Analysis of port 9848 error at startup of Nacos client (non-version upgrade problem)
2022-08-02 06:44:00 【m0_67402564】
I. Background
Many people will report the following error when the Nacos client is started, indicating that the connection to port 9848 has timed out.
I also searched for it myself, and many articles said that it was a version problem. It would be good to upgrade the client to 2.0, but I found that many people still report this error after upgrading.Well, there is no answer on the Internet, so I can only analyze it myself.
Second, analyzing the source code
Find the place where the error is reported GrpcClient.serverCheck() method, then break the point, restart, wait for the following line to be executed, and find that the error is not reported again, and then the startup is successful!
responseFuture.get(3000L, TimeUnit.MILLISECONDS);
After several attempts, no error will be reported as long as the breakpoint is interrupted, and an error will be reported if the breakpoint is not interrupted.
After careful study, requestBlockingStub.request is a non-blocking request, and directly enters after the request
responseFuture.get(3000L, TimeUnit.MILLISECONDS) In the method, this method is to judge whether the above request response is returned. You can look at the logic inside, generally within the 3-second timeout period, it will loop to determine whether the response isReturn, if the timeout does not return, an exception will be thrown.
This is why after hitting the breakpoint, no error will be reported. Hitting the breakpoint will invisibly increase the timeout period. Before judging the timeout method, the response has been returned, and naturally no error will be reported.
Third, whether the startup is successful
Most people, after the error is reported at startup, the project is still successfully started, and the nocas service list is already available, but they are still a little confused when they see the error. Is it really okay?Let's analyze it again, find the source, and report the error method serverCheck, where did it start to call
Follow step by step, find the connectToServer method of this class
Continue to find the place to call the connectToServer method and locate the start method in RpcClient.class
I found that when connectToServer is called, it returns null (that is, it returns null after the previous error is reported), it willRetry three times, generally the connection will be successful the second time, and it will print out Success to connect to serveron start up
So after you start the error report, see if there is a success log below the error log. If there is a success log, it means that it is normal and there is no problem.
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
猜你喜欢
使用jOOQ 3.14合成外键在视图上写隐式连接
Detailed explanation of interface in Go language
[C language] LeetCode26. Delete duplicates in an ordered array && LeetCode88. Merge two ordered arrays
Shell 脚本不同玩法
Introduction to coredns
Redis(十二) - Redis消息队列
目标检测重要概念——IOU、感受野、空洞卷积、mAP
Redis-cluster mode (master-slave replication mode, sentinel mode, clustering mode)
leetcode括号匹配问题——32.最长有效括号
国际顶会OSDI首度收录淘宝系统论文,端云协同智能获大会主旨演讲推荐
随机推荐
Nacos客户端启动出现9848端口错误分析(非版本升级问题)
网安学习-内网渗透4
node安装和配置(node-v12.20.2-x64 ) 以及node版本切换介绍
Smart people's game improvement: Chapter 3, Lesson 2: "Number of Tongtong" (number)
Nacos注册中心的部署与用法详细介绍
股价屡创新低 地产SaaS巨头陷入困境 明源云该如何转型自救?
双重for循环案例(用js打印九九乘法表)
rhce作业
构造方法、成员变量、局部变量
无代码生产新模式探索
上海交大牵手淘宝成立媒体计算实验室:推动视频超分等关键技术发展
点云旋转到参考坐标系方向(最小方向包围盒方法)
[C language] LeetCode26. Delete duplicates in an ordered array && LeetCode88. Merge two ordered arrays
使用TinkerPop框架对GDB增删改查
Redis-----非关系数据库
NPM 安装指定版本包的方法及版本号查看
Luogu mini game Daquan (everyone who uses Luogu must know)
Polar Parametrization for Vision-based Surround-View 3D Detection 论文笔记
leetcode一步解决链表合并问题
selenium + robotframework的运行原理