SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=header): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_topmenu.inc' line 5

ClearOS Bug Tracker


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0020421ClearOSapp-docker - Dockerpublic2018-06-20 01:562021-11-11 05:52
ReporterNickH 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionsuspended 
PlatformOSOS Version
Product Version7.4.0 Updates 
Target VersionFixed in Version 
Summary0020421: Docker bypasses any DNS Servers set in ClearOS and uses OpenDNS
DescriptionWhen docker loads, to define its DNS servers it attempts to read /etc/resolv.conf then discounts loopback. As it finds nothing there it falls back to using OpenDNS and generated the following line in the logs:

Jun 14 18:45:58 server dockerd-current: time="2018-06-14T18:45:58.083955517+01:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver 8.8.8.8 nameserver 8.8.4.4]"
Jun 1

Set like this, it is impossible for docker to resolve hostnames of local devices. In ClearGLASS in an environment of mixed cloud and local servers, you would be able to address the cloud servers by FQDN but the local ones would have to be addressed by IP.

The solution is to add a line to /etc/docker/daemon.json between the braces:

"dns": ["172.18.0.1"]

This can be programatically maintained to track the docker0 LAN interface.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016251)
NickH (developer)
2021-11-11 05:52

Migrated to https://gitlab.com/clearos/clearfoundation/app-docker/-/issues/3 [^]

- Issue History
Date Modified Username Field Change
2018-06-20 01:56 NickH New Issue
2018-06-20 07:39 user2 Status new => confirmed
2021-11-11 05:47 NickH Summary Docker bypasses any DNS Servers set in ClearOS and uses OpenVPN => Docker bypasses any DNS Servers set in ClearOS and uses OpenDNS
2021-11-11 05:52 NickH Note Added: 0016251
2021-11-11 05:52 NickH Status confirmed => closed
2021-11-11 05:52 NickH Resolution open => suspended

SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=footer): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_footer.inc' line 7