zengxiange / android-vnc-viewer

Automatically exported from code.google.com/p/android-vnc-viewer
0 stars 0 forks source link

Connection seems to time out after 30 seconds. #53

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I'm not sure.  I did everything in the FAQ to get better connectivity.
2.
3.

What is the expected output? What do you see instead?
Be able to stay connected for longer than 30 seconds to a minute.

What version of the product are you using? On what operating system?
Latest

Please provide any additional information below.
Could just be the network, but when I connect to RealVNC with my laptop I
do not have the same issue on the same wifi network.

Original issue reported on code.google.com by tsnow...@gmail.com on 10 Mar 2009 at 3:40

GoogleCodeExporter commented 9 years ago
Sounds like there may be some update coming from your server that 
android-vnc-viewer
is not handling.  Any chance you can get the android-sdk so we can get a logcat?

Original comment by googlec...@antlersoft.com on 10 Mar 2009 at 5:11

GoogleCodeExporter commented 9 years ago
Yeah I can try and do that. Trouble is I'm not 100% sure how. I know how to get 
the SDK but getting the 
bug report is the part I don't know how to do.

Original comment by tsnow...@gmail.com on 10 Mar 2009 at 7:26

GoogleCodeExporter commented 9 years ago
The SDK contains a program called adb (I'm familiar with the Linux SDK but 
Windows
shouldn't be too different)

Hook your phone to the computer with the USB cable.

Then from the command prompt use the command

<path to adb program>\adb -d logcat

You'll start getting a display of what's happening on the phone

Then run the VNC on the phone-- at the point it disconnects, adb will probably 
write
a stack trace

A trace looks like this:

Unhandled exception XXXXException from RfbProto.readXXX : RfbProto.java line XXX
From VncCanvas.XXXXX : VncCanvas.java line XXX
From VncCanvasActivity.XXXXX : VncCanvasActivity.java line XXX
.
.
.
and so on for 10-20 more lines

If you can copy that and paste it into the bug report it would help

E-mail me if you need further instructions-- I'll try it out on a Windows box 
to make
sure I'm telling you the right things

Original comment by googlec...@antlersoft.com on 10 Mar 2009 at 8:11

GoogleCodeExporter commented 9 years ago
Ok, I got the debugging working, problem is now it doesn't want to freeze... 
lol.

Original comment by tsnow...@gmail.com on 11 Mar 2009 at 1:38

GoogleCodeExporter commented 9 years ago
Got it to disconnect. 

It didn't run a stack trace, but I did get this when it disconnected.

V/VncCanvas( 1357): Closing VNC Connection
V/RfbProto( 1357): RFB socket closed
E/VncCanvas( 1357): java.net.SocketException: The connection was reset
W/System.err( 1357): java.net.SocketException: The connection was reset
W/System.err( 1357):    at org.apache.harmony.luni.platform.OSNetworkSystem.rece
iveStreamImpl(Native Method)
W/System.err( 1357):    at org.apache.harmony.luni.platform.OSNetworkSystem.rece
iveStream(OSNetworkSystem.java:230)
W/System.err( 1357):    at org.apache.harmony.luni.net.PlainSocketImpl.read(Plai
nSocketImpl.java:550)
W/System.err( 1357):    at org.apache.harmony.luni.net.SocketInputStream.read(So
cketInputStream.java:87)
W/System.err( 1357):    at org.apache.harmony.luni.net.SocketInputStream.read(So
cketInputStream.java:67)
W/System.err( 1357):    at java.io.BufferedInputStream.fillbuf(BufferedInputStre
am.java:154)
W/System.err( 1357):    at java.io.BufferedInputStream.read(BufferedInputStream.
java:232)
W/System.err( 1357):    at java.io.DataInputStream.readUnsignedByte(DataInputStr
eam.java:379)
W/System.err( 1357):    at android.androidVNC.RfbProto.readServerMessageType(Rfb
Proto.java:707)
W/System.err( 1357):    at android.androidVNC.VncCanvas.processNormalProtocol(Vn
cCanvas.java:310)
W/System.err( 1357):    at android.androidVNC.VncCanvas$3.run(VncCanvas.java:181
)

let me kn ow if you need to know more.

Original comment by tsnow...@gmail.com on 11 Mar 2009 at 1:44

GoogleCodeExporter commented 9 years ago
That is indeed the stack trace-- and I thought it would be just what I needed to
address your problem.

However--

"The connection was reset" that is being reported as the underlying problem 
really
doesn't help.  From that it looks like the problem is with the network-- and 
yet you
say that a laptop on the same wifi doesn't see the issue.

Original comment by googlec...@antlersoft.com on 11 Mar 2009 at 5:10

GoogleCodeExporter commented 9 years ago
Yes, same wifi network (the computer that I'm using VNC to connect is on a 
specific
network at work)

I wonder if it's an issue with the Real VNC server?  Sometimes the connection 
will
work for ten to fifteen minutes, and then other times it won't even connect.  

Any tips with configuration?

Original comment by tsnow...@gmail.com on 11 Mar 2009 at 5:52

GoogleCodeExporter commented 9 years ago
sorry for the multi reply...

The wifi network that is used is very secure and has many restrictions.  Could 
this
cause a problem?  (For example I have to switch to 3g to upload pictures to 
picasa or
pixlepipe)

Original comment by tsnow...@gmail.com on 11 Mar 2009 at 5:54

GoogleCodeExporter commented 9 years ago
Ok here's another funny thing.  I can handle being kicked off the wifi network. 
 But
after that it won't reconnect.  

After I turn the wifi on the phone off, and then restart the vnc program (I 
have root
so I can terminate the program) then I might be able to connect to the vnc 
server. 
Sometimes I even have to reboot.

Here's the debug for when it won't reconnect...

E/VncCanvas(  353): java.net.SocketException: No route to host
W/System.err(  353): java.net.SocketException: No route to host
W/System.err(  353):    at org.apache.harmony.luni.platform.OSNetworkSystem.conn
ectSocketImpl(Native Method)
W/System.err(  353):    at org.apache.harmony.luni.platform.OSNetworkSystem.conn
ect(OSNetworkSystem.java:119)
W/System.err(  353):    at org.apache.harmony.luni.net.PlainSocketImpl.connect(P
lainSocketImpl.java:227)
W/System.err(  353):    at org.apache.harmony.luni.net.PlainSocketImpl.connect(P
lainSocketImpl.java:199)
W/System.err(  353):    at java.net.Socket.startupSocket(Socket.java:675)
W/System.err(  353):    at java.net.Socket.<init>(Socket.java:142)
W/System.err(  353):    at android.androidVNC.RfbProto.<init>(RfbProto.java:248)

W/System.err(  353):    at android.androidVNC.VncCanvas.connectAndAuthenticate(V
ncCanvas.java:217)
W/System.err(  353):    at android.androidVNC.VncCanvas$3.run(VncCanvas.java:173
)
V/VncCanvas(  353): Cleaning up resources

Original comment by tsnow...@gmail.com on 14 Mar 2009 at 12:41

GoogleCodeExporter commented 9 years ago
To me it is starting to look like the phone's wifi stack is not playing nicely 
with
your wifi configuration.

'No route to host' usually means that the IP address or gateway assigned to the 
phone
by the DHCP server on your wifi router is not valid.

There may still be some issue with android-vnc-viewer itself; it's not really 
careful
about handling the return codes from network functions.

Original comment by googlec...@antlersoft.com on 16 Mar 2009 at 4:33

GoogleCodeExporter commented 9 years ago
I have been getting this problem too. It used to be intermittent but for the 
last week or two has been typical.

Original comment by beeflin on 14 May 2011 at 7:23

GoogleCodeExporter commented 9 years ago
Same here. My issue is not related to vnc, but when I do 
AndroidHttpClient.connect(), I get exactly the same message. I think, native 
code is playing funny.

Original comment by upume...@gmail.com on 20 May 2011 at 6:10

GoogleCodeExporter commented 9 years ago
I am also having this issue. This issue is related to android VNC. Windows 
Vista Pro, on Wifi connection connecting to RealVNC server over Wifi connection 
using Motorola Xoom Tablet.

Original comment by asiatrav...@gmail.com on 18 Jul 2011 at 11:54