当前位置:网站首页>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
边栏推荐
- BGP+MPLS综合实验
- [OpenCV from entry to practice] image processing technology [pixel] (the most detailed in the whole network)
- 虚拟现实房产展示系统提前预见未来装修效果
- Redis(十二) - Redis消息队列
- kubernetes affinity, anti-affinity, taint, tolerance
- 金蝶国际:半年亏掉去年一年,疯狂烧钱的商业模式如何持续
- 关于 VS Code 优化启动性能的实践
- Constructors, member variables, local variables
- PIL与numpy格式之间的转换
- MySQL索引常见面试题(2022版)
猜你喜欢

Thread Basics (1)

MySQL联合查询(多表查询)

Linux CentOS8安装Redis6

面试官:设计“抖音”直播功能测试用例吧

zabbix邮件报警和微信报警

5年在职经验之谈:2年功能测试、3年自动化测试,从入门到不可自拔...

What is the most important ability of a programmer?

秒杀系统小demo

A list of 300+ learning resources compiled by senior engineers of the Tao Department (the latest version in 2021)

上海交大牵手淘宝成立媒体计算实验室:推动视频超分等关键技术发展
随机推荐
pl/sql之神奇的嵌套与变量生命周期
TikTok平台的两种账户有什么区别?
Automated operation and maintenance tools - ansible, overview, installation, module introduction
The virtual reality real estate display system foresees the future decoration effect in advance
Important concepts of target detection - IOU, receptive field, hole convolution, mAP
Nacos注册中心的部署与用法详细介绍
MySQL数据表的基本操作和基于 MySQL数据表的基本操作的综合实例项目
5年在职经验之谈:2年功能测试、3年自动化测试,从入门到不可自拔...
Meta公司新探索 | 利用Alluxio数据缓存降低Presto延迟
51单片机外设篇:DS18B20
Redis(十二) - Redis消息队列
为什么4个字节的float要比8个字节的long大呢?
zabbix自动发现和自动注册
Shuttle + Alluxio 加速内存Shuffle起飞
软件测试在职2年跳槽4次,你还在怪老板不给你涨薪?
HCIP第十七天
C语言小游戏——扫雷小游戏
Polar Parametrization for Vision-based Surround-View 3D Detection Paper Notes
ATM系统
如何进行并发数计算(稳定性测试和压力测试)?