{"id":1766,"date":"2025-10-24T18:05:06","date_gmt":"2025-10-24T17:05:06","guid":{"rendered":"https:\/\/editjournal.redakt.eu\/faxmodem\/?p=1766"},"modified":"2025-10-24T18:05:06","modified_gmt":"2025-10-24T17:05:06","slug":"icecast-auth-failed-could-not-resolve-host","status":"publish","type":"post","link":"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/servers\/icecast-auth-failed-could-not-resolve-host\/","title":{"rendered":"Icecast: auth to server failed with could not resolve host"},"content":{"rendered":"<h3>The problem<\/h3>\n<p>Consider this configuration in <code>icecast.xml<\/code><\/p>\n<pre><code><mount>\n    <mount-name>\/your-mount<\/mount-name>\n    <authentication type=\"url\">\n        <option name=\"mount_add\" value=\"http:\/\/example.com\/auth_mount\" \/>\n        <!-- ... -->\n    <\/authentication>\n<\/mount><\/code><\/pre>\n<p>... resulting in this error:<\/p>\n<blockquote>\n<p>WARN auth_url\/url_add_listener auth to server <a href=\"http:\/\/example.com\/auth_mount\">http:\/\/example.com\/auth_mount<\/a> failed with Could not resolve host: example.com<\/p>\n<\/blockquote>\n<p>To debug, you <code>wget -O \/dev\/null http:\/\/example.com\/auth_mount<\/code> on the same server and it works file.<\/p>\n<p>That means it's Icecast itself (the daemon) that cannot resolve the hostname. This typically happens because Icecast runs under a different user or chroot environment, or uses a different DNS resolver configuration.<\/p>\n<h3>Check if Icecast is chrooted<\/h3>\n<ul>\n<li>look for <code>&lt;chroot&gt;1&lt;\/chroot&gt;<\/code> in <code>icecast.xml<\/code><\/li>\n<li>run <code>ps aux | grep icecast<\/code> and look for the <code>-b<\/code> flag<\/li>\n<\/ul>\n<h2>Solution<\/h2>\n<p>Icecast needs <code>\/etc\/resolv.conf<\/code>, which when chrooted, would be <code>\/${basedir}\/etc\/resolv.conf<\/code>, where <code>${basedir}<\/code> is the value of paths - basedir in your icecast.xml. Assume it's <code>\/home\/icecast<\/code>.<\/p>\n<p>First, ensure <code>\/etc<\/code> folder exist in chroot:<\/p>\n<pre><code>mkdir -p \/home\/icecast\/etc<\/code><\/pre>\n<p>Then your options are:<\/p>\n<ul>\n<li>\n<p>create a new resolv.conf<\/p>\n<pre><code>echo \"nameserver 1.1.1.1\" > \/home\/icecast\/etc\/resolv.conf<\/code><\/pre>\n<\/li>\n<li>\n<p>copy (duplicate) existing resolv.conf from your host system<\/p>\n<pre><code>cp \/etc\/resolv.conf > \/home\/icecast\/etc\/resolv.conf<\/code><\/pre>\n<\/li>\n<li>\n<p>mount (reuse) resolv.conf from your host system<\/p>\n<p>FreeBSD:<\/p>\n<pre><code>  touch \/home\/icecast\/etc\/resolv.conf\n  mount -t nullfs \/etc\/resolv.conf \/home\/icecast\/etc\/resolv.conf<\/code><\/pre>\n<p>Debian:<\/p>\n<pre><code>touch \/home\/icecast\/etc\/resolv.conf\nmount --bind \/etc\/resolv.conf \/home\/icecast\/etc\/resolv.conf<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>If you use HTTPs for your authentication URL, next thing you are likely to run into would be:<\/p>\n<blockquote>\n<p>WARN auth_url\/url_add_listener auth to server <a href=\"https:\/\/example.com\/auth\">https:\/\/example.com\/auth<\/a> failed with SSL certificate problem: unable to get local issuer certificate<\/p>\n<\/blockquote>\n<p>Using plain HTTP endpoint not only solves the above but also comes with much lower overhead on every connection.<\/p>\n<h3>Related<\/h3>\n<ul>\n<li><a href=\"https:\/\/icecast.imux.net\/viewtopic.php?p=7837\">https:\/\/icecast.imux.net\/viewtopic.php?p=7837<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The problem Consider this configuration in icecast.xml \/your-mount &#8230; resulting in this error: WARN auth_url\/url_add_listener auth to server http:\/\/example.com\/auth_mount failed with Could not resolve host: example.com To debug, you wget -O \/dev\/null http:\/\/example.com\/auth_mount on the same server and it works file. That means it&#8217;s Icecast itself (the daemon) that cannot resolve the hostname. This typically&hellip; <a class=\"more-link\" href=\"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/servers\/icecast-auth-failed-could-not-resolve-host\/\">Continue reading <span class=\"screen-reader-text\">Icecast: auth to server failed with could not resolve host<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[956],"tags":[1266,1265],"class_list":["post-1766","post","type-post","status-publish","format-standard","hentry","category-servers","tag-chroot","tag-icecast","entry"],"_links":{"self":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/comments?post=1766"}],"version-history":[{"count":1,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1766\/revisions"}],"predecessor-version":[{"id":1767,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1766\/revisions\/1767"}],"wp:attachment":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/media?parent=1766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/categories?post=1766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/tags?post=1766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}