Early UVNC connection timeout on idle connection

Here you will find help for frequently asked questions as well as for your specific question.

Early UVNC connection timeout on idle connection

Postby ppatenaude » 2017-07-13 13:18

Hello,

We are planning on upgrading our UVNC server and client to version 1.2.1.1 from version 1.1.9.0. One of our requirements is that the connection will close after an hour.

When testing this with client version 1.2.1.1 and server 1.2.1.1, I see the connection closing after about 5 minutes. It seems that this only happens when there is no activity on the connection. I have tested this with the server running in Windows 7 and Windows XP.

When testing this with client version 1.2.1.1 and server 1.1.9.0, the connection stays open for the full hour.

As I understand it, the KeepAliveInterval property should keep the connection alive by sending packets every 5 seconds. We didn't make any changes to ultravnc.ini file between 1.1.9.0 and 1.2.1.1.

We are using a setup with a Linux repeater.

I enabled logging for the server, and it seems to close the same way every time I tested it. It prints out:
Code: Select all
vsocket.cpp : zero bytes read1
vncservice.cpp : SelectHDESK to Default (28) from 28
vncclient.cpp : client disconnected : 52.6.118.201 (1)


Windows XP log sample:
Code: Select all
vncmenu.cpp : ############### Usernames change: old="VetStation", new="VetStation"
--Overlapped I/O operation is in progress.
Wed Jul 12 14:23:15 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 275 1587872758
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 39 627 236 253 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 234 515 
Wed Jul 12 14:23:16 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 275 1587872758
Wed Jul 12 14:23:17 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 275 1587872758
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 39 627 236 253 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 515 535 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 37 629 234 515 
Wed Jul 12 14:23:18 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 275 1587872758
Wed Jul 12 14:23:19 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 275 1587872758
HideDesktop.cpp : Killwallpaper 1
--Not enough storage is available to complete this operation.
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 59 658 574 596 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 662 678 574 598 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 2 54 574 596 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 2 54 574 596 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 59 682 574 598 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 682 798 574 598 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 684 738 577 595 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 -2 802 570 602 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 2 54 574 596 
vncdesktopsink.cpp : OOOOOOOOOOOO 49451 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 684 738 577 595 
vncmenu.cpp : ############### Usernames change: old="VetStation", new="VetStation"
--Overlapped I/O operation is in progress.
Wed Jul 12 14:23:20 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 275 1587872758
Wed Jul 12 14:23:21 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 275 1587872758
Wed Jul 12 14:23:22 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 275 1587872758
vsocket.cpp : zero bytes read1
vncservice.cpp : SelectHDESK to Default (28) from 28
vncclient.cpp : client disconnected : 52.6.118.201 (1)
vncclient.cpp : kill update thread
--Overlapped I/O operation is in progress.
vncclient.cpp : update thread gone
vncserver.cpp : removing authorised client
vncserver.cpp : deleting desktop server
vncdesktop.cpp : ~vncDesktop
vncdesktopsink.cpp : ~vncDesktop::Tell initwindowthread to close
vncdesktopsink.cpp : OOOOOOOOOOOO 18 0
vncdesktopsink.cpp : OOOOOOOOOOOO called wm_quit
vncdesktopsink.cpp : Unsethooks OK
--Access is denied.
vncdesktopsink.cpp : WM_DESTROY
vncserver.cpp : KillAuthClients() done
vncdesktopthread.cpp : quitting desktop server thread
vncdesktopthread.cpp : quitting desktop server thread:SetBlockInputState
--The system cannot find the file specified.
vncdesktopthread.cpp : quitting desktop server thread:ClearShiftKeys
vncdesktopthread.cpp : quitting desktop server thread:g_DesktopThread_running=false
--The system cannot find the file specified.
vncdesktopsink.cpp : ShutdownInitWindowthread
vncservice.cpp : SelectHDESK to Default (28) from 28


