public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Cannot ping localhost
@ 2007-07-13  1:27 simonchu47
  2007-07-13  5:01 ` Steve Poulsen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: simonchu47 @ 2007-07-13  1:27 UTC (permalink / raw)
  To: linux-omap-open-source

Hi:
I am using an OMAP5912 OSK board, and I have build a
kernal image and root file system running in it.
After booting up, I found that I cannot ping
localhost, but my application needs to chect it.
The error is as following:

# ping localhost
ping: bad address 'localhost'

my U-Boot is 1.1.5, Linux kernel version 2.6.12-omap1,
and BusyBox v1.5.0. I have added /etc/hosts and
/etc/host.conf

# cat /etc/hosts
# Do not remove the following line, or various
programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain
localhost

But it doesn't work. Can anybody tell me why?


      ____________________________________________________________________________________
想及時通知通訊錄裡的所有親朋好友好消息,就來 Yahoo!奇摩電子信箱發簡訊!
http://tw.mobile.yahoo.com/texts/mail.php

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cannot ping localhost
  2007-07-13  1:27 Cannot ping localhost simonchu47
@ 2007-07-13  5:01 ` Steve Poulsen
  2007-07-13  5:36   ` simonchu47
  2007-07-13  5:43 ` Juha Kuikka
  2007-07-13 10:23 ` Ari Saastamoinen
  2 siblings, 1 reply; 6+ messages in thread
From: Steve Poulsen @ 2007-07-13  5:01 UTC (permalink / raw)
  To: simonchu47; +Cc: linux-omap-open-source

Can you ping 127.0.0.1?

Where is your root file system? Do you have any thing working via Ethernet?

Steve Poulsen


simonchu47@yahoo.com.tw wrote:
> Hi:
> I am using an OMAP5912 OSK board, and I have build a
> kernal image and root file system running in it.
> After booting up, I found that I cannot ping
> localhost, but my application needs to chect it.
> The error is as following:
>
> # ping localhost
> ping: bad address 'localhost'
>
> my U-Boot is 1.1.5, Linux kernel version 2.6.12-omap1,
> and BusyBox v1.5.0. I have added /etc/hosts and
> /etc/host.conf
>
> # cat /etc/hosts
> # Do not remove the following line, or various
> programs
> # that require network functionality will fail.
> 127.0.0.1               localhost.localdomain
> localhost
>
> But it doesn't work. Can anybody tell me why?
>
>
>       ____________________________________________________________________________________
> 想及時通知通訊錄裡的所有親朋好友好消息,就來 Yahoo!奇摩電子信箱發簡訊!
> http://tw.mobile.yahoo.com/texts/mail.php
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cannot ping localhost
  2007-07-13  5:01 ` Steve Poulsen
@ 2007-07-13  5:36   ` simonchu47
  0 siblings, 0 replies; 6+ messages in thread
From: simonchu47 @ 2007-07-13  5:36 UTC (permalink / raw)
  To: linux-omap-open-source

Yes, I can, as following:
# ping -c 3 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.8 ms
64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.4 ms
64 bytes from 127.0.0.1: seq=2 ttl=64 time=0.4 ms

--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet
loss
round-trip min/avg/max = 0.4/0.5/0.8 ms

My root file system is on the ROM 0x1000000

--- Steve Poulsen <spoulsen@css-design.us> 說:

> Can you ping 127.0.0.1?
> 
> Where is your root file system? Do you have any
> thing working via Ethernet?
> 
> Steve Poulsen
> 
> 
> simonchu47@yahoo.com.tw wrote:
> > Hi:
> > I am using an OMAP5912 OSK board, and I have build
> a
> > kernal image and root file system running in it.
> > After booting up, I found that I cannot ping
> > localhost, but my application needs to chect it.
> > The error is as following:
> >
> > # ping localhost
> > ping: bad address 'localhost'
> >
> > my U-Boot is 1.1.5, Linux kernel version
> 2.6.12-omap1,
> > and BusyBox v1.5.0. I have added /etc/hosts and
> > /etc/host.conf
> >
> > # cat /etc/hosts
> > # Do not remove the following line, or various
> > programs
> > # that require network functionality will fail.
> > 127.0.0.1               localhost.localdomain
> > localhost
> >
> > But it doesn't work. Can anybody tell me why?
> >
> >
> >      
>
____________________________________________________________________________________
> > 想及時通知通訊錄裡的所有親朋好友好消息,就來
> Yahoo!奇摩電子信箱發簡訊!
> > http://tw.mobile.yahoo.com/texts/mail.php
> > _______________________________________________
> > Linux-omap-open-source mailing list
> > Linux-omap-open-source@linux.omap.com
> >
>
http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> >
> >   
> 
> 



      ____________________________________________________________________________________
設定安全圖章,保護您的 Yahoo!奇摩帳號不被駭客盜用!
http://tw.info.yahoo.com/seal/index.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cannot ping localhost
  2007-07-13  1:27 Cannot ping localhost simonchu47
  2007-07-13  5:01 ` Steve Poulsen
