The daily operation of the website always involves upgrading and maintaining the system.And after AnQiCMS (AnQi CMS) is upgraded, we sometimes encounter the situation where the background interface is "unmoving", or the project is directly **, refusing to start.Don't panic, as an experienced website operations expert, I know this anxiety well, and I am also clear that the solution to these problems is not complicated.Today, I will come and give you a detailed analysis of how we should calmly respond when these situations occur after AnQiCMS is upgraded.
Does the background interface not update after the upgrade? It may be these 'little guys' causing trouble
The website upgrade should be an eagerly anticipated event, signifying new features and more stable performance. However, if the back-end interface remains unchanged after the upgrade, it indeed leaves people scratching their heads.In fact, this is mostly not a big problem with AnQiCMS itself, but several 'little guys' are causing trouble behind the scenes.
Firstly, the most common cause isBrowser cache.Your browser will store the content of visited web pages (including JS, CSS, etc.) locally to speed up loading.When AnQiCMS is upgraded, especially when the backend interface is updated (for example, AnQiCMS v2.1.0 version has replaced the new backend management interface), the browser may still be loading the old cached files, causing you to see the old interface.
Solution:Simple and direct. Try to force refresh the browser (usually in Windows system)Ctrl + F5, on macOS isCmd + Shift + R)。If invalid, it may require a more thorough clearing of the browser cache and cookies.Different browsers have slightly different operation paths, but they are mostly the same. Usually, you can find the 'Clear browsing data' option in 'Settings' or 'History'.After cleaning, log in to the AnQiCMS backend again, and you will likely see a fresh interface.
Secondly, if the background interface still does not update after clearing the browser cache, then consider that the old process may still be running.The old process may still be running.
Solution:This is when you need to manually restart the AnQiCMS service.If you are deploying on Baota panel, 1Panel, or other visual management tools, usually find the AnQiCMS service in the corresponding Go project or Docker container management interface, and select the 'Restart' operation.These panels will usually help you automatically stop old processes and start new ones.
If you manually deployed via the command line, usually there will be astart.shScript to start AnQiCMS. In this case, you need to manually stop the old AnQiCMS process first, then run itstart.shHow to start a new process? Usually, it can be stopped bykillcommand, combined withlsoforps -efto find the process ID (PID) of AnQiCMS.
For example, to find the process that occupies the default port 8001 of AnQiCMS:lsof -i:8001After finding the process ID (PID), usekill -9 PIDCommand forces termination of the process. Then, run your startup script (such as./start.sh) or directly execute the binary file of AnQiCMS to take over the service.
Project start exception? Step by step troubleshooting, the problem is nowhere to hide
When AnQiCMS is upgraded, the project fails to start directly, and the website is inaccessible, which is often a more serious problem.But this is not the end of the world. We can investigate step by step like detectives and ultimately leave no room for the problem to hide.
First and foremost, the most important step is toCheck the AnQiCMS operation log. AnQiCMS during the startup process, if an error occurs, it will usually output or write to the console log file. If you usestart.shscript starts, the log is usually redirected torunning.log(Referencestart.shIn the scriptnohup $BINPATH/$BINNAME >> $BINPATH/running.log 2>&1 &).Read the error messages in the log carefully, often you can directly locate the problem, such as database connection failure, configuration error, missing files, etc.
Second,Port conflictOne of the common causes of project startup failure.Especially when installing multiple AnQiCMS instances on the same server, each instance needs to occupy a different port.If you don't notice this during the upgrade process, or if other programs are using the port required by AnQiCMS (default is 8001), AnQiCMS will not be able to start.
Solution:Uselsof -i:{端口号}(For example)lsof -i:8001command to check which process is using the port. If another process is found to be using it, you can choose to terminate that process (kill -9 PID),or modify the AnQiCMS configuration fileconfig.json,“portChange the parameter to an unused port number, and then restart AnQiCMS.
Moreover,Database connection issueIt may also cause the startup to fail. Upgrading AnQiCMS sometimes comes with changes in the database structure, or incorrect database configuration information may be entered during a new installation.Solution:Checkconfig.jsonFile database connection configuration, make sure the database type, host address, port, username, password, and database name are all correct.Also, confirm that the database service itself is running properly, for example, whether the MySQL service has been started.Ensure that the MySQL container is running normally if using Docker to deploy MySQL.
In addition,File or directory permission issueIt is also a common fault point on Linux servers.Especially after manually uploading or extracting the AnQiCMS installation package, if the file and directory permissions are not set correctly, AnQiCMS may not be able to read the configuration file or write logs, which may cause the startup to fail.Solution:Ensure the user running AnQiCMS (usually)wwwUser or the one you customize has read and write permissions for the AnQiCMS installation directory and its subdirectories. You can usechmod -R 755 /path/to/anqicmsandchown -R www:www /path/to/anqicms(Please enter the)/path/to/anqicmsReplace the actual installation path with your installation path to correct the permissions.
Finally,Configuration fileconfig.jsonformat errorIt may also confuse AnQiCMS when it starts up.Although AnQiCMS's configuration is relatively simple, JSON format has strict syntax requirements, such as missing commas, mismatched quotes, and unclosed braces, all of which can lead to parsing failure.Solution:Check with an online JSON validation toolconfig.jsonIs the file syntax correct? Even the slightest spelling error can cause the startup to fail.
Prevention first: Make the upgrade process smoother.
To avoid the occurrence of these problems, some good operational habits and preventive measures are crucial:
- Backup, backup, and backup:Be sure to backup AnQiCMS program files and database before performing any upgrade operations.This is the golden rule of any system upgrade, which allows you to walk away unscathed even in the worst-case scenario.
- Read the update log and upgrade guide:AnQiCMS
changelog.mdDetails of updates for each version will be recorded.Especially for major version upgrades, developers usually provide detailed upgrade guides.Read these documents carefully to get an advance understanding of potential issues and precautions. - Restart after clearing cache:After the upgrade, it is recommended to get into the habit of clearing your browser cache first, and then restarting the AnQiCMS service. This ensures that you are using the latest version of the program and interface.
Mastered these knowledge and skills, believe that you can calmly deal with any 'little incident' after the upgrade of AnQiCMS, ensuring the continuous stable operation of the website.
Common Questions (FAQ)
Why does the backend interface not change after I upgrade AnQiCMS according to the steps? Answer:This is usually due to the browser cache not being cleared, the browser is still loading old interface files. It is recommended that you try to force refresh the browser (Windows press
Ctrl + F5, macOS pressCmd + Shift + R),or completely clear browser cache and cookies.If it still does not work, please check if the old AnQiCMS program process has been stopped and restarted correctly, and ensure that the new version of the program is effective.Question: When AnQiCMS starts, it prompts that the port is occupied, how can I solve it? Answer:Port conflict is a common startup issue. You can use
lsof -i:{端口号}(For example)lsof -i:8001)Command to find the process that uses the port required for AnQiCMS. After finding the process ID (PID), usekill -9 PIDTerminate the command. Then, you can try to restart AnQiCMS. If you want to solve this problem long-term, you can modify AnQi