I am trying to retrieve a file from my local ftp server "Note: both the client & server are local running on the same machine". I use "pyftpdlib" library for running my python server & "FTPClient" library for my Android Client.
What happens is the that the client gets connected and logged in. The client is running in Local Passive Mode. But when calling the client.retrieveFile(.....);. I get an Exception on the emulator saying "Exception/ip:port - Connection refused". Here is my client code: FTPClient client = new FTPClient(); try{ client.connect("10.0.2.2",5000); client.enterLocalPassiveMode(); boolean login = client.login("User", "1234"); if (login) { File file = new File(getExternalFilesDir(null), "test.txt"); OutputStream fos = new BufferedOutputStream(new FileOutputStream(file)); client.retrieveFile("/testing/test.txt", fos);} else client.disconnect(); }catch (IOException e) { System.out.println(e.getMessage()); e.printStackTrace(); } This is a screenshot of what happens on the server side: http://bit.ly/hS6BCc When I tried deleting a file on the server through the client it worked well. But I faced the problem mentioned when trying to download a file or uploading a file on the server. Any Help please, Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en