@
- Nacos cannot restart
- Requesting the service interface will hang up later
- Request the service interface to return for 20 seconds
- Gateway can't get up, and the problem related to the stack is reported by an error
- No core service found
- Requests will be done once for 1 minute before returning
background
The company's two production servers are about to expire, and it is planned to move to Huawei Cloud. It took nearly a month in total, and I have stepped on many pitfalls. Come and record it.
Nacos cannot restart
Before, I used the port number 8848 to close Nacos directly, and then I found that I couldn't start it up. Finally, I found that I needed to execute the script to close it. The command is as follows
sh // Close
sh // Start
Requesting the service interface will hang up later
The command I used to start nacos before was thissh -m standalone
Then I found that the interface would hang up in a while, and it would be fine if the service was resented, but it would not take long. Finally, I found out that there was a problem with the command to start Nacos. My old one started it in a stand-alone way.sh
Just start it, it will automatically read the configuration file that you did not modify the name, and the prerequisite for Nacos to run is to run the above MySQL first.
Request the service interface to return for 20 seconds
I tried to request the interface and found that it was returned only after 20s. Every time, it was checked. It was gateway that bound the filter. Just delete it. If you don't need it for the time being, please comment first.
Gateway can't get up, and the problem related to the stack is reported by an error
Finally, it was found that my shop-related service did not go to the test. I first note the configuration code and add it later.
No core service found
In the morning, the core service was not found. I checked the log and said that the request for nacos was not available. 124:8848. I found all the configurations and found that the IP in the cluster was not changed. It was changed. Finally, I found that the memory was insufficient. Just turn off the java service.
Requests will be done once for 1 minute before returning
I had annoyed me for three days, and I had to request core interfaces several times. It would take 1 min before I could return them to me. At first, I thought it was because of mysql, so I found Alibaba Cloud technology and helped me to read the requested timing log. Then I typed the log and found that there was no problem with the requested Mysql return. Then I asked Huawei Cloud to help me see why the Nacos registered are all old intranet addresses, and then helped me change the intranets of both machines to the original intranet addresses. However, the problem with that interface still exists. I even checked the gateway log but there was no result. Then I looked into nginx and finally found that when load balancing to both servers, they were written as external network ips, and the corresponding port number was also the port number belonging to the external network ip. I saw that the security group port number was not opened, and finally I opened the port number normally. After thinking back, I finally realized why the operation and maintenance address before was the intranet address, not the external network address. This actually saved a step to start the port number of the security group. Therefore, in the future, you must use the intranet address as long as you call between the servers, which can save time and effort.
Summarize: There are many pitfalls when migrating the server. You need to focus on mastering the entire access request link, and then refer to the log to observe where the problem points are. Finally, you can locate the problem points.