Will UltraVNC attempt to Reconnect to the Repeater

Simple, Free, Open Source UltraVNC Wrapper Supporting Windows and Mac OSX.

Will UltraVNC attempt to Reconnect to the Repeater

Postby Rat » 2011-01-06 13:31

Here's a scenario that I would like some clarification on...

If I install ChunkVNC as a service and it loses its connection to the repeater, (in my case because I killed the Perl repeater script and restarted it), will the ChunkVNC service attempt to reconnect to the Repeater?

As far as I can tell it doesn't, which is a problem when I have a couple of dozen of my customer's machines running the ChunkVNC service.

I've scrutinised the "ultravnc.ini" configuration file for a setting that might be used, but all I could find is "KeepAliveInterval" which I've already set to 5 without any effect.

Anyone know how to make UltraVNC reconnect to the repeater if the connection is dropped?

The UltraVNC manual says:
-autoreconnect
Is used in conjunction with the -connect switch when having a server "back-connect" to a listening viewer. You can use it in a batch file for your clients that are behind a firewall that is not under your control. The batch file looks something like this:
"c:\program files\ultravnc\winvnc" -autoreconnect -connect 12.34.56.78
On the local computer run the viewer in "listening" mode, and have someone on the server end run the batch file. The -autoreconnect will make the server end attempt to reconnect to the listening viewer if the connection drops or is closed. It will immediately reconnect to the listening viewer if the session is closed. Close the listening viewer altogether in order to stop the server end from "autoreconnecting" to your computer. The server attempts to "autoreconnect" for only a few seconds.
Note that this "autoreconnect" param must be before the "connect" one on the command line!


This seems to indicate that the service won't attempt to reconnect if the repeater is down for more than a few seconds. What we need is a more robust form of auto-reconnection which will keep trying for longer, even if the viewer is closed.

In my testing closing the viewer for a minute or two and then reconnecting always works, but killing and restarting the Repeater always permanently breaks the connection. If I then stop and restart the server the viewer can reconnect.
Last edited by Rat on 2011-01-06 14:07, edited 3 times in total.
Rat
80
80
 
Posts: 182
Joined: 2004-11-01 02:11

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby redge » 2011-01-06 20:11

this what I already tell, winvnc must continuous try autoreconnect until human disconnect.
but what happen if winvnc crunshed, maybe retry like you tell and YY too retry counter ?

edit:
the counter is only 30 seconds,
then it break and reconnect if remote reachable
otherwise it stop autoreconnect and never retry reconnect.
Last edited by redge on 2011-01-06 23:30, edited 1 time in total.
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
redge
Super-Mod
Super-Mod
 
Posts: 6815
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby Rat » 2011-01-06 22:00

Well if Rudi or someone can confirm that this is the designed behaviour of UltraVNC and that there is no configuration option to prevent it, then I can write a little Windows service which monitors the Repeater and restarts the UltraVNC service if the Repeater dies and then comes back.
Rat
80
80
 
Posts: 182
Joined: 2004-11-01 02:11

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby JonD » 2011-01-06 23:39

Rat,
Sound like a nice solution. I would like to be able to set the time interval though. If the repeater was off for several hours, I wouldn't want the client generating an excessive number of "tries" to connect.

Ideally, it would start with frequent "tries" and then only try every (say) 10 minutes?

Perhaps 2 settings
- one for short term
- one for longer term

JonD
JonD
40
40
 
Posts: 121
Joined: 2006-12-24 16:46
Location: Canada

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby supercoe » 2011-01-07 05:52

Interesting as I run the Windows repeater and have closed and reopened it many times with the service installed.

Sometimes I'll do it just to be reminded which ID's are connecting.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
User avatar
supercoe
Super-Mod
Super-Mod
 
Posts: 1735
Joined: 2009-07-20 21:27
Location: Walker, MN

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby lall » 2011-01-07 12:49

As much as i know, if you kill repeater and re-start it, the server connects back to it in about 7 min. Atleast, that's what my log files show me.
lall
8
8
 
