LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Resolver Error (https://www.linuxquestions.org/questions/linux-networking-3/resolver-error-166978/)

RTT 04-06-2004 03:16 PM

Resolver Error
 
Hi, i'm having problems with resolving hostnames on busybox. Busybox was built statically using glibc-3.2.3.
On my busybox system I have the following (network related) files in /etc :

host.conf
hosts
networks
nsswitch.conf
protocols
resolv.conf
services

contents as follows:

host.conf:
order hosts, bind
multi on

hosts:
127.0.0.1 localhpst

networks:
loopback 127.0.0.0
localnet 127.0.0.0

nsswitch.conf:
passwd: compat
group: compat
hosts: files dns
networks: files
services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
bootparams: files
automount: files
aliases: files

protocols:
too much to mention

resolv.conf:
nameserver 62.31.176.39
nameserver: 194.117.134.19
search

services:
too much to mention.

When I try and ping for example, www.bit-tech.net I get the following:

Code:

# ping bit-tech.net
ping: bit-tech.net: Unknown host

Similarly another example:

Code:

wget http://bit-tech.net/anyfile.blah
wget: bit-tech.net: Unknown host


IP addresses work fine, and the machine in question is even able to sucessfully act as a webserver. If i add an entry for bit-tech.net into /etc/hosts, then pinging bit-tech.net works fine, so i know the hosts file is acting as it should!
Is there something i need to compile into my kernel?

Any help appreciated, i've spent all day trying to sort this out. :confused: :confused:

AutOPSY 04-06-2004 03:38 PM

search (your ISPS NAME HERE)

RTT 04-07-2004 06:15 AM

doesn't work either :( is there something i have missed and not compiled into my kernel?

maxut 04-07-2004 06:51 AM

check the system logs. is there anything wrong?

try nslookup like this:

[root@linux root]# nslookup
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> set q=any
> server 212.58.4.2
Default server: 212.58.4.2
Address: 212.58.4.2#53
> bit-tech.net

can u get the answer on your screen about bit-tech.net?

RTT 04-07-2004 01:19 PM

Fixed it - i'll explain what I did for the benefit of any others who might happen to come across the same problem.

I'd compiled busybox-1.00-pre8 statically (can't be bothered to go into the reasons why). It seems that glibc attempts to use the libnss_* libraries dynamically even when compiling stuff in static mode.
So I built uClibc and re-built busybox using that, again statically, and all works good now

:cool:


All times are GMT -5. The time now is 11:04 PM.