Troubleshooting / Slow System Startup
In environments without public network access or with slow network speeds, the system may experience slow startup issues.
Since all images used by DataFlux Func contain the dataflux-func.com prefix.
Therefore, when directly using the docker stack deploy command to start the system, Docker automatically sends requests to dataflux-func.com to check the images.
However, because the actual network cannot connect, Docker will wait before starting each service until the image check fails.
Given the above reasons, when using the docker stack deploy command to start the system, it is necessary to additionally specify the --resolve-image never parameter to prevent Docker from checking the images.
The command is as follows:
| Bash | |
|---|---|
1 | |
How to Reproduce the Slow Startup Issue?
We can artificially create the slow system startup issue in a normal environment for comparison:
- In
/etc/hosts, add an incorrect record:255.255.255.1 dataflux-func.com - Use the
ping dataflux-func.comcommand to confirm the domain is unreachable - Compare startup speeds using the following commands respectively:
sudo docker stack deploy dataflux-func -c {installation directory}/docker-stack.yamlsudo docker stack deploy dataflux-func -c {installation directory}/docker-stack.yaml --resolve-image never