<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HDFS NameNode won't leave safemode in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/HDFS-NameNode-won-t-leave-safemode/m-p/195774#M157830</link>
    <description>&lt;P&gt;&lt;EM&gt;@&lt;A href="https://community.hortonworks.com/users/17662/dmueller1607.html"&gt;Daniel Müller&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I think your cluster is kerberized. The cause the nameNode is switching to safe mode is due to the communication time out in between the KDC server. The error should appear in the /var/log/hadoop-hdfs log &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You should find an error stack like below. &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;Caused by: javax.security.auth.login.LoginException: Receive timed out at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:808) at com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:617) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:755) at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195) at &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;The solution on this problem will be adding a line to krb5.conf under the &lt;STRONG&gt;[libdefaults]&lt;/STRONG&gt; section: &lt;STRONG&gt;udp_preference_limit = 1&lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You shouldn't edit the local &lt;STRONG&gt;/etc/krb5.conf &lt;/STRONG&gt;but you have to use the &lt;STRONG&gt;Ambari UI&lt;/STRONG&gt; go to &lt;STRONG&gt;Ambari &amp;gt; kerberos &amp;gt; Configs &amp;gt; Advanced krb5-conf &lt;/STRONG&gt;to make the change. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;This ensures that the new setting available on all nodes within the cluster. See atached screenshot save and restart all required services &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;Please let me know if that helped.&lt;/I&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6960iAFE132248679048D/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="namenode-safemode.jpg" title="namenode-safemode.jpg" /&gt;</description>
    <pubDate>Wed, 15 Nov 2017 23:37:01 GMT</pubDate>
    <dc:creator>Shelton</dc:creator>
    <dc:date>2017-11-15T23:37:01Z</dc:date>
  </channel>
</rss>

