Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

icecast2, chroot, dns

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Wed Feb 07, 2007 9:57 am    Post subject: icecast2, chroot, dns Reply with quote

I have some problem with icecast2, chroot and dns. Mad

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 Twisted Evil , debian.

some idea?
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Feb 07, 2007 2:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Thu Feb 08, 2007 3:29 pm    Post subject: Reply with quote

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
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Feb 08, 2007 3:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Thu Feb 08, 2007 4:10 pm    Post subject: Reply with quote

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
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Feb 08, 2007 6:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber