RE: sudden problem (Error getting local IpAddress: java.net.SocketException)

121 views
Skip to first unread message

Radharc

unread,
Sep 28, 2013, 6:32:24 PM9/28/13
to andreasl...@googlegroups.com
Downloaded FTPServer a week or so ago and have been using it no problem.  Suddenly, though, it has stopped working -- if I am reading the error message correctly it is not able to obtain an IP address from the WiFi network.  Any help would be appreciated.  I have downloaded other similar programs from Google Play since and they work fine on the same WiFi network, but frankly I would prefer FTPServer if I can get it to work.  Have uninstalled/reinstalled twice and it hasn't helped.
 
Running Android 4.1.2.  Thanks much!
 
Error Log:
 
13-09-28T14:14:54 Connection changed.
Setting up for new connection in WIFI mode.
Waiting for IP
13-09-28T14:14:54 Error getting local IpAddress: java.net.SocketException
at java.net.NetworkInterface.rethrowAsSocketException(NetworkInterface.java:212)
at java.net.NetworkInterface.collectIpv6Addresses(NetworkInterface.java:153)
at java.net.NetworkInterface.getByName(NetworkInterface.java:117)
at java.net.NetworkInterface.getNetworkInterfacesList(NetworkInterface.java:271)
at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:262)
at lutey.FTPServer.service.c.a(ConnectionManager.java:315)
at lutey.FTPServer.service.c.a(ConnectionManager.java:84)
at lutey.FTPServer.service.FTPService.g(FTPService.java:295)
at lutey.FTPServer.service.q.onReceive(NetworkStateBroadcastReceiver.java:17)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:757)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5021)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NumberFormatException: Invalid int: " 4"
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parse(Integer.java:375)
at java.lang.Integer.parseInt(Integer.java:366)
at java.lang.Short.parseShort(Short.java:213)
at java.net.NetworkInterface.collectIpv6Addresses(NetworkInterface.java:146)
... 17 more
 

Andreas Liebig

unread,
Sep 29, 2013, 3:59:15 AM9/29/13
to andreasl...@googlegroups.com
Hello.

The error that happens occurs in the IP stack of android itself it seems (it gets passed a " 4" for a number).
This is a known bug in android:
According to the bug report it is solved in JB 4.2.

So there is not much I can do against that, and I don't know why it did not occur before for you.
(Other server's maybe determine IPs differently, or have IPv6 support disabled and maybe therefore the bug does not show)

But:
Are you using IPv6 on the Wifi?
If not, try choosing your preferred IP in the preferences, hopefully that will make it work.


Hope that helps.
Br,
Andreas



--
You received this message because you are subscribed to the Google Groups "AndreasLiebig" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andreasliebiga...@googlegroups.com.
To post to this group, send email to andreasl...@googlegroups.com.
Visit this group at http://groups.google.com/group/andreasliebigapps.
For more options, visit https://groups.google.com/groups/opt_out.

apkohsw...@gmail.com

unread,
Sep 29, 2013, 4:58:33 PM9/29/13
to andreasl...@googlegroups.com
Thanks for the quick response.
 
My WiFi router is set to IPv6. 
 
That said, I read the link you provided.  I am not a programmer, but it seems like it says that some number gets incremented every time Wifi is connected/disconnected, and when it gets too high the error I posted occurs.  That could explain why I didn't have the problem at first.  The thread also seemed to say that rebooting could reset the number.  So, I rebooted.  FTPServer works again now, presumably temporarily.
 
Anyway, thanks again for the quick response and for putting together such a useful little app.

Andreas Liebig

unread,
Sep 30, 2013, 2:18:20 AM9/30/13
to andreasl...@googlegroups.com
Hello.

Glad that it works now,

Br,
Andreas
Reply all
Reply to author
Forward
0 new messages