title: Hadoop: Failed to connect to HDFS(Hadoop) using python
body: <p>I am trying to connect to HDFS which is in VM with Ubuntu by using python jupyter tool from windows10. Can anybody help me with the below connection error am getting. Thank you.</p>
  
  <p>Package used: 
  pywebhdfs
  ubuntu 18.0.4
  windows 10</p>
  
  <p>'''</p>
  
  <pre><code>from pywebhdfs.webhdfs import PyWebHdfsClient
  from pprint import pprint
  
  HDFS_CONNECTION = PyWebHdfsClient(host='localhost',port='9000', user_name='root-sai')
  
  HDFS_CONNECTION.list_dir('hdfs"//localhost:9000/New')
  </code></pre>
  
  <p>'''
  Error:-</p>
  
  <pre><code>ConnectionError: HTTPConnectionPool(host='localhost', port=9000): Max retries exceeded with url: /webhdfs/v1/hdfs%22//localhost%3A9000/New?op=LISTSTATUS&amp;user.name=root-sai (Caused by NewConnectionError('&lt;urllib3.connection.HTTPConnection object at 0x00000250AB1FF438&gt;: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
  </code></pre>