title: Hadoop - Azure data lake storage connection error: Invalid URI for NameNode address (check fs.defaultFS): file:/// has no authority
body: <p><strong>core-site.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;configuration.xsl&quot;?&gt;
  &lt;!--
    Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License. See accompanying LICENSE file.
  --&gt;
  
  &lt;!-- Put site-specific property overrides in this file. --&gt;
  
  &lt;configuration&gt;
  &lt;property&gt;
  &lt;name&gt;fs.default.name&lt;/name&gt;
  &lt;value&gt;hdfs://localhost:9820&lt;/value&gt;
  &lt;/property&gt;
  &lt;/configuration&gt;
  
  </code></pre>
  <p><strong>mapred-site.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;configuration.xsl&quot;?&gt;
  &lt;!--
    Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License. See accompanying LICENSE file.
  --&gt;
  
  &lt;!-- Put site-specific property overrides in this file. --&gt;
  
  &lt;configuration&gt;
  
     &lt;property&gt;
  
         &lt;name&gt;mapreduce.framework.name&lt;/name&gt;
  
         &lt;value&gt;yarn&lt;/value&gt;
  
     &lt;/property&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  <p><strong>hdfs-site.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;configuration.xsl&quot;?&gt;
  &lt;!--
    Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License. See accompanying LICENSE file.
  --&gt;
  
  &lt;!-- Put site-specific property overrides in this file. --&gt;
  
  
  &lt;configuration&gt;
  
     &lt;property&gt;
  
         &lt;name&gt;dfs.replication&lt;/name&gt;
  
         &lt;value&gt;1&lt;/value&gt;
  
     &lt;/property&gt;
  
     &lt;property&gt;
  
         &lt;name&gt;dfs.namenode.name.dir&lt;/name&gt;
  
         &lt;value&gt;C:\Users\j.shimoga.prakash\Desktop\hadoop\data\namenode&lt;/value&gt;
  
     &lt;/property&gt;
  
     &lt;property&gt;
  
         &lt;name&gt;dfs.datanode.data.dir&lt;/name&gt;
  
         &lt;value&gt;C:\Users\j.shimoga.prakash\Desktop\hadoop\data\datanode&lt;/value&gt;
  
     &lt;/property&gt;
  
  &lt;/configuration&gt;
  
  </code></pre>
  <p><strong>yarn-site.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;!--
    Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License. See accompanying LICENSE file.
  --&gt;
  &lt;configuration&gt;
  
     &lt;property&gt;
  
                  &lt;name&gt;yarn.nodemanager.aux-services&lt;/name&gt;
  
                  &lt;value&gt;mapreduce_shuffle&lt;/value&gt;
  
     &lt;/property&gt;
  
     &lt;property&gt;
  
                 &lt;name&gt;yarn.nodemanager.auxservices.mapreduce.shuffle.class&lt;/name&gt; 
  
                  &lt;value&gt;org.apache.hadoop.mapred.ShuffleHandler&lt;/value&gt;
  
     &lt;/property&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  <p>These are the .XML files in my hadoop local server, when I perform a <code>start-all.cmd</code> everything runs fine but i wanted to connect hadoop with my Azure data lake storage account and i followed the steps given in this article <a href="https://medium.com/azure-data-lake/connecting-your-own-hadoop-or-spark-to-azure-data-lake-store-93d426d6a5f4" rel="nofollow noreferrer">here</a>, the part where it says modify your config, after I do that with the appropriate values for id, secret and token and then perform a <code>start-all.cmd</code> ,namenode first fails and then the rest fail.
  name node gives this error</p>
  <pre><code>STARTUP_MSG:   java = 1.8.0_311
  ************************************************************/
  2022-01-06 01:36:17,323 INFO namenode.NameNode: createNameNode []
  2022-01-06 01:36:17,718 INFO impl.MetricsConfig: Loaded properties from hadoop-metrics2.properties
  2022-01-06 01:36:18,164 INFO impl.MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s).
  2022-01-06 01:36:18,164 INFO impl.MetricsSystemImpl: NameNode metrics system started
  2022-01-06 01:36:18,974 INFO namenode.NameNodeUtils: fs.defaultFS is file:///
  2022-01-06 01:36:19,221 ERROR namenode.NameNode: Failed to start namenode.
  java.lang.IllegalArgumentException: Invalid URI for NameNode address (check fs.defaultFS): file:/// has no authority.
          at org.apache.hadoop.hdfs.DFSUtilClient.getNNAddress(DFSUtilClient.java:781)
          at org.apache.hadoop.hdfs.DFSUtilClient.getNNAddressCheckLogical(DFSUtilClient.java:810)
          at org.apache.hadoop.hdfs.DFSUtilClient.getNNAddress(DFSUtilClient.java:772)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.getRpcServerAddress(NameNode.java:570)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.loginAsNameNodeUser(NameNode.java:710)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:730)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.&lt;init&gt;(NameNode.java:1014)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.&lt;init&gt;(NameNode.java:987)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1756)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1821)
  2022-01-06 01:36:19,221 INFO util.ExitUtil: Exiting with status 1: java.lang.IllegalArgumentException: Invalid URI for NameNode address (check fs.defaultFS): file:/// has no authority.
  2022-01-06 01:36:19,237 INFO namenode.NameNode: SHUTDOWN_MSG:
  /************************************************************
  SHUTDOWN_MSG: Shutting down NameNode at CPX-VU4XAAETE0J/192.168.144.1
  ************************************************************/
  
  </code></pre>
  <p>updated core-site.xml configurations</p>
  <pre><code>&lt;configuration&gt;
    &lt;property&gt;
          &lt;name&gt;dfs.adls.oauth2.access.token.provider.type&lt;/name&gt;
          &lt;value&gt;ClientCredential&lt;/value&gt;
    &lt;/property&gt;
    
    &lt;property&gt;
        &lt;name&gt;dfs.adls.oauth2.refresh.url&lt;/name&gt;
        &lt;value&gt;YOUR TOKEN ENDPOINT&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
        &lt;name&gt;dfs.adls.oauth2.client.id&lt;/name&gt;
        &lt;value&gt;YOUR CLIENT ID&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
        &lt;name&gt;dfs.adls.oauth2.credential&lt;/name&gt;
        &lt;value&gt;YOUR CLIENT SECRET&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
        &lt;name&gt;fs.adl.impl&lt;/name&gt;
        &lt;value&gt;org.apache.hadoop.fs.adl.AdlFileSystem&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
        &lt;name&gt;fs.AbstractFileSystem.adl.impl&lt;/name&gt;
        &lt;value&gt;org.apache.hadoop.fs.adl.Adl&lt;/value&gt;
    &lt;/property&gt;  
  &lt;/configuration&gt;
  </code></pre>
  <p>Kindly help, Thanks.</p>