Windows 7 log sample:
Code: Select all
Wed Jul 12 14:37:59 2017
HideDesktop.cpp : Killwallpaper 1
vncmenu.cpp : DisableAero 0
vncmenu.cpp : ############### Usernames change: old="Admin", new="Admin"
--The system cannot find the file specified.
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 0 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 275 4457284
Wed Jul 12 14:38:00 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 0 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 275 4457284
Wed Jul 12 14:38:01 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 0 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 275 4457284
Wed Jul 12 14:38:02 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 0 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 275 4457284
Wed Jul 12 14:38:03 2017
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 0 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 275 4457284
Wed Jul 12 14:38:04 2017
HideDesktop.cpp : Killwallpaper 1
vncmenu.cpp : DisableAero 0
vncmenu.cpp : ############### Usernames change: old="Admin", new="Admin"
--The system cannot find the file specified.
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 0 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 275 4457284
Wed Jul 12 14:38:05 2017
vsocket.cpp : zero bytes read1
vncservice.cpp : SelectHDESK to Default (48) from 48
vncclient.cpp : client disconnected : 52.6.118.201 (1)
vncclient.cpp : kill update thread
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 0 1024 
vncdesktopsink.cpp : OOOOOOOOOOOO 49601 0
vncdesktopsink.cpp : RFB_SCREEN_UPDATE 
vncdesktopsink.cpp : REct3 0 1280 996 1024 
vncclient.cpp : stopping update thread
client sent 1012 updates
vncclient.cpp : update thread gone
vncserver.cpp : removing authorised client
vncserver.cpp : deleting desktop server
vncdesktop.cpp : ~vncDesktop
vncdesktopsink.cpp : ~vncDesktop::Tell initwindowthread to close
vncdesktopsink.cpp : OOOOOOOOOOOO 18 0
vncdesktopsink.cpp : OOOOOOOOOOOO called wm_quit
vncdesktopsink.cpp : Unsethooks OK
--Access is denied.
vncdesktopsink.cpp : WM_DESTROY
vncdesktopsink.cpp : OOOOOOOOOOOO end dispatch
--Invalid window handle.
vncdesktopsink.cpp : ~vncDesktop:: iniwindowthread proper closed
Wed Jul 12 14:38:06 2017
vncserver.cpp : KillAuthClients() done
vncdesktopthread.cpp : quitting desktop server thread
vncdesktopthread.cpp : quitting desktop server thread:SetBlockInputState
vncdesktopthread.cpp : quitting desktop server thread:ClearShiftKeys
vncdesktopthread.cpp : quitting desktop server thread:g_DesktopThread_running=false
vncdesktopsink.cpp : ShutdownInitWindowthread
vncservice.cpp : SelectHDESK to Default (48) from 48


Any help would be appreciated. Thanks!
ppatenaude
 
Posts: 3
Joined: 2017-07-13 12:27

Re: Early UVNC connection timeout on idle connection

Postby Rudi De Vos » 2017-07-13 19:32

Are you talking about a server<->viewer timeout
or
server <->repeater timeout before viewer is able to connect
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 5488
Joined: 2004-04-23 10:21

Re: Early UVNC connection timeout on idle connection

Postby ppatenaude » 2017-07-13 19:41

The viewer is able to connect through the repeater. I am able to interact with the server. If I stop interacting with the server and no subsequent screen updates happen, then it closes in a few minutes.
ppatenaude
 
Posts: 3
Joined: 2017-07-13 12:27

Re: Early UVNC connection timeout on idle connection

Postby Rudi De Vos » 2017-07-17 20:43

Looks like a server recv() timeout "zero bytes read1"
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 5488
Joined: 2004-04-23 10:21

Re: Early UVNC connection timeout on idle connection

Postby ppatenaude » 2017-07-20 17:51

We have a load balancer between the server and the repeater (but only one repeater). I believe that when there is no activity going through, it closes the socket. Would that cause the recv() timeout? Is there a configuration option that would prevent it from timing out within an hour (similar to the KeepAliveInterval)?

If we make the load balancer stay alive for an hour that would fix the issue, but it wouldn't prevent other infrastructure that we don't have control over from closing the socket.
ppatenaude
 
Posts: 3
Joined: 2017-07-13 12:27

Re: Early UVNC connection timeout on idle connection

Postby Rudi De Vos » 2017-07-26 21:09

While idle and viewer in debug i see the viewer sending and receiving keepalive packets

viewer send keepalive to server every 5 sec
server send keepalive to viewer every 60 sec

test:
repeater + encryption
server is US, viewer in EU

line was still open after 1 hour.
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 5488
Joined: 2004-04-23 10:21


Return to General help

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 6 guests