# DNS broken for single workload: can't resolve '(null)'

**URL:** <https://forums.suse.com/t/dns-broken-for-single-workload-cant-resolve-null/11989>\
**Category:** SUSE Rancher Prime\
**Created:** [October 10, 2018, 10:26am UTC](https://forums.suse.com/t/dns-broken-for-single-workload-cant-resolve-null/11989 "2018-10-10T10:26:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DomiStyle](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/domistyle/32/2032_2.png) [@DomiStyle](https://forums.suse.com/u/DomiStyle)\
**Post date:** [October 10, 2018, 10:26am UTC](https://forums.suse.com/t/dns-broken-for-single-workload-cant-resolve-null/11989/1 "2018-10-10T10:26:26Z")

</div>

Hey,

while upgrading my stacks from Rancher 1.6 to 2.1 I ran into a strange issue.

I deployed nextcloud:13-fpm-alpine as workload + a sidecar for the cronjob and all the other services needed (Redis, MariaDB, …) and everything was looking good.

However, external DNS is broken inside of the Nextcloud container only. The Redis and MariaDB container resolve [rancher.com](http://rancher.com) just fine but the Nextcloud container and sidecar will fail to resolve anything that isn’t a discoverable service.

The output inside of the Nextcloud container looks like this:

```
/var/www/html # nslookup rancher.com
nslookup: can't resolve '(null)': Name does not resolve

nslookup: can't resolve 'rancher.com': Try again

```

Removing `options ndots:5` from resolv.conf will lead to a result but it takes 5-10 seconds:

```
/var/www/html # nslookup rancher.com
nslookup: can't resolve '(null)': Name does not resolve

Name: rancher.com
Address 1: 104.24.16.51
Address 2: 104.24.17.51
Address 3: 2606:4700:20::6818:1033
Address 4: 2606:4700:20::6818:1133

```

This is the only workload where this happens, with the difference being that it has a sidecar and it uses the Nextcloud image. This works fine in both Rancher 1.6 and any other workload in this project/namespace.

Any ideas what could cause this? Does anybody else see this with the image nextcloud:13-fpm-alpine?

---

<div class="post-metadata">

**Author:** ![DomiStyle](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/domistyle/32/2032_2.png) [@DomiStyle](https://forums.suse.com/u/DomiStyle)\
**Post date:** [October 10, 2018, 11:45am UTC](https://forums.suse.com/t/dns-broken-for-single-workload-cant-resolve-null/11989/2 "2018-10-10T11:45:30Z")

</div>

Switching to nextcloud:13-fpm solves this issue, any idea why?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [October 10, 2018, 3:53pm UTC](https://forums.suse.com/t/dns-broken-for-single-workload-cant-resolve-null/11989/3 "2018-10-10T15:53:36Z")

</div>

Alpine uses a different libc then most other base image, which has a different DNS resolver in it with different behaviors and features (mostly not) implemented.

5-10 seconds maybe suggests timeout(s) trying to contact a resolver though.

---

<div class="post-metadata">

**Author:** ![DomiStyle](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/domistyle/32/2032_2.png) [@DomiStyle](https://forums.suse.com/u/DomiStyle)\
**Post date:** [October 10, 2018, 4:57pm UTC](https://forums.suse.com/t/dns-broken-for-single-workload-cant-resolve-null/11989/4 "2018-10-10T16:57:31Z")

</div>

Just tried more Alpine containers and that is indeed the cause.

Is there a way to resolve this? Since there is just a single nameserver the only timeout that could happen is to the Kubernetes internal DNS. Unless Alpine uses something outside of resolv.conf for DNS resolving.