@ 2007-07-13  5:43 ` Juha Kuikka
  2007-07-13 10:23 ` Ari Saastamoinen
  2 siblings, 0 replies; 6+ messages in thread
From: Juha Kuikka @ 2007-07-13  5:43 UTC (permalink / raw)
  To: simonchu47@yahoo.com.tw; +Cc: linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

Hi,

It may be my mail client but it seems that "127.0.0.1" and "localhost" are
on different lines in you hosts file.
It needs to be on one line, for example a line in my hosts "127.0.0.1
localhost".

Also, you may want to verify that /etc/nsswitch.conf contains line that has:
"hosts:             files" on it.

 - Juha

On 7/12/07, simonchu47@yahoo.com.tw <simonchu47@yahoo.com.tw> wrote:
>
> Hi:
> I am using an OMAP5912 OSK board, and I have build a
> kernal image and root file system running in it.
> After booting up, I found that I cannot ping
> localhost, but my application needs to chect it.
> The error is as following:
>
> # ping localhost
> ping: bad address 'localhost'
>
> my U-Boot is 1.1.5, Linux kernel version 2.6.12-omap1,
> and BusyBox v1.5.0. I have added /etc/hosts and
> /etc/host.conf
>
> # cat /etc/hosts
> # Do not remove the following line, or various
> programs
> # that require network functionality will fail.
> 127.0.0.1               localhost.localdomain
> localhost
>
> But it doesn't work. Can anybody tell me why?
>
>
>
>       ____________________________________________________________________________________
> 想及時通知通訊錄裡的所有親朋好友好消息,就來 Yahoo!奇摩電子信箱發簡訊!
> http://tw.mobile.yahoo.com/texts/mail.php
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>



-- 
Madness takes it's toll. Please have exact change.

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cannot ping localhost
  2007-07-13  1:27 Cannot ping localhost simonchu47
  2007-07-13  5:01 ` Steve Poulsen
  2007-07-13  5:43 ` Juha Kuikka
@ 2007-07-13 10:23 ` Ari Saastamoinen
  2007-07-17  6:53   ` simonchu47
  2 siblings, 1 reply; 6+ messages in thread
From: Ari Saastamoinen @ 2007-07-13 10:23 UTC (permalink / raw)
  To: linux-omap-open-source

On Fri, 13 Jul 2007, simonchu47@yahoo.com.tw wrote:

> # ping localhost
> ping: bad address 'localhost'

> 127.0.0.1               localhost.localdomain
> localhost

Is that really TWO lines? Or did email program add that newline?

> But it doesn't work. Can anybody tell me why?

If I remember correctly there is an option to use builtin hostname 
resolver in busybox. Are you using it or are you using resolver offered by 
libc? What libc version you are using? If glibc, are you using dynamic or 
static nss libraries? If dynamic, do you have libnss_files installed? Is 
the nsswitch.conf configured correctly?

-- 
Arzka

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cannot ping localhost
  2007-07-13 10:23 ` Ari Saastamoinen
@ 2007-07-17  6:53   ` simonchu47
  0 siblings, 0 replies; 6+ messages in thread
From: simonchu47 @ 2007-07-17  6:53 UTC (permalink / raw)
  To: Ari Saastamoinen, linux-omap-open-source




> On Fri, 13 Jul 2007, simonchu47@yahoo.com.tw wrote:
> 
> > # ping localhost
> > ping: bad address 'localhost'
> 
> > 127.0.0.1               localhost.localdomain
> > localhost
> 
> Is that really TWO lines? Or did email program add
> that newline?

No, it's the same line.
> 
> > But it doesn't work. Can anybody tell me why?
> 
> If I remember correctly there is an option to use
> builtin hostname 
> resolver in busybox. Are you using it or are you
> using resolver offered by 
> libc? What libc version you are using? If glibc, are

I have tried dnsd of busybox. Do you mean that? I have
never found "nameresolver" option of busybox while
execuating "make menuconfig".


> you using dynamic or 
> static nss libraries? If dynamic, do you have
> libnss_files installed? Is 
> the nsswitch.conf configured correctly?

I have tried to build a test program using
"getaddrinfo"function, which should be called from
glibc. And I printout the return value of the
function. The following is the result:
 
OMAP5912OSK
-2
getaddrinfo() failed: Name or service not known

PS:OMAP5912OSK is the hostname.

My cross compiler is arm-linux-gcc, and the version is
3.3.2. Can anyone tell me how to solve the problem?


> 
> -- 
> Arzka
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
>
http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> 



      ____________________________________________________________________________________
杜絕網路駭客,保障帳號安全 - 馬上設定 Yahoo!奇摩安全圖章http://tw.info.yahoo.com/seal/index.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-17  6:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-13  1:27 Cannot ping localhost simonchu47
2007-07-13  5:01 ` Steve Poulsen
2007-07-13  5:36   ` simonchu47
2007-07-13  5:43 ` Juha Kuikka
2007-07-13 10:23 ` Ari Saastamoinen
2007-07-17  6:53   ` simonchu47

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox