Have trouble with internal DNS (some containers abnormal)

newbacai

Dabbler
Joined
May 21, 2022
Messages
11
Hi,
I've read all related posts and following manual on this. But I still have trouble with it.
Iim running on TrueNAS-SCALE-22.02.1, and I installed plex and netdata named plex and netdata for test in the "Available Applications" page.
To be short, I have troubel in the plex container, but the netdata container is normal. But there's nothing different about network configuration with these two containers.
To make it easier to read and distinguish between the two containers, the commands for the plex container come with a “root@plex", while the netdata container has "bash-5.1".

Confirm DNS configuration​

root@plex:/# cat /etc/resolv.conf
nameserver 172.17.0.10
search ix-plex.svc.cluster.local svc.cluster.local cluster.local
options ndots:5
bash-5.1# cat /etc/resolv.conf
nameserver 172.17.0.10
search ix-netdata.svc.cluster.local svc.cluster.local cluster.local
options ndots:5

Ping container itself​

If I ping itself using "plex" or "netdata", it were both normal:
root@plex:/# ping plex
PING plex (172.16.0.13) 56(84) bytes of data.
64 bytes from plex (172.16.0.13): icmp_seq=1 ttl=64 time=0.041 ms
64 bytes from plex (172.16.0.13): icmp_seq=2 ttl=64 time=0.066 ms
64 bytes from plex (172.16.0.13): icmp_seq=3 ttl=64 time=0.065 ms
bash-5.1# ping netdata
PING netdata (172.17.132.56): 56 data bytes
64 bytes from 172.17.132.56: seq=0 ttl=64 time=0.059 ms
64 bytes from 172.17.132.56: seq=1 ttl=64 time=0.235 ms
64 bytes from 172.17.132.56: seq=2 ttl=64 time=0.193 ms

But if I ping itself using internal DNS hostname (For example, "plex.ix-plex" or "plex.ix-plex.svc.cluster.local" according to the manual), plex failed but netdata not!!!
root@plex:/# ping plex.ix-plex.svc.cluster.local
ping: plex.ix-plex.svc.cluster.local: Name or service not known
root@plex:/# ping plex.ix-plex
ping: plex.ix-plex: Name or service not known
bash-5.1# ping netdata.ix-netdata
PING netdata.ix-netdata (172.17.132.56): 56 data bytes
64 bytes from 172.17.132.56: seq=0 ttl=64 time=0.140 ms
64 bytes from 172.17.132.56: seq=1 ttl=64 time=0.195 ms
64 bytes from 172.17.132.56: seq=2 ttl=64 time=0.199 ms
64 bytes from 172.17.132.56: seq=3 ttl=64 time=0.193 ms

Ping each other​

The results are obvious.
bash-5.1# ping plex.ix-plex
ping: bad address 'plex.ix-plex'
bash-5.1# ping plex.ix-plex.svc.cluster.local
ping: bad address 'plex.ix-plex.svc.cluster.local'
root@plex:/# ping netdata.ix-netdata
PING netdata.ix-netdata.svc.cluster.local (172.17.132.56) 56(84) bytes of data.
64 bytes from netdata.ix-netdata.svc.cluster.local (172.17.132.56): icmp_seq=1 ttl=64 time=0.087 ms
64 bytes from netdata.ix-netdata.svc.cluster.local (172.17.132.56): icmp_seq=2 ttl=64 time=0.133 ms
64 bytes from netdata.ix-netdata.svc.cluster.local (172.17.132.56): icmp_seq=3 ttl=64 time=0.116 ms
64 bytes from netdata.ix-netdata.svc.cluster.local (172.17.132.56): icmp_seq=4 ttl=64 time=0.105 ms
^C
--- netdata.ix-netdata.svc.cluster.local ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3036ms
rtt min/avg/max/mdev = 0.087/0.110/0.133/0.016 ms
root@plex:/# ping netdata.ix-netdata.svc.cluster.local
PING netdata.ix-netdata.svc.cluster.local (172.17.132.56) 56(84) bytes of data.
64 bytes from netdata.ix-netdata.svc.cluster.local (172.17.132.56): icmp_seq=1 ttl=64 time=0.095 ms
64 bytes from netdata.ix-netdata.svc.cluster.local (172.17.132.56): icmp_seq=2 ttl=64 time=0.134 ms
64 bytes from netdata.ix-netdata.svc.cluster.local (172.17.132.56): icmp_seq=3 ttl=64 time=0.135 ms
64 bytes from netdata.ix-netdata.svc.cluster.local (172.17.132.56): icmp_seq=4 ttl=64 time=0.045 ms

Container configuration​

2022-05-23_162617.png
 

newbacai

Dabbler
Joined
May 21, 2022
Messages
11
Supplementary:
Ping IP of plex is normal in netdata container.

I have one more question I want to ask for help. How should I use internal DNS for containers installed via the ”launch docker image“ button?
For example, I created a container named ”nc“ using image "nextcloud:fpm", but the hostname is nc-ix-chart-784b94f444-m5gqg in the container. Ping itself with "nc" failed and "nc-ix-chart-784b94f444-m5gqg" worked.
As for internal DNS hostname, I have tried various combinations but all failed:

nc.ix-nc.svc.cluster.local
nc-nextcloud.ix-nc.svc.cluster.local
nc-ix-chart-784b94f444-m5gqg.ix-nc-ix-chart-784b94f444-m5gqg.svc.cluster.local
nc-nextcloud.ix-nc-ix-chart-784b94f444-m5gqg.svc.cluster.local

But ping netdata with "netdata.ix-netdata" in this container is normal.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Did you make any network changes on the TN Box.
I am seeing similar issues, caused I think by a change in the default gateway of the TN Scale Server.

No idea what to do about it though
 
Top