As an expert who deeply understands the operation of AnQiCMS, I know the importance of stable system operation for website business.Determine whether the AnQiCMS process is running normally on the server, which is a basic and crucial task in daily operations.It is crucial to accurately grasp the process status, whether it is to troubleshoot website access failures or to confirm whether the scheduled tasks are effective.
Understand the operation mechanism of AnQiCMS
AnQiCMS is an enterprise-level content management system developed based on the Go language.This means that it usually runs as an independent binary executable file on the server, rather than depending on a web server like Apache or Nginx to interpret and execute scripts (although these web servers are often used as reverse proxies).Therefore, the judgment of whether AnQiCMS is running mainly involves checking whether the executable file of this Go program is active as a background process.
Check process status on Linux server
In the Linux environment, we have a variety of command-line tools that can be used to check the running status of AnQiCMS processes.
The most direct way is to usepscommand combinationgrepto find the executable process of AnQiCMS. Usually, the executable file name of AnQiCMS isanqicms. You can execute the following command in the terminal:
ps -ef | grep anqicms
This command will list all processes containing the string "anqicms". If AnQiCMS is running, you should see something similarroot 1234 1 0 Mar01 ? 00:10:20 /path/to/anqicmsof the output lines, where1234Is the process ID (PID). It should be noted that,grep anqicmsThis command itself will also appear in the results, you need to exclude it. For example, if onlygrep anqicmsThis line indicates that the AnQiCMS process has not started.start.shThe script also uses a similarps -ef | grep '\<anqicms\>' |grep -v grepmethod to accurately search and avoid misjudgment.
Secondly, confirming whether AnQiCMS is listening on its specified port is also an effective method. AnQiCMS uses the default port8001based oninstall.mdandstart.md.lsofCommand to check if the port is occupied and which process is occupying it:
lsof -i:8001
If the command output showsanqicmsThe process occupied8001The port and is inLISTENThe status indicates that AnQiCMS is running and providing services to the outside. If the port is occupied but notanqicmsProcess, or there is no process listening on the port, which indicates that AnQiCMS may not have started or failed to start, and the port may be occupied by other services.
In addition, if you use it in the recommended waycrontabto manage the AnQiCMS startup script (such asstart.sh), then checknohupthe generated log files (such asrunning.logandcheck.log, instart.shInformation that can be provided in the script can offer more details.These logs will record the startup attempt and runtime output of AnQiCMS, helping you understand whether the process is started normally and if there are any error messages.
Determine process status in Docker or containerized environment
If you choose to deploy AnQiCMS through Docker, 1Panel, or aaPanel, the methods to judge its running status will be different, but still intuitive.
In Docker environment, you can directly usedocker pscommands to view all running containers. AnQiCMS containers usually useanqicmsas the image name (such asanqicms/anqicms:latest),You can check the status of the container(STATUScolumn)to determine whether it is inUpstatus。“
docker ps
For users deploying with the 1Panel or aaPanel dashboard, these dashboards typically provide an intuitive user interface for managing and monitoring Docker containers or web applications.You can directly log in to the corresponding panel, find the AnQiCMS application in the "Container" or "Website" management interface, and check its running status.These panels will clearly indicate whether the application is "running" or "stopped", and may provide a quick way to view container logs for troubleshooting.
Determine the process status on a Windows server
To determine the running status of AnQiCMS in a Windows environment for testing or local development, it can be done through the Windows Task Manager.
You can pressWin + Rto input the combination key,taskmgrPress Enter or right-click the taskbar and select 'Task Manager' to open it. In Task Manager, switch to the 'Processes' or 'Details' tab, then find the process namedanqicms.exeThe process. If the process exists and is running, it indicates that AnQiCMS is running on your Windows system.
Final judgment and troubleshooting
The most direct method of user experience judgment for any deployment method is to try accessing your website or the AnQiCMS backend management interface (for examplehttp://yourdomain/system/)。If the page loads normally and the functions respond quickly, then the AnQiCMS process is likely running healthily.If the access fails or an error occurs, then by combining the results of the above command line or panel check, you can more accurately locate the problem.
Frequently Asked Questions (FAQ)
Q1: I usepsThe command seesanqicmsThe process is running, but the website is still inaccessible, why is that?
A1: Even if the AnQiCMS process is running, it is possible that the website cannot be accessed due to various reasons. Common problems include: the server firewall blocking external access to the AnQiCMS port (default 8001); incorrect Nginx or Apache reverse proxy configuration, failing to forward external requests correctly to the AnQiCMS listening port; domain name resolution issues, causing the request not to reach your server; or internal AnQiCMS configuration (such asconfig.jsonofBaseUrlOr the port setting does not match the actual environment, causing it to run but not respond to expected requests.It is recommended to check firewall rules, reverse proxy configuration, and AnQiCMS system settings one by one.
Q2: How to safely restart the AnQiCMS process?
A2: The method to restart the AnQiCMS process depends on your deployment environment. If you are manually throughstart.shThe script starts, so there is usually a配套的stop.shThe script is used to stop the process. You can run it firststop.shStop the process first, and then run itstart.shRestart.In Baota panel or 1Panel and other environments, these panels usually provide 'stop' and 'start' buttons in their application management interface, which can be clicked directly.docker restart [容器ID或名称]The command to restart the AnQiCMS container. Please make sure to save all data before restarting and ensure that the restart operation will not affect any ongoing important tasks.
Q3: What is the default listening port of AnQiCMS? How can I check if it is open to the outside?
A3: According to the AnQiCMS installation document, its default listening port is8001. To check if this port is open on the server, you first need to confirm that the port is not blocked by a firewall. On a Linux server, you can usefirewall-cmd --list-portsorufw statusWait for the command to view the firewall rules. If the port is not blocked by the firewall, you can uselsof -i:8001Command to confirm if there is a process listening on the port. Additionally, from outside the server (such as your local computer), usetelnet your.server.ip 8001The command can also test the accessibility of a port. If the connection is successful, it means the port is open; if the connection fails, it may be due to a firewall or the process not listening.