title: Apache commons ftpclient not connecting
body: <p>I am writing an application to download files from ftp server. The code exits with error - UnknownHostException. The site is valid and I have opened it in filezilla. The code follows -</p>
  
  <pre><code>public class Downloader extends AsyncTask&lt;String, Integer, String&gt; {
      private FTPClient mFtp;
      private FTPFile[] files;
      public Downloader() {
          mFtp=new FTPClient();
          try {
              mFtp.connect(InetAddress.getByName("fenils.in"));
  //          mFtp.connect("ftp://fenils.in");
              mFtp.login("*****", "******");
              mFtp.setFileType(FTP.BINARY_FILE_TYPE);
              mFtp.enterLocalPassiveMode();
              files=mFtp.listFiles("/pankaj/beta");
  
          } catch (SocketException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      }
  
      @Override
      protected String doInBackground(String... arg0) {
          FileOutputStream fos = null;
          try {
              for(FTPFile f:files){
                  fos=new FileOutputStream("alpha/"+f.getName());
                  mFtp.retrieveFile(f.getName(), fos);
              }
              fos.close();
              mFtp.logout();
              mFtp.disconnect();
          } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
          return null;
      }
  
  }
  </code></pre>
  
  <p>Any help is appreciated. Thanks in advance.</p>