Local DNS server not working (title changed)

I’m trying to set up the RC build on a rPI B+. I have my library on a MySQL server. I copied my advancedsettings.xml file from my other raspbmc install onto this OSMC build. I don’t get the movies tab. I changed the server name to use the IP instead and after rebooting it worked.

My DNS server is local (windows 2003 domain network) It’s working from raspbmc without issue. For reference, my Domain Controller, DNS, and MySQL server are all on the same box (IP) The OSMC box is set up as a static IP, and I manually entered a host record in the DNS server for it.

one thing of additional interest is that everything in my library is stored on an smb share. And the database entries refer to this path by dns name of the share. These smb shares are working from OSMC after I just change the MySQL address to use the IP.

My OSMC > Network > what do you have for DNS1 and DNS2 ?

DNS 1 is my local DNS server. DNS 2 is Google 8.8.4.4

I’m also noticing that it’s failing to download thumbs and fan arts for several items. I use xbne to manage my library. It creates NFO files in each folder. Some of these files have URLs for local content on smb shares. Others are http urls. The http ones seem to be failing but the smb ones seem to be working.

let it be known that while I understand networking and technology very well, I am not a Linux guru by any means. Everything I have to do in a Linux console involves googling commands.

nslookup not found. I’m not sure what to do about that. I’m using ping just because it seems like nslookup isn’t available.

it looks like the system is set up to use a local DNS resolver, as I’m seeing the dns server set up as 127.0.0.1. I’m not sure where to go to see how this local resolver daemon is set.

My dns in the gui is set to
10.10.1.x (yes it’s right, and yes it works)
8.8.4.4 (google)

if I ping anything on my local network I get “bad address: [hostname]”
I tried it with the following syntax variants
[hostname]
[hostname].[domain]
[hostname].[domain].local (yes I still use .local as my TLD on the internal domain)
all three pings come back with the bad address response.

if I ping things on the internet, I do get ping responses.

I then tried changing both DNS entries in the OSMC network gui to use the local DNS server. Now everything comes back with bad address.

I really have no idea where to go with it next.

sudo apt-get install dnsutils

now you have nslookup and dig commands.

Have you changed the hostname on your OSMC boxs?

try this
hostname -f
should just say osmc.

you can try to set it all back to default DHCP and nameserver to automatic.

After trying to get the dnsutils package I get a message saying:

Package dnsutils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  bind9-host

Without knowing more, I’m a bit hesitant to install this, since I know bind is a DNS server. I’m not sure what else would come along with this that I may not want.

hostname does give me “osmc” as I would expect. Though I don’t know how the hostname of the osmc machine comes into play. The problem is that osmc isn’t resolving other hosts on the local network.

when googling the above error message, I saw someone suggest to use the “host” command instead of nslookup. So I started playing with that. When I use the command:

host servername

I get nothing

host servername.domain.local

gives me the correct IP address in response.
*I can repeat this for other hosts on the network and get the same results.

ping servername.domain.local

gives me “Bad Address”

ping serverIP

gives me a good ping.

This tells me there is no connectivity problem. But it appears to be a configuration problem on this rPI. Since the host command will resolve an address, but the ping command won’t, is there something going on with the internal resolver?

Is it possible to view/edit the IP and DNS settings from the SSH terminal (not using the OSMC GUI, since I’m remote from it at the moment) They don’t appear to be in the same place as most of my googling is suggesting it should be. (this is where my fuzziness on Linux is slowing me down)

hi

i think your apt database is not up2date… please run “sudo apt-get update”

and then “sudo apt-get install dnsutils”

the packages dnsutils is there in osmc, so if you can’t install that you have another problem on your hands ;-/-…

try these commands:

    connmanctl state
    connmanctl technologies
    connmanctl services

Do you suppose it can’t find the package because it can’t reach out for it due to the DNS issues?

Anyhow, I did the update and now it’s installed.

Here’s the results of those commands:

osmc@osmc:~$ connmanctl state
  State = ready
  OfflineMode = False
  SessionMode = False
osmc@osmc:~$ connmanctl technologies
/net/connman/technology/ethernet
  Name = Wired
  Type = ethernet
  Powered = True
  Connected = True
  Tethering = False
osmc@osmc:~$ connmanctl services
*AR Wired                ethernet_b827ebb1ba8f_cable

I’m thinking the issue is related to DNS search domain for the local network. the lookup works fine when I use the full host.domain.tld name. But if I just nslookup host, it fails.

AHA! I got it.

connmanctl config ethernet_b827ebb1ba8f_cable --nameservers [local DNS server IP][google DNS] [ISP DNS]
connmanctl config ethernet_b827ebb1ba8f_cable --domains [domain.local]

nslookup [any local host name without including domain]
server: 127.0.0.1
Address: 127.0.0.1#53

Name: [the name I was looking for]
Address: [the correct address]

and for good measure, external nslookups still work too.

Now I want to get back to the original problem and change the advancedsettings.xml back to using the hostname rather than IP. That will probably have to wait until I get home though. I’m not sure what I would need to do to restart the Pi remotely for the change to take effect.

I forgot to mention. It looks like we’re going to need a way to enter the domains in the OSMC GUI to configure connman for us.

and a way to reset networking to defaults aka dns/hostname/routes/domains/dhcp…

would be nice yes :wink:

just edit /etc/hosts

IP localdomain

I just set up a second OSMC box to replace my original raspbmc. I found myself in the exact same problem as the last time where I couldn’t resolve local network hostnames. When I googled to see if there were any updates, the top result was this thread. Luckily I posted back my procedure. My own thread ended up helping me!

I just wanted to comment to bump this thread to hopefully see something added to the GUI and/or installer to get the local search domain parameter added so we don’t have to resort to enumerating interfaces and guessing which one is which using the command line.

6 months later, upgrading another unit with a fresh install on a fresh pi 3. Same scenario. Everything was working perfectly until I changed from DHCP to static. I still can connect to the box and everything, but the movies and TV shows sections wouldn’t show. Again it’s back the DNS issue and local search domain. Luckily my post above still shows up as a top google hit for this scenario and I helped myself again.
So i’ll reiterate my request to edit DNS servers (need 3) and add the local search domain via the GUI.