getaddrinfo failed - Name or service not known

Unga unga888 at yahoo.com
Tue Nov 19 14:37:48 UTC 2013


> 1) When you say that firefox/ping/dig function as expected, I assume
> that you mean that they function outside of the chroot.
> 

Yes, it works well outside of the chroot.

> Does setting "nameserver 8.8.8.8" (or any other public dns server) in
> the chroot allow your getaddrinfo daemon to work?
> 

No.

cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4 
nameserver 127.0.1.1


> 2) When you say "mount the devfs on chroot/dev" do you mean to
> bind-mount "/dev" on "$chroot/dev"?
> 

cd chroot_dir
mount -o bind /proc proc/
mount -o bind /dev dev/
mount -o bind /sys sys/

/usr/sbin/myServer

The getaddrinfo simply does not work inside the chroot.

Any ideas?

Unga




More information about the ubuntu-users mailing list