markbaaijens / rpmusicserver

Transform a Raspberry Pi in a music server with LMS (Squeezebox), Samba, transcoder, etc.
GNU General Public License v3.0
5 stars 0 forks source link

Bug: if hostname cannot be resolved, then change external links to ip-address #131

Open markbaaijens opened 2 years ago

markbaaijens commented 2 years ago

External links to LMS, Transmission en SyncThing are hard-coded pointing to hostname rpms, (local) DNS will take care to resolve them to a real ip-address. But sometimes, the local DNS denies resolving hostnames. Thus, the external links must point to a ip-address, which is the address of the Pi it self to be functional.

Steps to reproduce

Notes

Find out a way to reproduce this in a network with proper/working (local) DNS. But is there a way? From the host it self, try ping (hostname). This probably always returns a valid result b/c the host it self will resolve the name to an ip-address.

If there is really no way to determine that DNS is not working correctly, always transform the external links to ip-address without prior testing.

Detect if local DNS is working

nslookup rpms | grep "SERVFAIL

Tasks

Related to https://github.com/markbaaijens/rpmusicserver/issues/120

markbaaijens commented 2 years ago

Some research to be done (on the host (rpms) it self in the problematic network):

markbaaijens commented 1 year ago

Apparantly, the code does not work. When executed nslookup rpms | grep "SERVFAIL on a site with failing local DNS, the respons is what is expected. But the built in code in logic.py, does not return the wanted effect, it is not clear why. What is needed here is debugging on site.