title: Could not find uri with key dfs.encryption.key.provider.uri to create a keyProvider in HDFS encryption for CDH 5.4
body: <h2>CDH Version: CDH5.4.5</h2>
  
  <p>Issue: When HDFS Encryption is enabled using KMS available in Hadoop CDH 5.4 , getting error while putting file into encryption zone.</p>
  
  <p>Steps:</p>
  
  <p>Steps for Encryption of Hadoop as follows:</p>
  
  <ol>
  <li><p>Creating  a key [SUCCESS]</p>
  
  <pre><code>[tester@master ~]$ hadoop key create 'TDEHDP' 
  -provider kms://https@10.1.118.1/key_generator/kms -size 128
  tde group has been successfully created with options 
  Options{cipher='AES/CTR/NoPadding', bitLength=128, description='null', attributes=null}.
  KMSClientProvider[https://10.1.118.1/key_generator/kms/v1/] has been updated.
  </code></pre></li>
  </ol>
  
  <p>2.Creating a directory [SUCCESS]</p>
  
  <pre><code>[tester@master ~]$ hdfs dfs -mkdir /user/tester/vs_key_testdir
  </code></pre>
  
  <ol start="3">
  <li><p>Adding Encryption Zone [SUCCESS]</p>
  
  <pre><code>[tester@master ~]$ hdfs crypto -createZone -keyName 'TDEHDP' 
  -path /user/tester/vs_key_testdir
  Added encryption zone /user/tester/vs_key_testdir
  </code></pre></li>
  <li><p>Copying File to encryption Zone [ERROR]</p>
  
  <pre><code>[tdetester@master ~]$ hdfs dfs -copyFromLocal test.txt /user/tester/vs_key_testdir
  </code></pre></li>
  </ol>
  
  <blockquote>
    <p>15/09/04 06:06:33 ERROR hdfs.KeyProviderCache: Could not find uri with
    key [dfs.encryption.key.provider.uri] to create a keyProvider !!
    copyFromLocal: No KeyProvider is configured, cannot access an
    encrypted file 15/09/04 06:06:33 ERROR hdfs.DFSClient: Failed to close
    inode 20823
    org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.LeaseExpiredException):
    No lease on /user/tester/vs_key_testdir/test.txt.<em>COPYING</em> (inode
    20823): File does not exist. Holder
    DFSClient_NONMAPREDUCE_1061684229_1 does not have any open files.</p>
  </blockquote>
  
  <p>Any idea/suggestion will be helpful.</p>