As an experienced CMS website operation person in the security industry, I know that technical issues are common in the process of deploying and maintaining websites.When we try to deploy the AnQi CMS Docker container in the 1Panel environment, we occasionally encounter installation failures.This is usually frustrating, but most problems can be solved through systematic investigation.AnQi CMS, with its efficiency, security, and ease of use brought by Go language, is the preferred choice for enterprise content management, and ensuring its smooth operation is crucial.
Understand the 1Panel and Docker deployment process
Before delving into fault diagnosis, we must first review the correct steps for deploying Anqi CMS on 1Panel using Docker.1Panel as a simple and efficient panel, simplifies the management of Docker containers.
Step 1, make sure your 1Panel environment is ready, including the installation of necessary supporting software such as OpenResty and MySQL.This is the underlying service required for the operation of AnQi CMS.
The second step is to create the AnQiCMS Docker container. You need to specify the container name in the 1Panel container management interface (such asanqicms), and manually enter the image nameanqicms/anqicms:latestand set port forwarding. The container uses the default port8001port, so it is usually mapped to the server port8001(or any other port you choose for multiple instances), while the container port remains unchanged8001The choice of restart policy is also very important, it determines whether the container will automatically recover after failure.
Step three, configure the reverse proxy site.After creating the container, you need to point your domain to the running AnQiCMS container through the reverse proxy feature of 1Panel.127.0.0.1Plus the server port you mapped for the container, for example127.0.0.1:8001.
Finally, access your domain through the browser to initialize the installation of Anq CMS and set up the administrator account.
Any oversight or anomaly at any stage can lead to installation failure.
Common Docker container creation and startup failures
When a Docker container fails to create or start, the first thing we need to check is Docker itself and the container's configuration.
Image pull failedOne of the most common questions is what Docker images areanqicms/anqicms:latestUnable to pull successfully. This may be due to an unstable server network connection or restricted access to the mirror source. You can try to manually execute it in the server command line.docker pull anqicms/anqicms:latestTo test network connectivity.If the pull fails, check the server's network configuration or replacing the Docker mirror accelerator may be helpful.At the same time, please carefully check whether the name of the mirror you entered is accurate and error-free. A spelling error can cause the mirror to be unable to find.
Port conflictThe Docker container needs to map the internal port (default for Anqi CMS is 8001) to a port on the host machine.If the port you specified on the host machine is occupied by other services, then the AnQiCMS container cannot be started.In 1Panel, if you try to install multiple AnQiCMS containers, you must allocate a different server port for each container.lsof -i:<端口号>Check. If you find that the port is occupied, you need to select an unoccupied port for mapping, or end the process occupying the port.
Insufficient resourcesAlthough AnQi CMS is a lightweight and efficient system, the operation of Docker containers still requires certain system resources.If your server's memory or CPU resources are severely insufficient, the Docker container may fail to start normally.Check the server's load situation on the 1Panel resource monitoring interface and allocate resources reasonably when creating containers to avoid such problems.
Docker service exceptionIf the Docker service itself is not running properly, all containers dependent on Docker will not be able to start.In 1Panel, the status of the Docker service can usually be viewed through the interface.journalctl -u dockerGet more information.
Reverse proxy configuration and website access issues
Even if the Docker container runs successfully, if the reverse proxy configuration is incorrect, your website may also not be accessible through the domain name.
Incorrect proxy addressThe reverse proxy is the bridge connecting your domain to the backend running container.Make sure the reverse proxy address you set in 1Panel accurately points to the host IP and port of the AnQiCMS container mapping.8001Port, the proxy address should be127.0.0.1:8001A small numerical error can cause a "502 Bad Gateway" or "Unable to access this website" error.
Domain name resolution issueYour domain must be correctly resolved to the IP address of the 1Panel server.After configuring the reverse proxy, please check your DNS records to ensure that the A record or CNAME record has taken effect.The DNS change may take some time to take effect globally.
Server firewall or security groupSometimes, the server's firewall (such as the one on Linux)firewalld/ufwOr cloud service provider's security group rules may block external requests from accessing the mapped ports.Make sure you have opened ports 80 (HTTP) and 443 (HTTPS) for the website in 1Panel, and the firewall on the server itself also allows traffic through these ports.
Initialization failure of AnQi CMSWhen you first access AnQi CMS through a domain and try to perform an initial installation, you may encounter database connection issues or administrator account setup issues.
- Database connection error: AnQiCMS needs to connect to the MySQL database.Please carefully check whether the database name, username, and password you entered in the initialization interface are consistent with the MySQL container information deployed in 1Panel.
rootUser password, this is automatically generated when installing MySQL in 1Panel and needs to be manually copied.Sometimes, the database user may not have sufficient permissions to create a new database, and it is recommended to manually create the database in MySQL in advance. - admin password requirementsAccording to the AnQiCMS installation instructions, the administrator password may need to meet certain complexity requirements. If the password set is too simple, the system may refuse to install.
- Check 1Panel app store statusIn the 1Panel app store, check the installation status of AnQiCMS. It may provide specific error messages or log links to help you locate the problem.
Tools and methods for in-depth diagnosis
When surface phenomena cannot locate the problem, we need to use more professional tools for in-depth diagnosis.
Check Docker container logsThe logs of Docker containers are the gold information source for troubleshooting.In the container management interface of 1Panel, select your AnQiCMS container, there will usually be a 'Log' or 'Logs' option, click to view the real-time output of the container.These logs will detail the startup process, encountered errors, and database connections of the AnQiCMS application.docker logs <容器ID或名称>To check.
Check Docker container statusOn the container list page of 1Panel, check if the status of AnQiCMS container is 'Running'.If the status is abnormal (such as "stopped" or "restart failed"), click the container details to view more diagnostic information.
Network connectivity testYou can use within the server, by the waycurl 127.0.0.1:<容器映射的端口>Test if the AnQiCMS container is accessible on the host machine.If this command fails, it means there is a problem with the container itself or its connection to the host machine's network.If successful, the issue may lie with the reverse proxy or external network access.
Frequently Asked Questions (FAQ)
Ask: Why can't I access my AnQiCMS website after installing it on 1Panel?Answer: This could be caused by various reasons.First, please check if your domain has been correctly resolved to the server IP.127.0.0.1:8001)。Ensure that the firewall of the server (including the security groups of the cloud service provider and the firewall rules of 1Panel itself) is already open for ports 80 and 443 to allow external traffic to access your website.Finally, you can view the Docker container logs to get more specific error information.
Ask: How to view the running logs of AnQiCMS Docker container in 1Panel?Answer: You can easily view Docker container logs through the 1Panel user interface.Log in to the 1Panel panel, click the 'Container' menu on the left, and then select the 'Container' tab.Find your AnQiCMS container in the container list, click its name or the 'Details' button next to it.In the container details page, you will usually find an option for "Logs" or "Logs", click it to view the real-time operation logs of the AnQiCMS container, which are very helpful for diagnosing problems.
Ask: I need to install multiple AnQiCMS sites on a server, how should I configure to avoid conflicts?Answer: To install multiple AnQiCMS instances on 1Panel, you need to assign a unique server port and domain name to each instance.When creating a Docker container, map the internal 8001 port of each AnQiCMS container to different, unused server ports on the host machine (for example, the first one to 8001, the second to 8002, and so on).127.0.0.1:8001,127.0.0.1:8002This ensures that there is no port and domain conflict between different AnQiCMS instances, thus achieving multi-site management.