Which AnQiCMS process information are recorded in the `running.log` and `check.log` files, and how can they be used for troubleshooting?

Calendar 👁️ 61

As an experienced CMS website operation personnel of an enterprise, I know the importance of stable operation of the website for content publication and user experience.In daily work, log files are an indispensable tool for diagnosing system health and quickly locating problems.running.logandcheck.logThese two critical log files, each recording different process information, together provide us with valuable clues for troubleshooting system failures.

AnQiCMS process information is inrunning.logandcheck.logThe record in Chinese

When the AnQiCMS system runs on the server, in order to ensure its stability and maintainability, the system will automatically generate and updaterunning.logandcheck.logThese two log files. They each have different responsibilities, recording information at different levels of the process.

check.logThe file mainly records the health check status of the AnQiCMS application process. According to the design of the AnQiCMS startup script, there is usually a scheduled task (such ascrontabRun a check script at regular intervals.This script's core task is to confirm whether the main process of AnQiCMS is running.If the process does not exist, it will try to restart AnQiCMS.check.logThe information recorded, which is the result of these periodic checks, including the timestamp of the check, the name of the AnQiCMS executable file, and whether the system detected the existence of the AnQiCMS process at the time of execution. For example, the log may appearPID check: 0Indicates that the process is not running, orPID check: 1The process is running.This allows us to clearly understand whether the lifecycle management of the AnQiCMS process is normal, whether there is a startup script continuously trying to start the service, and whether these attempts are successful.

running.logThe file records the actual running status of the AnQiCMS main application in more detail. When we go throughnohupWhen the AnQiCMS main program is started, all standard output (stdout) and standard error (stderr) will be redirected and recorded torunning.logHello.This means, any information during the execution of the application, including initialization messages at system startup, normal business operation logs, warning information, and more critical program errors (such as Go language panic stack information), database connection issues, configuration loading failures, routing handling exceptions, etc., will be meticulously recorded in this file.It is the direct manifestation of the internal behavior of the AnQiCMS application, reflecting the problems encountered by the program during runtime or the operations being performed.

How to utilizerunning.logandcheck.logTracing the fault

When an exception occurs on the AnQiCMS website, these two log files are powerful assistants for system troubleshooting.Understanding the content recorded by each and analyzing it in conjunction with actual circumstances can help us quickly locate the root cause.

Firstly, fromcheck.logStart to judge the process management problem.When the website is inaccessible, we should prioritize checking.check.log. By checking the latest log entries, we can determine if the AnQiCMS startup script is running normally. Ifcheck.logThere has been no new record for a long time, or the process is continuously displayed (PID check: 0This may mean that AnQiCMS has not started successfully, or there is a problem with the startup script itself. At this point, we need to checkcrontabwhether the configuration is correct, and the startup scriptstart.shWhether the permissions are sufficient, and whether the internal path configuration is consistent with the actual installation path of AnQiCMS. A common scenario is, ifcheck.logThe script repeatedly attempts to start but the process always fails to maintain, then the problem may be with the AnQiCMS application itself, butcheck.logTell us at least that the "custodian" mechanism at the process management level exists.

Secondly, analyze in depth.running.logLocate internal errors of the application.Ifcheck.logDisplay the AnQiCMS process is started normally, but the website still cannot be accessed, or there are abnormal functions, then the problem is very likely to be in the AnQiCMS application itself. At this time,running.logIt became our most important clue. We should usetail -f running.logCommand to view the latest log content in real time, or backtrack historical logs. Inrunning.logFocus on the following types of information:

  • Error message (Error) and warning message (Warning)These are usually indicated by a specific prefix or color, and are issues reported by the application itself.They may point to configuration errors, database connection failures, timeouts on external service calls, insufficient file permissions, and so on.
  • Stack trace of Go language PanicIf the AnQiCMS application encounters an uncaught severe error (panic in Go language),running.logIt will record the complete stack trace information. This is the key to locating the cause of program crashes, which usually points out the code file and line number causing the crash.
  • Database-related logs: AnQiCMS needs to connect to the database to work properly.running.logMay log database connection failures, SQL execution errors, or slow queries. These are common performance bottlenecks or configuration issues.
  • Port binding conflict: If AnQiCMS tries to listen on a port (default 8001) that is already in use by another program,running.logerror information related to port binding will be recorded. Combinelsof -i:{端口号}The command can further confirm the port occupancy situation.
  • Detailed output in the startup phase.: AnQiCMS prints a series of initialization information during startup, including loading configuration, initializing modules, registering routes, etc. If the program fails at any stage of startup,running.logIt will stop at the last normal log before failure, or directly output the error message.

Combine both to form a complete troubleshooting path.For example, when the website is inaccessible:

  1. Checkcheck.log:Confirm whether the startup script is running AnQiCMS.
    • Ifcheck.logNo updates or the process is always not started: Checkstart.shScript path, permissions andcrontabTask. The issue may be at the system level or in the process management script.
    • Ifcheck.logThe process has started: proceed to the next step, the issue may be at the application level.
  2. Checkrunning.logCheck the actual running status of the application.
    • Ifrunning.logThere are recently updated error messages (such as database connection failure, configuration loading error, port conflict, Go panic): correct the corresponding configuration file, database service, or release the port according to the error prompts.
    • Ifrunning.logThe content is scarce or not updated, butcheck.logThe process has started: this may mean that the application crashed immediately after starting, without having time to output much log, or there is a problem with the log file write permission. At this time, you can try to execute manuallystart.shof the AnQiCMS startup command, observe the terminal output, or checkrunning.logfile permissions.

By the above method, we can make good use of it systematicallyrunning.logandcheck.logThese log files, from process management to the internal application, deeply analyze and solve various problems encountered during the operation of AnQiCMS, ensuring the continuous stable operation of the website.


Frequently Asked Questions (FAQ)

1. Q: AnQiCMS website suddenly stopped working, which log file should I check first?

A: When the AnQiCMS website is inaccessible, you should first checkcheck.logthe file. This file records the periodic health check results of the AnQiCMS process. Ifcheck.logThe AnQiCMS process is not running, or the startup script keeps trying to start repeatedly, then the problem may be at the process management level. Ifcheck.logDisplay the process started normally, but the website still cannot be accessed, so the next step is to checkrunning.logto locate the internal errors of the application.

2. Q:running.logWhat does it mean when "address already in use" error is displayed? How can I solve it?

A:running.logAn "address already in use" error means that AnQiCMS is trying to listen on a port (usually 8001) that is already being used by another program on the server. Solutions to this problem include: first, you can uselsof -i:{端口号}for examplelsof -i:8001)Command to find and terminate the process occupying the port on the Linux system. Moreover, you can also modify the AnQiCMS configuration file(config.json),toportChange the parameter to another unused port on the server and then restart the AnQiCMS service.

3. Q:check.logWhy has there been no update for a long time, or why has the PID detection result inside always been the same?

A:check.logThe system has not been updated for a long time, or the PID detection result is abnormal, which usually indicates that the AnQiCMS health check is being executed.start.shThe script was not executed correctly. This may be due to the following reasons:

  • The crontab task is not configured or configured incorrectly: Check the server'scrontab -eSet, ensure that a task is running every minutestart.shThe script task is correct, and the path is correct.
  • start.shThe script file has insufficient permissions: Make surestart.shThe file has executable permissions (chmod +x start.sh)
  • start.shThe script path is incorrect or dependencies are missingCheck what is defined in the scriptBINPATHandBINNAMEIs it consistent with the actual installation path and executable file name of AnQiCMS.If the script encounters a syntax error or dependency problem during execution, it may also cause it to fail to write logs normally../start.shObserve if there are any error outputs, and check if the log file has been updated to locate the specific problem.

Related articles

What is the specific function and advantage of the `nohup` command in the AnQiCMS startup script?

In the daily operation of AnQiCMS, system stability and reliability are the core.As a high-performance content management system built with Go language, AnQiCMS needs to ensure that its core services can run continuously and without interruption.In the Linux server environment, the `nohup` command plays a crucial role in the startup script of AnQiCMS, ensuring this and providing many conveniences.

2025-11-06

How to configure independent `start.sh` and `stop.sh` scripts for each AnQiCMS multi-site instance?

As an expert deeply familiar with AnQiCMS (AnQiCMS) operation, I understand that you want to implement independent management for each AnQiCMS site instance. In multi-site operations, although AnQiCMS provides powerful built-in multi-site management features, sometimes in order to achieve finer-grained resource isolation, independent process management, or personalized optimization for specific sites, we may need to run each site on an independent AnQiCMS application instance.

2025-11-06

How to avoid PID conflicts between different instances when deploying AnQiCMS across multiple sites?

As an experienced security CMS operation personnel, I am well aware that the stability and efficiency of the system are crucial when managing multiple websites.The AnQi CMS provides strong support for us with its high concurrency characteristics of the Go language and multi-site management features.However, when deploying multiple security CMS instances on the same server, how to properly handle process ID (PID) conflicts to ensure that each instance runs independently and stably is a core issue that needs to be addressed in operations.

2025-11-06

How to adjust the `start.sh` script after changing the executable file name of AnQiCMS in order to continue working?

As an experienced CMS website operation personnel of Anqi, I am well aware of the importance of maintaining the stable operation of the website, especially when adjusting the system's core files.AnQiCMS with its efficiency and lightweight nature in the Go language is widely popular in actual operation.However, any modification to the core components requires meticulous adjustments to ensure the normal operation of the system.Among them, after changing the executable file name of AnQiCMS, the corresponding startup script `start.sh` must also be adjusted for compatibility.

2025-11-06

How to quickly judge whether the AnQiCMS process is running normally through the `check.log` file?

As a senior person who has been deeply engaged in the CMS content operation of AnQi for many years, I am well aware of the importance of website stability to the business.AnQi CMS, with its high efficiency, lightweight nature, and the high concurrency characteristics brought by the Go language, provides a solid foundation for our content management.However, any system may encounter unexpected situations, at this time, it is particularly important to quickly judge whether the core process is running normally.Today, I will explain in detail how to use the `check.log` file, this "heart monitor" built into AnQiCMS, to quickly diagnose the system status.

2025-11-06

What are the potential risks or practices of the AnQiCMS auto-start task configured with `crontab -e`?

As an experienced CMS website operation personnel in the security industry, I am well aware of the importance of the stable operation and continuous availability of content for user experience and business goals.Aqin CMS, with its high concurrency features of the Go language and concise and efficient architecture, provides a solid foundation for content management.However, even such a high-performance system needs a comprehensive operation and maintenance strategy to ensure uninterrupted service.Among them, using `crontab -e` to configure automatic startup tasks is a common method for many AnQiCMS operators to ensure that the application remains online.

2025-11-06

If AnQiCMS fails to start due to configuration errors, will the `start.sh` script try to start it indefinitely?

AnQiCMS (AnQiCMS) as an efficient and stable content management system, its design of the startup mechanism is aimed at ensuring the continuous operation of the service.Regarding your question about whether the `start.sh` script will keep trying to start indefinitely when it fails to start due to configuration errors, my answer is: it will not try indefinitely, but will keep trying to start repeatedly at set intervals until the service runs successfully or manual intervention occurs.

2025-11-06

How to manually check if the PID of AnQiCMS process exists on a Linux server?

As an experienced AnQi CMS operation personnel, I am well aware of the importance of ensuring the stable operation of the core service of the website - the AnQiCMS application itself.In a Linux server environment, it is often necessary to manually check the process ID (PID) to verify that the AnQiCMS process is working normally.This operation is not only a key link in daily maintenance, but also an effective means for preliminary investigation when we encounter website access exceptions.

2025-11-06