Troubleshooting / Container Cannot Run Normally
1. Container Keeps Restarting in a Docker Stack Environment
This problem is generally caused by incorrect configuration, firewall rules, and various whitelist settings.
Specifically, it manifests as:
- The page cannot be opened in a browser.
- When using the
sudo docker ps -acommand to view the container list, you may notice that the container keeps restarting. - Running
curl http://localhost:8088locally on the deployment server returns the errorcurl: (7) Failed to connect to localhost port 8088: Connection refused. - The log file continuously outputs error stack information.
Possible causes and solutions:
| Possible Cause | Solution |
|---|---|
| Manually modified configuration but the configuration contains errors | Check the modified configuration files and verify whether the YAML syntax, database connection information, etc. are correct |
| The configuration specifies an external server, but the network is unreachable | Check the firewall, Alibaba Cloud security group settings, database connection whitelist, and other configurations |
| Compatibility issues with the operating system | See Compatibility Issues with the Operating System below |
| Redis does not support the current system's page size | See Redis Does Not Support the Current System's Page Size below |
Compatibility Issues with the Operating System
When using docker logs {Server Container ID}, if you encounter the following or similar error:
| Text Only | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 | |
This may be caused by incompatibility between the current operating system/components and Docker (for example, DataFlux Func 2.x bundles Docker 20.10.8, which may have issues on the latest versions of operating systems).
You can try the following methods to resolve it:
Upgrade DataFlux Func to the latest version. During the upgrade, please allow the installation Script to upgrade the Docker version as well. For details, see Deployment and Maintenance / Upgrade and Restart / Upgrade System
If the latest version of DataFlux Func still has the above issue, users can also download the official Docker binary package and upgrade to a newer version of Docker.
For downloads, please visit the official Docker download page: https://download.docker.com/linux/static/stable/
Or the Alibaba Cloud mirror site: https://mirrors.aliyun.com/docker-ce/linux/static/stable/
For example, on Ubuntu, you can use the following commands to upgrade operating system components:
| Bash | |
|---|---|
1 2 3 | |
Redis Does Not Support the Current System's Page Size
When the official Redis image starts on certain ARM-based operating systems, the error <jemalloc>: Unsupported system page size occurs. See:
- CSDN: Error handling when starting the official Redis container on arm64
- GitHub issue: docker-library/redis/issues/208
2. Container Does Not Exist in a Docker Stack Environment
This problem is generally caused by an incorrect runtime environment.
Specifically, it manifests as:
- Run
sudo docker stack lsand you can seedataflux-func. - Run
sudo docker ps -aand you cannot see the corresponding container. - Run
sudo docker stack ps dataflux-func --no-truncand find that the container status is abnormal.
Possible causes and solutions:
| Possible Cause | Solution |
|---|---|
| Docker installed via Snap | Uninstall the Snap version of Docker, reinstall the official Docker, or use the Docker bundled with the Script |
| Others | You can troubleshoot based on the ERROR column in sudo docker stack ps dataflux-func --no-trunc |
A typical example is no space left on device, which indicates insufficient disk space.
3. Container Cannot Start in a k8s Environment
This problem is generally caused by issues with the host machine / k8s cluster.
The following errors may occur in k8s:
| Text Only | |
|---|---|
1 2 3 4 5 6 7 8 9 10 | |
The following errors may occur in a Func service:
| Text Only | |
|---|---|
1 2 3 4 5 6 | |
This is not a DataFlux Func issue. Please check the host machine / k8s cluster, and if NAS is involved, also check whether the NAS has any issues.