Host name lookup failure

Hi,

I have trying to port our application to the QNX 7 Neutrino OS. We use the iMX6 sabrelite board by boundary devices for running the QNX OS. We have been using the bsp image provided by the Boundary devices.

Our application needs to access a web server and so it needs internet connectivity. When I try to ping google.com I get the error “Host name lookup failure”. When I tried to add the resolv.conf to the image, it disappears at the start. Please see the logs below.

mx6x_init_lvds_clock: i.MX6 Dual/Quad silicon rev 1.0 detected, LDB clock source
MMFLAGS=1
Welcome to QNX Neutrino 7.0 on the Boundary Devices i.MX6Q Nitrogen
Starting Watchdog…
Starting Random service …
Starting I2C1,2,3 driver (/dev/i2c1,2,3)…
Starting SD3 memory card driver…
Starting SD4 memory card driver…
Starting NOR flash driver…
Starting CAN bus driver…
Starting RTC utility…
Starting Audio driver…
Starting SATA driver…
Starting Ethernet driver
Path=0 - AHCI (generic)
Starting Network services…
Starting USB Host1 port…
Starting USB OTG port (host mode)…
Starting Screen Graphics…
Starting Block devices detection…

ping google.com

ping: Cannot resolve “google.com” (Host name lookup failure)

ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=48 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=129 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=49 ms

----8.8.8.8 PING Statistics----
4 packets transmitted, 3 packets received, 25% packet loss
round-trip min/avg/max = 48/75/129 ms variance = 2235 ms^2

ls /etc/

dhclient.conf ftpusers pam.d shadow
dvfs group passwd ssh
esh hosts profile system
ftpd.conf inetd.conf services

Hi Naren,

Looking at your boot sequence I see you are starting a SATA driver. Can I assume that means you have a harddisk or Compact Flash card on your system (ie writeable media)?

The files in the boot image are separate from writeable media. Those files are meant for systems without writeable media (ie flash memory only). You can see the list of what’s inside the boot image by looking in /proc/boot (this is the boot image unzipped into memory in a RAM drive).

So when you put resolv.conf into the boot image you should see it in /proc/boot.

If you want it to be in /etc (ie on writeable media like harddrive or CF card) then you’ll have to manually transfer it there (ftp, from a usb drive or just copy the one from /proc/boot).

I hope this explanation helped?

Tim

Hi Tim,

Thanks a lot for the information. Yes, as you said, I have been using the compact flash card as the writable media.

I have mounted the flash and am able to create the /etc/resolv.conf in it. And the host name look up failure is resolved.