Posts: 20
Joined: 2010-12-16 16:50
Location: Estonia

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby JonD » 2011-01-07 15:35

I don't usually leave the service installed on a client... however, whenever I have, I'm disconnected the next day.

My repeater shuts down over night and restarts every morning. It usually ends up with a new public IP address so maybe that's related in some way. (I use NO-IP to handle the dynamic IP).

JonD
JonD
40
40
 
Posts: 121
Joined: 2006-12-24 16:46
Location: Canada

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby supercoe » 2011-01-07 15:41

JonD,

The changing IP is the problem, I've had trouble with this before.

It seems that UltraVNC only resolves the DNS name once when the server is started. If we can confirm this I'll ask Rudi for a patch.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
User avatar
supercoe
Super-Mod
Super-Mod
 
Posts: 1735
Joined: 2009-07-20 21:27
Location: Walker, MN

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby JonD » 2011-01-07 15:59

I was wondering if that might be the issue. I need to force the change in IP address to solve the issue that I previously documented with respect to CheckPoint routers.

JonD
JonD
40
40
 
Posts: 121
Joined: 2006-12-24 16:46
Location: Canada

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby Rat » 2011-01-07 22:36

All my testing was with the Perl repeater on a fixed IP address... The behaviour is consistent... If I kill the repeater and then restart it, the UltraVNC server never re-establishes a connection.
Rat
80
80
 
Posts: 182
Joined: 2004-11-01 02:11

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby JonD » 2011-01-07 23:24

I'm using a different repeater... but the results are the same.

JonD
JonD
40
40
 
Posts: 121
Joined: 2006-12-24 16:46
Location: Canada

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby supercoe » 2011-01-08 00:16

I'm not able to replicate this issue.

ChunkVNC 3.2 unmodified download.

Using a CentOS based Linux VPS with a DNS address pointing to it.

1) I start InstantSupport and it connects fine.
2) I ctrl+c the repeater to kill it.
3) After a couple minutes I start the repeater again.
4) About 20 seconds later the UltraVNC server connects.

I've tried it running normally and installing as a service.

Normal run:
[syntax="perl"][root@server1 ~]#perl ultravnc_repeater.pl 5901 5500
perl module IO::Socket::INET6 not available: no IPv6 support.
Fri Jan 7 19:04:54 2011: ultravnc_repeater: starting up. pid: 9477
Fri Jan 7 19:04:54 2011: watching for IPv4 connections on 5901/client.
Fri Jan 7 19:04:54 2011: watching for IPv4 connections on 5500/server.
Fri Jan 7 19:06:05 2011: new vnc server connecting.
Fri Jan 7 19:06:05 2011: storing new vnc server with ID:425083.
[root@server1 ~]#perl ultravnc_repeater.pl 5901 5500
perl module IO::Socket::INET6 not available: no IPv6 support.
Fri Jan 7 19:08:03 2011: ultravnc_repeater: starting up. pid: 9479
Fri Jan 7 19:08:03 2011: watching for IPv4 connections on 5901/client.
Fri Jan 7 19:08:03 2011: watching for IPv4 connections on 5500/server.
Fri Jan 7 19:08:23 2011: new vnc server connecting.
Fri Jan 7 19:08:23 2011: storing new vnc server with ID:425083.
[/syntax]

Normal run + installing as service:
[syntax="perl"][root@server1 ~]#perl ultravnc_repeater.pl 5901 5500
perl module IO::Socket::INET6 not available: no IPv6 support.
Fri Jan 7 19:16:49 2011: ultravnc_repeater: starting up. pid: 9481
Fri Jan 7 19:16:49 2011: watching for IPv4 connections on 5901/client.
Fri Jan 7 19:16:49 2011: watching for IPv4 connections on 5500/server.
Fri Jan 7 19:17:00 2011: new vnc server connecting.
Fri Jan 7 19:17:00 2011: storing new vnc server with ID:675690.
Fri Jan 7 19:17:15 2011: new vnc server connecting.
Fri Jan 7 19:17:15 2011: closing and deleting previous vnc server with ID:675690.
Fri Jan 7 19:17:15 2011: storing new vnc server with ID:675690.
[root@server1 ~]#perl ultravnc_repeater.pl 5901 5500
perl module IO::Socket::INET6 not available: no IPv6 support.
Fri Jan 7 19:19:27 2011: ultravnc_repeater: starting up. pid: 9483
Fri Jan 7 19:19:27 2011: watching for IPv4 connections on 5901/client.
Fri Jan 7 19:19:27 2011: watching for IPv4 connections on 5500/server.
Fri Jan 7 19:19:52 2011: new vnc server connecting.
Fri Jan 7 19:19:52 2011: storing new vnc server with ID:675690.
[/syntax]

