4

A company I'm working in has a local site, with documentation and etc. where all references are set to "srv-moss" as a domain name, which should be defined in hosts file. I added it there but it doesn't seem to work. Even though I can ping srv-moss just fine, but attempts to open it in Firefox or Chromium results in Server DNS said: Server Failure: The name server was unable to process this query.

What should I do? I tried a bunch of solutions that I found for similar problems, but neither worked for me.

6
  • check /etc/nsswitch.conf for the hosts
    – Raza
    Sep 30, 2014 at 14:15
  • 1
    In Firefox try the Network monitor (Ctrl+Shift+Q) you might see there what requests are made. If that doesn't help, see developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging for guide how to set up the logging and check the resulting log for DNS requests.
    – peterph
    Sep 30, 2014 at 14:20
  • @Raza I am heard about this file, and I have no idea how it is could help me. I think that probably I have to write an aliases in «hosts» line, but what the syntax? I didn't understood it from a manual, neither I could find an examples on the Internet to the case.
    – Hi-Angel
    Sep 30, 2014 at 14:20
  • can you past your /etc/hosts file here ?
    – Raza
    Sep 30, 2014 at 14:32
  • @Raza of course, here it is. But as I did said pinging there works fine, so in the «hosts» file surely no an error.
    – Hi-Angel
    Sep 30, 2014 at 14:38

2 Answers 2

2

If you are behind a proxy check that Firefox has that configured as well. I am behind a proxy and yes, I had to configure Firefox (when I used it) to connect to certain IPs (or aliases). Just insert the exception for srv-moss in the proper Network tab.

If your proxy configured via some kind of a system settings, then there should be an «exceptions» option too. If you're configured a proxy via /etc/environment file, so you have to add there a variables no_proxy="srv-moss", NO_PROXY="srv-moss"(to add more than one exception use a comma as a separator). Don't forget to re-login in the system, so the /etc/environment would be read again.

6
  • Hm. I have a proxy configured via SystemSettings and /etc/environment. But I'll try to configure it via FireFox native settings.
    – Hi-Angel
    Sep 30, 2014 at 14:11
  • Hm… That's interesting: now in the FireFox an error is HTTP Error 401.2. Have no idea why, but I thought that probably in Chromium I could write an exception too — a site main page via IP address in Chromium worked fine. Anyway, I don't understand why both the browsers ignores the /etc/hosts file…
    – Hi-Angel
    Sep 30, 2014 at 14:18
  • You might want to take a look to the file /etc/resolv.conf to check whether there is a DNS server configured or not in that case.
    – Isaac
    Sep 30, 2014 at 14:21
  • No, Chromium have no it's own proxy settings ☹ It is call the system ones, and the system probably supposed to work with /etc/hosts file as an exceptions. And DNS server configured, because I am talking on SO now ☺ Yes, it is. Btw, as the server resides in LAN, I am tried to disable DNS and restart a NIC, and the browser still doesn't saw it via an alias, although could go there via an IP.
    – Hi-Angel
    Sep 30, 2014 at 14:28
  • I have a feelings I am close to solution! As the firefox finally got the site after I added a proxy settings there with an exceptions, so seems that system settings do not cosider aliases in hosts file as an exceptions! And I could ping the site without problem because the ping had never used proxy!
    – Hi-Angel
    Sep 30, 2014 at 14:49
1

You need to make sure your system is configure to use host file for the dns by confirming /etc/nsswitch.conf file. It should look like

   #hosts:     db files nisplus nis dns
   hosts:      files nis dns

You can change the order in which you would like your system to check.

1
  • No, it doesn't worked too ☹
    – Hi-Angel
    Sep 30, 2014 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .