Troubleshooting / Code Cannot Access Specific Domains
In some cases, some domains have no DNS resolution and need to be accessed after modifying hosts.
You can implement this by adding extra_hosts content to the server and all worker-xxx services in docker-stack.yaml.
docker-stack.yaml is located on the host machine at {DataFlux Func installation directory}/docker-stack.yaml
This configuration needs to be added to server and all worker-xxx services; do not miss any.
The specific modifications are as follows:
| YAML | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
After adding the above configuration, it is equivalent to configuring the following content in /etc/hosts:
| Text Only | |
|---|---|
1 2 | |
After modifying the configuration, please restart DataFlux Func