In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how to solve the XxlRpcException:xxl-rpc request timeout at timeout problem". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Cause of event
Yesterday, a colleague came to me and said that the XXL-JOB task scheduling system he built did not work, and the call always went wrong (the server returned 500). I hope I can help with it, but to tell you the truth, I have no experience in building XXL-JOB, but since my colleagues have requested it, I have no choice but to take a look at it. The process of solving the problem is quite smooth, but I find that there is very little information on the Internet. So I intend to record the solution process on a blog, hoping to help the students who encounter the same problems.
Solution process
My colleague told me that at first it was suspected that Shiro had intercepted the request for scheduled tasks, but after he commented the code related to Shiro, the request of XXL-JOB still failed (after the request was successful, the timeout error occurred in the title of the second request). Then I checked the request log of XXL-JOB. The HTTP return code of the server is 500. the error log is XxlRpcException: xxl-rpc, request timeout at, which basically eliminates the problem caused by Shiro authentication. The reason is that because Shiro is the authentication framework, if the authentication fails, the error code returned should be an exception of class 401 Unauthorized, but the log of XXL-JOB shows that this is obviously a communication error, is it possible that a related service has been shut down?
With this doubt, I checked the XXL-JOB documentation. If the project uses the call of XXL-JOB, it will introduce the xxl-job-core package, and the xxl client project will use a port to listen and consume the calls sent by XXL-JOB (the port we set is 9999). After I try to start the project, I observe the port occupancy. Port 9999 is normally enabled after the project is started. Then after I manually started using XXL-JOB (the first request was successful), then I checked the port situation and found that port 9999 had been closed, so the problem had been found here. The xxl listening port of the client project was closed, which caused subsequent XXL-JOB requests to fail to respond, so naturally the request timed out, but this obviously didn't look like a program problem, because it had never happened before. It has only recently begun to appear. So I found the official Issue https://github.com/xuxueli/xxl-job/issues/586 of xxl-job in github through the search engine. Through the contents of issue, I saw that the official has informed that it is the version of BUG, and the BUG has been fixed in the new version. Here is the version information I used.
Com.xuxueli xxl-job-core 2.0.0
And I found that this version is hardly used on mvnrepository.
I decisively upgrade the client's xxl-job-core to the latest officially recommended version, with the following code:
Com.xuxueli xxl-job-core 2.0.0
Then start the project, perform the task manually in XXL-JOB, check the port situation, and solve the problem.
This is the end of "how to solve the problem of XxlRpcException:xxl-rpc request timeout at timeout". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.