Android Question FTP (Connect/List) Problem

mw71

Active Member
Licensed User
Longtime User
Hi,

i start with FTP. I would like to access the memory stick at my router (FritzBox). With Crome this works.

In the Service_Create the FTP Object is initialize:
FTP.Initialize("FTP","ftp.myAccount.myftp.org","21","user","passwort")

Second Step ist List:
FTP.List("/")

Sucess repeats False, the (unfiltert Log) means "Unable to resolve host"
Log:
[SO] 0.182 -0.153 9.810
SIOP:: AP = 360, CUR = 141, LCD = 98
netId is 0
getNetworkForDns: using netid 504 for uid 10190
java.net.UnknownHostException: Unable to resolve host "ftp.myAccount.myftp.org": No address associated with hostname
at java.net.InetAddress.lookupHostByName(InetAddress.java:457)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
at java.net.InetAddress.getByName(InetAddress.java:305)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:193)
at anywheresoftware.b4a.net.FTPWrapper.connectIfNeeded(FTPWrapper.java:474)
at anywheresoftware.b4a.net.FTPWrapper.access$3(FTPWrapper.java:467)
at anywheresoftware.b4a.net.FTPWrapper$3.run(FTPWrapper.java:278)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
at libcore.io.Posix.android_getaddrinfo(Native Method)
at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
at java.net.InetAddress.lookupHostByName(InetAddress.java:438)
... 11 more

what am I doing wrong?
 

DonManfred

Expert
Licensed User
Longtime User
Unable to resolve host "ftp.myAccount.myftp.org": No address associated with hostname
use the correct hostname or ip
 
Upvote 0

mw71

Active Member
Licensed User
Longtime User
This "Server" is on my Router whith my Data, so i dont Publish the Account Name for Public.
You also need Password and Username.

I Write you a PN and look (later) if i can create a Puplic Account and User.
 
Upvote 0

mw71

Active Member
Licensed User
Longtime User
after change FTP.Initialize("FTP","ftp.myAccount.myftp.org".... (or ftp://, test both) to FTP.Initialize("FTP","myAccount.myftp.org"
it works.
 
Upvote 0
Top