As a website operator who deeply understands the operation of AnQiCMS, I know that every system file hides valuable information, especially when the system encounters an abnormal situation, the log files are the key to troubleshooting. When the AnQiCMS process starts, running.logThe content recorded by the file is crucial for debugging PID (Process ID) and troubleshooting startup issues.
running.logThe 'statement' of AnQiCMS process startup.
running.logThe file is the aggregation of all standard output (stdout) and standard error (stderr) during the startup and operation of the AnQiCMS application. According to the AnQiCMS startup script (for examplestart.sh),when the AnQiCMS application is started throughnohup $BINPATH/$BINNAME >> $BINPATH/running.log 2>&1 &command2>&1this redirection instruction means that not only the standard output will be appended torunning.log[en] Standard error will also be redirected to standard output, and then appended together.running.logThus, this file almost contains all visible information generated during the startup and operation of AnQiCMS.
What information is recorded to help with PID debugging?
running.logThe information types contained are diverse, and they collectively constitute key clues for diagnosing the health status and startup of the AnQiCMS process.
Firstly, it records the startup process information of the AnQiCMS application.It will record the startup process information..This usually includes the application version number, the path of the loaded configuration file, and the order of initialization of various modules and components.For example, AnQiCMS may print out 'AnQiCMS vX.X.X starting...' or 'Loading configuration from /path/to/config.' and other configuration loading details.This information helps us confirm whether the application is starting at the expected version and whether the correct configuration is being read.
Secondly,running.logIt will record in detail.It will record the network port binding situation..AnQiCMS as a web content management system needs to listen on specific ports (such as the default port 8001) to provide services.The log usually includes something like 'Listening on :8001' or 'Server started on port 8001', indicating that the application has successfully bound to the specified port and started accepting connections.In PID debugging, if the process fails to start, this information can quickly locate whether the problem is due to the port being occupied.
Furthermore, the status of the database connection is.running.logOne of the highlights. AnQiCMS relies on MySQL database to store data, so it will try to connect to the database when starting. The logs will recordInformation about the success or failure of database connection
In addition, any that occur during the startup or initial running phaseErrors and warningswill be captured and writtenrunning.log.This may include configuration parsing errors, file permission issues, template loading failures, internal component initialization exceptions, and so on.These error messages typically provide detailed stack traces or error descriptions, indicating the specific code location and cause of the problem, greatly shortening the time required to troubleshoot issues.running.logThe last few lines often contain its "last words" before "death", which is the key to locating the fundamental cause.
In short,running.log
Frequently Asked Questions
How to find out after the AnQiCMS process is startedrunning.logIs it working normally?
To determine if AnQiCMS is working normally, you should checkrunning.logThe last few lines.通常,if the startup is successful, the log at the end will display positive prompts similar to “Server started on port XXXX”、“Application is running” or “Successfully initialized all modules”.If the log file has not been updated for a long time, or the last few lines are filled with error or warning messages, it may indicate that the process failed to start normally or there are runtime issues.
Ifrunning.logThe file content is empty or has not been updated for a long time, could be what reasons?
Ifrunning.logThe file is empty, which usually means that the AnQiCMS process has not been started, or there is an error in the log redirection configuration of the startup command. You need to check.start.shDoes the script execute correctly, andnohupcommand and redirection symbols (>>and2>&1Is it configured properly?If the file exists but has not been updated for a long time, it may be that the AnQiCMS process has exited abnormally and has not produced any new output, or the application itself is configured to output logs to another location.start.shrun the script and observe the console for any output, or checkcheck.logthe file to get process check information.
running.logWhich information is most useful to resolve the 'Port already in use' error?
When AnQiCMS fails to start and prompts 'Port already in use',running.logusually includes a clear error message, such as 'Error binding to port 8001: address already in use' or 'listen tcp :8001: bind: address already in use'.This information will directly point out which port is experiencing a conflict.lsof -i:{端口号}To find the PID occupying the port, then decide whether to end the occupying process, change the listening port of AnQiCMS, or adjust the port configuration.