Koozali.org: home of the SME Server

DNS - domain not found

Offline bcliburn

  • ***
  • 41
  • +0/-0
DNS - domain not found
« on: December 29, 2006, 10:40:51 PM »
I am having a problem with my DNS; when I type in the address for my main server domain.lan/server-manager I get a page not found error.  I can still type in 192.168.1.1/server-manager and it works fine.  Another interesting thing is that I have a subdomain on another server (www.domain.lan) and that works fine.  I am only having problems with the DNS on my main server, I have installed a few contribs (Awstats, phpadmin etc, nothing out of the ordinary) When I reboot the server it works fine for a couple of weeks.   Could this be caused by a contrib I have installed?  Any ideas on where to start with this problem would be helpfull.  Also I will submit a bug report if need but I don't exactly know even how to explain the problem.  
 :oops:

Offline Gaston94

  • *****
  • 184
  • +0/-0
DNS - domain not found
« Reply #1 on: December 29, 2006, 11:37:43 PM »
Hi,
could you be more precise about your configuration and your problem ?

What is the configuration of your system : server only / server & gateway ?

What are you trying to resolve : name and IP for your lan or IP for Internet

Are you getting an error from the server itself ? from a workstation on the lan,  which resolver is this wkst
using (your sme, any other  DNS server) ?
Are you getting the error every time, after a while, ... ?

Many reason can exists but you are the only one aware of you configuration.

Help us to help you

G.

Offline bcliburn

  • ***
  • 41
  • +0/-0
DNS - domain not found
« Reply #2 on: December 29, 2006, 11:53:13 PM »
Ok, I have 3 SME servers on my LAN One is the Main Server(DNS, Domain Controller etc...) Main server is Domain.lan Server and gateway mode This is the one I am having a problem with.  Everything is being accessed by my local area network. The second server (www.domain.lan) is facing the internet (server and gateway mode)  and the third(nat.domain.lan) is just a testing server.  The second two are just subdomains of the domain controller.  

I am just trying to resolve the IP for the local network.
The funny thing is when I try to access the subdomain www.domain.lan that works fine and it's using the DNS server that I am having the problem with but when I try to access domain.lan I get a page not found error.  This does not happen all of the time.  just once in a while.

I am just trying to narrow down the problem, could it be a problem with the DNS cache on my workstation or on the DNS server.  Or I am wondering if this problem could have been caused by a contrib I have installed.

Is there a way to restart TinyDNS from command line?

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
DNS - domain not found
« Reply #3 on: December 30, 2006, 12:42:29 AM »
The main server knows the other one as a host of a domain.
I guess it needs the "www" to locate the machine in a domain.
You should look how you defined "domain.lan" on the Main server, and the hosts for that domain.

An other way would be to use a template:

create folder /etc/e-smith/templates-custom/etc/hosts
echo "192.168.x.y domain.lan" > \  /etc/e-smith/templates-custom/etc/hosts/30mylan

expand-template /etc/hosts
Sophie from Montréal

Offline Gaston94

  • *****
  • 184
  • +0/-0
DNS - domain not found
« Reply #4 on: December 31, 2006, 05:03:03 PM »
When we are talking about DNS resolution, never say "we cannot access ..." that has no precise meaning
for any system admin.

Sophie made an assumption, you can resolve www.domain.lan but not domain.lan and gave you a correct
workaround.
Anyway, you should not need it if your system is properly configured : a A record is being created for
each Domain as well as A record for the "www", "ftp", "mail", ... , services you configured.

Furthermore, browsers nowdays are smart enough (well that's not my opinion, but some like this) to
add the missing characters "www" or "ftp" in the address bar. That's why it's still difficult to understand
your problem, you do not tell what and when things are wrong.

Let me describe how I think things might be configured :

 main_server.domain.lan is your authoritative DNS server for your local domain (domain.lan) :
   ==> this server is acting as DHCP server for your lan, and as a consequence, all your workstation
   are being configured with this server as DNS
   ==> within Domains configuration from the server manager domain.lan entries are defined as "resolve locally"
   (including www.domain.lan)

Then, you should be able to resolv any hosts configured in your main_server.domain.lan DNS with your private @IPs
and any other hosts over Internet with their public @IPs.

Regarding tinydns management, cou can stop and restart it, this will reinitialize any data in cache. The difference
bettwen a single "restart" and a "Stop and start" is the last choice will also trigger a template regeneration.
Code: [Select]
# /etc/init.d/tinydns restart ## send an update to the service
 # /etc/init.d/tinydns stop && /etc/init.d/tinydns start


G.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
DNS - domain not found
« Reply #5 on: December 31, 2006, 06:15:18 PM »
Quote from: "Gaston94"

Regarding tinydns management, cou can stop and restart it, this will reinitialize any data in cache. The difference
bettwen a single "restart" and a "Stop and start" is the last choice will also trigger a template regeneration.
Code: [Select]
# /etc/init.d/tinydns restart ## send an update to the service
 # /etc/init.d/tinydns stop && /etc/init.d/tinydns start


G.


Gaston, while the rest of your post is completely correct and nice and clear, there are two errors here.

Firstly, tinydns does not use any cache, so restarting it does not (cannot) reinitialize its cache.

Secondly, restart and stop/start are equivalent, and neither of them will trigger template regeneration. In any case, I see nothing here that indicates that tinydns needs to be restarted or that templates need to be regenerated.

Offline Gaston94

  • *****
  • 184
  • +0/-0
DNS - domain not found
« Reply #6 on: January 01, 2007, 02:57:09 PM »
Hi Charlie,
first think, the most important one, I would like to wish you an happy and healthy new year, as well as for any other people working for SME (development team, ... ) 8) .

Then you are definitely right restart and start are doing the same job, I was certainly thinking to something else yesterday.

Quote from: "CharlieBrady"
Secondly, restart and stop/start are equivalent, and neither of them will trigger template regeneration.

Yes it does ;) , the scripts are finally calling the runsvctrl tools and in the tinydns service definition we can retrieve the expand template call
Code: [Select]
[root@mul94 ~]# cat /var/service/tinydns/control/1
#! /bin/sh

/sbin/e-smith/expand-template /var/service/tinydns/root/data
cd "/var/service/tinydns/root" && /usr/local/bin/tinydns-data
[root@mul94 ~]#

 And I do fully agree, restarting the service is useless in bcliburn's case, but this was it's question

Gaston

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
DNS - domain not found
« Reply #7 on: January 01, 2007, 05:40:00 PM »
Quote from: "Gaston94"
Hi Charlie,
first think, the most important one, I would like to wish you an happy and healthy new year


Thanks, and the same to you.

Quote

Quote from: "CharlieBrady"
Secondly, restart and stop/start are equivalent, and neither of them will trigger template regeneration.

Yes it does ;) , the scripts are finally calling the runsvctrl tools and in the tinydns service definition we can retrieve the expand template call
Code: [Select]
[root@mul94 ~]# cat /var/service/tinydns/control/1
#! /bin/sh

/sbin/e-smith/expand-template /var/service/tinydns/root/data
cd "/var/service/tinydns/root" && /usr/local/bin/tinydns-data
[root@mul94 ~]#



You are quite right. I missed ". ./control/1'  in the run script.