LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-12-2006, 11:45 PM   #1
cronicded
LQ Newbie
 
Registered: Sep 2006
Posts: 14

Rep: Reputation: 0
Unable to resolve via /etc/hosts


Hello,

Recently I've run into an issue trying to install new services to a slack 10.2 machine (updated via slapt-get to current), namely the mysql daemon. When running mysql_install_db the machine reports it is unable to resolve localhost and socrates (the name of the machine). I have hostname set to socrates and my /etc/hosts file contains:
Code:
127.0.0.1   localhost socrates
My /etc/host.conf file contains:
Code:
order hosts, bind
multi on
I have been unable to ping the host names: localhost and socrates, however, I can ping 127.0.0.1 without issue. I had tried rebooting the system (after much googling to no avail I decided I try one of the simplest yet uninvestigative approaches. No resolve.

After much fussing I coldn't figure out my issue, and eventually hammered my /etc/resolv.conf ; it contained:
Code:
nameserver 24.93.41.125
nameserver 24.93.41.126
search austin.rr.com
Removing the search line from resolv.conf all of sudden allowed me to ping localhost and resolved it to LOCALHOST 127.0.0.1 However, I was still unable to resolve any other hosts. Further testing I included bunk entries into /etc/hosts such as : 10.0.0.1 test and/or 192.168.0.56 bleh and could not resolve any hosts. iptables -L includes only a minor IP MASQ/NAT setup and there are no other firewall rules for testing purposes. At this point I am confused as to why removing the search line enabled me to resolv localhost (subsequent reboots re-enter the search austin.rr.com line into my resolv.conf line and produce the same issue with localhost. removing it absolves the issue with resolving localhost) but not other hostnames.

To me, it appears to be some type of polling issue with /etc/hosts but I am completely stumped. Does anyone have any ideas or suggestions?
 
Old 09-13-2006, 12:18 AM   #2
cronicded
LQ Newbie
 
Registered: Sep 2006
Posts: 14

Original Poster
Rep: Reputation: 0
This was resolved with the help of a friend at work. Apparently my /etc/nsswitch.conf file went missing on my machine. Copying from a similar machine resolved the issue. Never would've found it in a million years.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
External Hosts Resolve but Local Hosts Do Not kjm9 Linux - Networking 7 11-19-2005 03:51 PM
Can't resolve hosts at work marie@dk Linux - Networking 4 10-14-2005 03:45 AM
bind & resolve local hosts jingo_man Linux - Networking 7 07-08-2004 02:56 PM
Server cannot resolve any hosts! hydro Linux - Networking 5 02-16-2004 07:57 PM
how to resolve names to IPs WITHOUT /etc/hosts or DNS iggymac Linux - Networking 11 11-13-2001 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration