{"id":4379,"date":"2023-07-24T10:00:19","date_gmt":"2023-07-24T10:00:19","guid":{"rendered":"https:\/\/arzhost.com\/blogs\/?p=4379"},"modified":"2023-10-04T14:37:19","modified_gmt":"2023-10-04T14:37:19","slug":"eai_again-temporary-failure-in-name-resolution","status":"publish","type":"post","link":"https:\/\/arzhost.com\/blogs\/eai_again-temporary-failure-in-name-resolution\/","title":{"rendered":"EAI_AGAIN Temporary Failure in Name Resolution"},"content":{"rendered":"<p>When a website name cannot be converted into an <a href=\"https:\/\/en.wikipedia.org\/wiki\/IP_address\" target=\"_blank\" rel=\"noopener\">IP address<\/a>, the system generates the &#8220;EAI_AGAIN Temporary Failure in Name Resolution&#8221; error. There are numerous reasons why the issue could appear on your machine, even though it can occasionally be caused by a lost internet connection.<\/p>\n<p><u>You can follow the instructions in this tutorial to troubleshoot and resolve the &#8220;EAI_AGAIN Temporary Failure in Name Resolution&#8221; error:<\/u><\/p>\n<ul>\n<li><code>root privileges or sudo<\/code><\/li>\n<li><code>reliable internet access<\/code><\/li>\n<\/ul>\n<p><u>When a user uses a command like &#8220;ping&#8221; to connect to a website, an error occurs:<\/u><\/p>\n<ul>\n<li><code>Ping www.arzhost.com<\/code><\/li>\n<\/ul>\n<p>The system produces an error because it cannot communicate with the DNS server.<\/p>\n<p>Resolv. conf network configuration file issues and firewall configuration issues are the most frequent causes of this error.<\/p>\n<p><u>Below are the methods to correct the problem in both scenarios.<\/u><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/arzhost.com\/blogs\/eai_again-temporary-failure-in-name-resolution\/#Method_1_A_resolv_conf_configuration_error_Linux_systems\" >Method 1: A resolv. conf configuration error Linux systems&#8217;<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/arzhost.com\/blogs\/eai_again-temporary-failure-in-name-resolution\/#Incorrect_permissions\" >Incorrect permissions<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/arzhost.com\/blogs\/eai_again-temporary-failure-in-name-resolution\/#Method_2_Firewall_Limitations\" >Method 2: Firewall Limitations<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/arzhost.com\/blogs\/eai_again-temporary-failure-in-name-resolution\/#1_Open_the_port_in_UFW_Firewall\" >1: Open the port in UFW Firewall<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/arzhost.com\/blogs\/eai_again-temporary-failure-in-name-resolution\/#2_Firewalld_ports_should_be_opened\" >2: Firewalld ports should be opened.<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/arzhost.com\/blogs\/eai_again-temporary-failure-in-name-resolution\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Method_1_A_resolv_conf_configuration_error_Linux_systems\"><\/span><strong>Method 1: A resolv. conf configuration error Linux systems&#8217;<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>resolv. conf file is used to set up DNS servers.<\/p>\n<p><u>Start by launching the file in a text editor like nano.<\/u><\/p>\n<ul>\n<li><code>nano \/etc\/resolv.conf with sudo<\/code><\/li>\n<\/ul>\n<p><u>Ensure that there is at least one name server in the resolv.conf file. The lines listing name servers ought to appear as follows:<\/u><\/p>\n<ul>\n<li><code>8.8.8 is a name server.<\/code><\/li>\n<\/ul>\n<p>Add at least one name server to the file if you don&#8217;t already have one. Although Google owns the well-known name servers 8.8.8.8 and 8.8.4.4, any working DNS server can be added to this list.<\/p>\n<p><u>Save the file, then shut it down.<\/u><\/p>\n<p><u>Restart the DNS resolver service after that.<\/u><\/p>\n<ul>\n<li><code>restart systemd-resolved. Service with sudo systemctl<\/code><\/li>\n<\/ul>\n<p><u>The aforementioned command outputs nothing if it is successful. Pinging a website will show whether your new name servers are configured properly:<\/u><\/p>\n<ul>\n<li><code>Ping www.arzhost.com<\/code><\/li>\n<\/ul>\n<p>Your DNS server is operational if you can observe data being sent and received using the ping command.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Incorrect_permissions\"><\/span><strong>Incorrect permissions<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If the error still occurs even when your resolv. conf file has the correct DNS servers. It can be caused by improperly set file permissions.<\/p>\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/UOszyo1EZvs\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p><u>Use the following command to give the root user ownership of the file:<\/u><\/p>\n<ul>\n<li><code>\/etc\/resolv.conf chown root: root with sudo.<\/code><\/li>\n<\/ul>\n<p><u>Change the user permissions to allow everyone to read the file on the system:<\/u><\/p>\n<ul>\n<li><code>Doing sudo chmod 644 on \/etc\/resolv.conf<\/code><\/li>\n<\/ul>\n<p><u>Re-ping a webpage.<\/u><\/p>\n<ul>\n<li><code>Ping www.arzhost.com<\/code><\/li>\n<\/ul>\n<p>The scripts above correctly fix the fault if incorrect file permissions were to blame.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Method_2_Firewall_Limitations\"><\/span><strong>Method 2: Firewall Limitations<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A firewall blocking either one or both of the following ports could be another explanation for the &#8220;<span style=\"color: #000000;\"><strong>EAI_AGAIN Temporary Failure in Name Resolution<\/strong><\/span>&#8221; error:<\/p>\n<ul>\n<li><code>using port 43 for Whois lookup<\/code><\/li>\n<li><code>the domain name resolution port 53<\/code><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"1_Open_the_port_in_UFW_Firewall\"><\/span><strong><u>1: Open the port in UFW Firewall<\/u><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><u>To allow traffic on port 43 using the UFW firewall, enter the following command:<\/u><\/p>\n<ul>\n<li><code>ufw allow 43\/tcp sudo<\/code><\/li>\n<\/ul>\n<p><u>The rule has been successfully amended, according to UFW.<\/u><\/p>\n<p><u>For port 53, repeat the command.<\/u><\/p>\n<ul>\n<li><code>ufw allow 53\/tcp sudo<\/code><\/li>\n<\/ul>\n<p><u>Use the following command to reload UFW:<\/u><\/p>\n<ul>\n<li><code>ufw sudo reload<\/code><\/li>\n<\/ul>\n<p>The outcome validates the operation&#8217;s success.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Firewalld_ports_should_be_opened\"><\/span><strong><u>2: Firewalld ports should be opened.<\/u><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><u>The default firewall in certain Linux distributions, including CentOS, is firewalld. In firewalld, the syntax is as follows:<\/u><\/p>\n<ul>\n<li><code>the command sudo firewall-cmd \u2014add-port=43\/tcp \u2014permanent<\/code><\/li>\n<\/ul>\n<p><u>firewalld prints &#8220;success&#8221; as its output.<\/u><\/p>\n<p><u>For port 53, repeat the command.<\/u><\/p>\n<ul>\n<li><code>the command sudo firewall-cmd \u2014add-port=53\/tcp \u2014permanent<\/code><\/li>\n<\/ul>\n<p><u>Firewall reloading<\/u><\/p>\n<ul>\n<li><code>Firewall-cmd \u2014reload with sudo<\/code><\/li>\n<\/ul>\n<p><u>Pinging a webpage will check the connection.<\/u><\/p>\n<ul>\n<li><code>Ping www.arzhost.com<\/code><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This article offered solutions for troubleshooting and resolving Linux&#8217;s &#8220;EAI_AGAIN Temporary Failure in Name Resolution&#8221; problem.<\/p>\n<p>Visit <a href=\"https:\/\/www.arzhost.com\/\">Arzhost<\/a> and read How to Use Linux dig Command for further information on troubleshooting DNS-related issues.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When a website name cannot be converted into an IP address, the system generates the &#8220;EAI_AGAIN Temporary Failure in Name Resolution&#8221; error. There are numerous reasons why the issue could appear on your machine, even though it can occasionally be caused by a lost internet connection. You can follow the instructions in this tutorial to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6247,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"table_tags":[],"class_list":["post-4379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/4379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/comments?post=4379"}],"version-history":[{"count":4,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/4379\/revisions"}],"predecessor-version":[{"id":6248,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/4379\/revisions\/6248"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media\/6247"}],"wp:attachment":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media?parent=4379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/categories?post=4379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/tags?post=4379"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/table_tags?post=4379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}