Icecast errors in name resolution
(seen in Icecast 220.127.116.11 (Beta-2.4) and -HEAD)
the user may see error messages such as the following in /usr/local/share/icecast/log/error.log (default location)
[2012-09-06 02:54:40] EROR yp/send_to_yp connection to http://dir.xiph.org/cgi-bin/yp-cgi failed with "Could not resolve host: dir.xiph.org; Unknown error"
This error appears to be related to using the default libcurl resolver, which is blocking, in an application using pthreads. (seen in curl -v 7.27.0, *may also be an issue in other versions)
The error does not appear to be caused by Icecast, HOWEVER an Icecast user may experience this error (which seems to be /lightly/ reported). The user may presume that Icecast has an issue. (So it might be good to mention in the documentation somewhere, or at least appear somewhere in public, such as this space, if somebody else runs into the problem and resorts to a search engine query.) Therefor, perhaps a 'documentation enhancement'.
A solution is to build curl with the c-ares resolver, which is non-blocking and asynchronous.
install c-ares, ie # git clone git://github.com/bagder/c-ares.git # cd c-ares # ./buildconf # ./configure # make -j7 && make install
./configure --with-ssl=/usr/local/ssl/ --enable-ares=/usr/local
to check your curl install for the c-ares resolver: (note c-ares and AsynchDNS)
# curl --version curl 7.27.0 (x86_64-unknown-linux-gnu) libcurl/7.27.0 OpenSSL/1.0.0g zlib/1.2.3 c-ares/1.10.0-DEV libidn/0.6.5 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp Features: AsynchDNS IDN IPv6 Largefile NTLM NTLM_WB SSL libz