02-22-2011 05:56 AM
Testing on a torch and a bold 9000 we notice that when we open a http connection using direct tcp sometimes we get java.io.IOException such as: Tunnel failed or Tunnel down, then at some point we get java.io.IOException with no additional information, at this point all that will ever happen when trying to create a connection is a java.io.IOException, even if we quit the app and start it again! The only solution is to pull the battery out and start the app from scratch. Any ideas why this would happen? We are appending “;deviceside=true” to the url we are trying to open and the exception is thrown when calling
connection = (HttpConnection) Connector.open(servletUrl);
is it possible that there is a problem with the mobile network (t mobile) which is causing this problem, the information for the direct tcp/ip connection im putting in the APN is:
sometimes it will work for a while before we get a tunnel failed message or similar, but at some point we get a general ioexception and it will not recover unless we reboot the device...
02-23-2011 07:07 AM
No, but then I rarely use direct TCP and am not aware of anyone that is using it on T-Mobile.
Is this a T-Mobile problem - in other words, do you have other carriers working fine?
Are you 100% sure that the exception occurs with the connection request and not later when you request the response code?
Have you tried the Network Diagnostics code?
02-23-2011 01:11 PM
we havent tested on any other carriers yet - we have access only to t mobile sims
the exception occurs when the connection is opened for sure, ive printed out logging information!
I already have code for writing the correct parameters to the supplied connection string....
02-24-2011 04:31 AM
Given this, I recommend you try the Network Diagnostics code. Test it on the device(s) to see if it works. If it works OK, then review the code to see if there is anything you do differently. I am aware that this problem does not effect you all the time, so this is likely to be a tricky one to sort out.
I am surprised you get a failure on the open. My understanding is that the connection is not attempted until there is a requirement to do so, so for normal http, that is not normally until the program requests something that requires a response. HTTPS will connect immediately to do authentication. Are you using HTTPS?
Two more, possibly silly questions:
a) I presume the SIMs are enabled for data?
2) I presume you are developing in a compatible OS, i.e. one that is the same as or earlier than the devices you are testing with?
05-15-2011 11:03 AM
I've seen similar issues myself, though not in a long time. But more importantly, I've had users report such issues with my app in ways that are impossible to diagnose or reproduce. Usually they wind up using the app heavily (or just leave it running for a long time). Then, somehow, the device's network connectivity (for anything non-BIS anyways) gets "stuck" in a way that's only resolvable with a battery pull. There's never any good explanation, and also never any useful debugging data reported back.
(Its been a very long time since I've seen any similar symptoms myself, most likely on old devices and old OSes that I don't personally use anymore.)
05-22-2012 05:14 AM
I experienced similar problems with Direct TCP and Orange/CH. Application works fine for some time, then there is the Tunnel down error, and from that point on each time I try to open a connection I get an IOException thrown. The only way to make it work again is to pull the battery.
I observed that not only my application is affected. Once I get into this state of throwing IOExceptions at every connection attempt, the Facebook application also fails to connect.