| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Wed Feb 07, 2007 9:57 am Post subject: icecast2, chroot, dns |
|
|
I have some problem with icecast2, chroot and dns.
I need to use the domain (and not the IP address) into the <master server> flag.
I don't understand why that domain is not resolved and so the relay server is not able to connect to the master server. In the error log I received this message:
WARN slave/update_from_master Relay slave failed to contact master server to fetch stream list
or for yp :
EROR yp/send_to_yp connection to http://foo.com/yp/update2.php failed with "Couldn't resolve host 'foo.com'"
In the directory etc the files resolv.conf there is.
I have the same problem in different OS: bsd , debian.
some idea? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Feb 07, 2007 2:04 pm Post subject: |
|
|
You are probably not setting up a complete chroot jail. name resolution uses files like /etc/nsswitch.conf /etc/resolv.conf and various shared libs that are loaded at runtime. You have to make sure you have them available in the jail if you expect that to work. Utilities like strace can be helpful in identifying files that are being checked for at runtime.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Thu Feb 08, 2007 3:29 pm Post subject: |
|
|
| karlH wrote: |
Utilities like strace can be helpful in identifying files that are being checked for at runtime.
karl. |
with strace I have obtained the following messages of error:
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
and important:
connect(6, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
but i'can't resolv it. can you help me? now, i am trying with one debian . |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Feb 08, 2007 3:41 pm Post subject: |
|
|
the 2 access lines are from the runtime linker checking if anything needs to be loaded first and there isn't. The connect line is glibc trying to access the local nscd demon for quick lookups but that isn't running either.
The initial file that needs to exist is /etc/nsswitch.conf, from the hosts entry in there, various modules are loaded at runtime eg /lib/libnss_dns.so.2 which then queries /etc/resolv.conf and then the DNS servers. If those files are not part of your jail then access is not going to work. It really is a Jail.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Thu Feb 08, 2007 4:10 pm Post subject: |
|
|
| karlH wrote: |
the 2 access lines are from the runtime linker checking if anything needs to be loaded first and there isn't. The connect line is glibc trying to access the local nscd demon for quick lookups but that isn't running either.
|
The initial file that needs to exist is /etc/nsswitch.conf, from the hosts entry in there, various modules are loaded at runtime eg /lib/libnss_dns.so.2 which then queries /etc/resolv.conf and then the DNS servers. If those files are not part of your jail then access is not going to work. It really is a Jail.
karl.[/quote]
seeing this output, i think that those files are part of jail
open("/etc/resolv.conf", O_RDONLY) = 3
open("/etc/nsswitch.conf", O_RDONLY) = 3
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/etc/hosts", O_RDONLY) = 3
open("/lib/tls/libnss_compat.so.2", O_RDONLY) = 6
open("/lib/tls/libnss_nis.so.2", O_RDONLY) = 6
p.s. sorry for my bad english. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Feb 08, 2007 6:23 pm Post subject: |
|
|
well I would expect a /lib/tls/libnss_dns.so.2 if your nsswitch.conf file is configured correctly. obviously you need to check the resolv.conf for nameserver entries and nsswitch.conf for dns.
karl. |
|
| Back to top |
|
 |
|