1

On a freshly installed Fedora Workstation running the default Workstation spin which installs Gnome. I'm having problems getting to a web server on the LAN with my browser. The commands curl and ping also do not work from the workstation. However, everything is working fine from other machines on the same network (also Linux). I'm out of things to try on the new machine. What else can I troubleshoot?

$ ping mywebserver.mydomain.local
ping: unknown host myserver.mydomain.local

$ curl -XGET http://mywebserver.mydomain.local
curl: (6) Could not resolve host: mywebserver.mydomain.local

However, nslookup resolves the IP

$ nslookup mywebserver.mydomain.local
Server:     192.168.1.2
Address:    192.168.1.2#53

mywebserver.mydomain.local
Name:   mywebserver.mydomain.local
Address: 192.168.1.24

Additionally, if I use curl or ping with the IP address, it works

$ curl -XGET http://192.168.1.24
<gets HTML>

$ ping http://192.168.1.24
<works>

The host command also resolves:

$ host mywebserver.mydomain.local
mywebserver.mydomain.local has address 192.168.1.24

I can ping and curl foreign servers:

$ ping www.google.com
<works>

$ curl -XGET http://www.google.com
<works>

Other clues...

  • mywebserver is the name in the DNS A record for that server. It only serves one web site.
  • I have 2 other web sites hosted on the LAN. I am able to ping the A records, but not curl the the A records. The CNAMEs will not respond to ping nor curl. On other machines, these CNAMEs and A record names will respond to ping and curl completely.
  • If I ssh into another machine, from there I can ping and curl just fine

Contents of /etc/resolv.conf

# Generated by NetworkManager
search mydomain.local
nameserver 192.168.1.2

Relevant line from /etc/nsswitch.conf

$ grep ^hosts /etc/nsswitch.conf
hosts:      files mdns4_minimal [NOTFOUND=return] dns myhostname mymachines
2

The domain .local is reserved for use by hosts that can be auto-discovered by the mdns protocol (broadcasts on the local network). You might get it working by installing and running avahi, or more simply by removing the mdns4_minimal [NOTFOUND=return] part from your nsswitch.conf. To test an address use eg getent hosts mywebserver.mydomain.local.

  • I had success with your idea. avahi was already installed. I added the gui tools to see what it can auto-discover. It doesn't show the web server. Maybe that means the web servers don't broadcast? In any event, removing the NOTFOUND=return gets it to work, but slowly. Moving mdns4_minimal to the back was the solution for me. – 010110110101 Jun 15 '16 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.