Troubleshooting / Slow System Startup
In environments without public network access or with slow network speeds, the system may start up slowly.
Since the images used by DataFlux Func all contain the dataflux-func.com
prefix.
Therefore, when directly using the docker stack deploy
command to start the system, Docker will automatically send requests to dataflux-func.com
to check the images.
However, since 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, you need 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 and compare it:
- In
/etc/hosts
, add an incorrect record:255.255.255.1 dataflux-func.com
- Use the
ping dataflux-func.com
command to confirm that the domain name cannot be accessed - Compare the startup speed using the following commands:
sudo docker stack deploy dataflux-func -c {installation directory}/docker-stack.yaml
sudo docker stack deploy dataflux-func -c {installation directory}/docker-stack.yaml --resolve-image never