Closed xirami closed 2 years ago
Hi @ondrejspilka,
The example given in the documentation is not expected to be an exhaustive answer. Our team needs to configure the DNS to an internal DNS server for devices inside the corporate network, but we use a public DNS server for the example.
We place all modules except edgeAgent into a custom bridge docker network named azure-iot-edge
. This lets the user look up modules by name in module code. However, this does affect how DNS works inside the container. It uses Docker's embedded DNS service.
According to the Docker documentation above, the default bridge network will automatically use the host's DNS configuration. If you want to switch to using the default "bridge" network, it's configurable in the config.toml: https://github.com/Azure/iotedge/blob/main/edgelet/contrib/config/linux/template.toml#L400
I am marking this as a "docs" issue because I'm sure our documentation could be more clear on this subject.
Closing this issue, please reopen if you have any follow-up questions. (Closing this issue won't stop this being tracked as a potential documentation improvement.)
Expected Behavior
edgeHub shall takeover system setting of DNS servers. No need to setup docker.json daemon DNS record as indicated in iotEdge FAQ for empty config
Current Behavior
edgeHub can't connect to cloud, so edge receives empty configuration, subsequently error depicted in attached printscreen happens. Especially in environments with transparent proxy but firewall filtering, where particular gateway and DNS is given by customer IT, setting DNS to 1.1.1.1 might fail. Initially, even when system was configured by nmcli, edgeHub was not able to connect. After explicit setting of
/etc/docker/daemon.json
to customer IT provided DNS, all works.Steps to Reproduce
Provide a detailed set of steps to reproduce the bug.
Context (Environment)
N/A
Output of
iotedge check
Click here
![image](https://user-images.githubusercontent.com/3624673/161944015-05228248-d39b-47dd-ab84-1cdc70071638.png)Device Information
Runtime Versions
Logs
aziot-edged logs
```edge-agent logs
```edge-hub logs
```Additional Information
Please provide any additional information that may be helpful in understanding the issue.