redge: replaced code by syntax=perl
Last edited by supercoe on 2011-01-09 10:32, edited 1 time in total.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
User avatar
supercoe
Super-Mod
Super-Mod
 
Posts: 1735
Joined: 2009-07-20 21:27
Location: Walker, MN

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby JonD » 2011-01-08 04:01

What happens if the repeater is down for longer periods of time as opposed to a relatively quick restart?

BTW I've managed to lock myself out for another reason by switching the client to a static LAN IP address... I thought I might get away with that! One more thing !not! to do.

JonD
JonD
40
40
 
Posts: 121
Joined: 2006-12-24 16:46
Location: Canada

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby supercoe » 2011-01-09 05:26

JonD,

In the past with the windows repeater I've left it off overnight and have had similar results. I could test this if needed but I'm already having different results.

I'll test the changing of a local IP.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
User avatar
supercoe
Super-Mod
Super-Mod
 
Posts: 1735
Joined: 2009-07-20 21:27
Location: Walker, MN

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby redge » 2011-01-09 10:38

JonD wrote:What happens if the repeater is down for longer periods of time as opposed to a relatively quick restart?

if you meaning: if ip/FQDN responding, it just retry to reconnect
if you meaning: if ip/FQDN not responding ?
in this case, winvnc stop retry and close
i did not success winvnc trying to reconnect after 7min like someone wrote
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
redge
Super-Mod
Super-Mod
 
Posts: 6815
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby Rat » 2011-01-09 22:20

I just did a test waiting 24hrs with the Perl repeater and the server never re-connected....
Rat
80
80
 
Posts: 182
Joined: 2004-11-01 02:11

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby supercoe » 2011-01-09 22:59

I'll test again waiting longer.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
User avatar
supercoe
Super-Mod
Super-Mod
 
Posts: 1735
Joined: 2009-07-20 21:27
Location: Walker, MN

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby Mimamau » 2011-01-28 16:54

I have the same problems. When the server is connected to the repeater and you pull the network connection, winvnc will display a dialog box "Initiate Connection". If you then restore the network connection, nothing happens. Only if you close the dialog box, winvnc reconnects to the repeater.

This is a big problem for me as I have a lot of boxes on unreliable 3G and other wireless connections.

I tried to make the chunkvnc service to close the box on itself (in this "If WinExists( "Initiate Connection" ) Then..." part, but it doesen't work.
EDIT: Ok, just noticed, chunkvnc doesnt' have a service so this won't work.

Will now take a look at the winvnc code if its possible to silently drop this dialog box.
Last edited by Mimamau on 2011-01-28 17:30, edited 1 time in total.
Mimamau
 
Posts: 2
Joined: 2008-09-21 13:30
Location: Germany

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby redge » 2011-01-29 22:45

Rudi fixed a bug of Reconnect of vncviewer, don't know this trouble winvnc or both
but we not yet the public update 1.0.5.1?
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
redge
Super-Mod
Super-Mod
 
Posts: 6815
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: Will UltraVNC attempt to Reconnect to the Repeater

Postby Mimamau » 2011-01-31 15:05

With winvnc.exe version 1.0.5.2 it doesn't seem to happen.
Mimamau
 
Posts: 2
Joined: 2008-09-21 13:30
Location: Germany


Return to ChunkVNC

Who is online

Users browsing this forum: No registered users and 3 guests