The difference between the request time and the current time is too large

The difference between the request time and the current time is too large

When I was debugging a project recently, I always reported an error when I logged in, because I was authorized by WeChat to log in, and I had to get the WeChat avatar and upload it to the server, where I always reported an error inexplicably.

Solution process

  1. At first, when I read the error report, I found that the library field could not be "null";
    insert image description here
  2. So I went to check the code logic, added a default avatar, and tested it several times offline. When I found no problem, I submitted the code. When I updated the project to the test server, I would report an error again when I went to test and log in; it was very strange
    . Not to mention, the offline bugs have just been solved, and when it goes online, there are a bunch of bugs again.
  3. I was very puzzled. After reading the logs, I found that the error of "null" was still reported insert image description here
    . , simply speaking, it is the time difference problem of the Linux server. When the cause of the error is found, find a solution in a targeted manner, directly use the Linux synchronization time command to solve the problem, and then test, and find that the login is successful, and the problem is solved.

self reflection

1. When encountering an error report, you must be careful when reading the log;
2. For development, you must master the technology of the Linux operating system to a certain extent.

Reference URL

1. Summary of Linux system time synchronization method

Guess you like

Origin blog.csdn.net/qq_44726330/article/details/118155042