Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
Server 2008 R2 SP1 - Connections Problems
Server 2008 R2 SP1 - Connections Problems
Scenario : Windows 2008 R2 SP1 Spanish
The whole behaviour is supervised via iLO on a HP server.
UltraVNC : 1.2.1.2
Installed mirror driver. Activated SystemHookDll and Mirror Driver.
On startup, Windows Server is on the CTRL-Alt-Supr screen.
Connect via UltraVNC. Connection succeeds, but terribly slow. I press CTRL-Alt-Supr, type user/password with UltraVNC and Windows begins the user login. UltraVNC viewer loses connection, and the desktop is no more redrawn. In iLO I can see the desktop, and the UltraVNC icon appears in tray, in yellow. It says Winvnc - <IPs> - <EQName> - Service - vnchook. The viewer is not getting any updates. The desktop is not being drawn. If I disconnect the viewer, the server hangs, and it stays in yellow. The CPU keeps on a high state.
If I try to reconnect, I never get a connection. UltraVNC server keeps crashing and restarting. It logs an incoming session in Windows log, then crashes, and restarts.
If I restart the service, then randomly I get the same crash behaviour, or a total stable server after a few attemps. Before crashing, I can see with iLO, that the server says on tray : Winvnc - <IPs> - <EQName> - Service - driver. Then crashes (disappears) and restarts in a loop. No logs in Windows about the crash.
Maybe a not closed connection in the crashed server is the cause?
Sometimes when a connection is made, I can see briefly the server is connected with vnchook, then it changes to driver. Maybe the swapping, if a connection is hung, is causing the issue? I don't know if the server is really swapping modes, or it is just an misinfo issue.
If I logout the user, the connection does not drop, and it lets me relogin with CTRl-Alt-Supr. As soon as the desktop is drawn, the same issue appears. The server hangs. The viewer never gets the desktop image. The server hangs in yellow, high CPU, etc, etc.
When server hangs, I can see with TCPview 2 connections to the server. One that is saying CLOSE_WAIT, and another one. So one connection is hung. When the connection is purged by the OS, the ultravnc server keeps on yellow, by few seconds, then it crashes, and restarts in blue. Then, and only then, I can stablish a correct connection to the server.
Is the server restarting/crashing, when we go from the CTRL-Alt-Supr screen to the user desktop? Is the server not closing the connection when doing that?
In brief. When logging out, the connection is not lost, but it becomes terribly slow (swapping driver/hook?). At least I can manage the server. As soon as I login, the viewer never gets the desktop. Sometimes it crashes and restart, and I can see 2 connections (one in CLOSE_WAIT state and one STABLISHED), but never really connects. Sometimes it does not crash, and I can see only one connection, but the viewer never gets the desktop. If I close the viewer, the connection appears as CLOSE_WAIT, but cannot reconnect ever. Most of the times, when the connection is purged by the OS, the server crashes and it restarts, and then I can connect correctly. But I have observed too at least one time, that the server has not crashed whe the OS purged the connection, but then, I cannot reconnect.
So the working scenario, in this case is: all pending connections closed, and restarted server, it is OK. If the server is restarted when connections are hung, then it is a no go.
The question is: why are the connections hung?
It is driving me nuts, as I cannot connect after loggin in, and I have to wait a prudential time, to let the OS close connections, and hope that the server has crashed/restarted in a clean state. If not, then I have to connect/disconnect again and make the wait again.
I have described as much info as I can collect, in hope that it can give you any clue.
The whole behaviour is supervised via iLO on a HP server.
UltraVNC : 1.2.1.2
Installed mirror driver. Activated SystemHookDll and Mirror Driver.
On startup, Windows Server is on the CTRL-Alt-Supr screen.
Connect via UltraVNC. Connection succeeds, but terribly slow. I press CTRL-Alt-Supr, type user/password with UltraVNC and Windows begins the user login. UltraVNC viewer loses connection, and the desktop is no more redrawn. In iLO I can see the desktop, and the UltraVNC icon appears in tray, in yellow. It says Winvnc - <IPs> - <EQName> - Service - vnchook. The viewer is not getting any updates. The desktop is not being drawn. If I disconnect the viewer, the server hangs, and it stays in yellow. The CPU keeps on a high state.
If I try to reconnect, I never get a connection. UltraVNC server keeps crashing and restarting. It logs an incoming session in Windows log, then crashes, and restarts.
If I restart the service, then randomly I get the same crash behaviour, or a total stable server after a few attemps. Before crashing, I can see with iLO, that the server says on tray : Winvnc - <IPs> - <EQName> - Service - driver. Then crashes (disappears) and restarts in a loop. No logs in Windows about the crash.
Maybe a not closed connection in the crashed server is the cause?
Sometimes when a connection is made, I can see briefly the server is connected with vnchook, then it changes to driver. Maybe the swapping, if a connection is hung, is causing the issue? I don't know if the server is really swapping modes, or it is just an misinfo issue.
If I logout the user, the connection does not drop, and it lets me relogin with CTRl-Alt-Supr. As soon as the desktop is drawn, the same issue appears. The server hangs. The viewer never gets the desktop image. The server hangs in yellow, high CPU, etc, etc.
When server hangs, I can see with TCPview 2 connections to the server. One that is saying CLOSE_WAIT, and another one. So one connection is hung. When the connection is purged by the OS, the ultravnc server keeps on yellow, by few seconds, then it crashes, and restarts in blue. Then, and only then, I can stablish a correct connection to the server.
Is the server restarting/crashing, when we go from the CTRL-Alt-Supr screen to the user desktop? Is the server not closing the connection when doing that?
In brief. When logging out, the connection is not lost, but it becomes terribly slow (swapping driver/hook?). At least I can manage the server. As soon as I login, the viewer never gets the desktop. Sometimes it crashes and restart, and I can see 2 connections (one in CLOSE_WAIT state and one STABLISHED), but never really connects. Sometimes it does not crash, and I can see only one connection, but the viewer never gets the desktop. If I close the viewer, the connection appears as CLOSE_WAIT, but cannot reconnect ever. Most of the times, when the connection is purged by the OS, the server crashes and it restarts, and then I can connect correctly. But I have observed too at least one time, that the server has not crashed whe the OS purged the connection, but then, I cannot reconnect.
So the working scenario, in this case is: all pending connections closed, and restarted server, it is OK. If the server is restarted when connections are hung, then it is a no go.
The question is: why are the connections hung?
It is driving me nuts, as I cannot connect after loggin in, and I have to wait a prudential time, to let the OS close connections, and hope that the server has crashed/restarted in a clean state. If not, then I have to connect/disconnect again and make the wait again.
I have described as much info as I can collect, in hope that it can give you any clue.
Re: Server 2008 R2 SP1 - Connections Problems
Some more info about the issue. The description is from the CRTL-Alt-Supr screen.
Version 1.9.0.6 : Goes straight onto desktop after a 2-3 seconds pause. So OK. Desktop colors are corrupted, maybe because the desktop is 16bits depth, not 32. I can hardly read text. Losses connection when logging out a user, but can reconnect again without issue.
Version 1.2.0.6 : Goes straight onto desktop after a 2-3 seconds pause. So OK. Desktop colors are OK. Losses connection when logging out a user, but can autoreconnect if I put the timeout to 5 seconds. So I can login and logout practically without issues. Best version so far for login/logout.
Version 1.2.1.0 : Does not get to desktop. Does not crash nor restart. Cannot connect after login. I have to manually terminate the bigger of the two winvnc.exe instances in task manager. I cannot even restart service. I have to manually kill the .exe. Autoreconnects to CRTL-Alt-Supr screen when loging out.
Version 1.2.1.1 : Does not get to desktop. Server crashes and restart. Sometimes leaves a zombie behind. Task manager shows 3 instances of winvnc.exe, one of them with high CPU usage and responsible for not letting the viewer connect. If I manually kill this instance, then I can normally connect. Sometimes I get the same CLOSE_WAIT issue as with version 1.2.1.2, and cannot connect until I kill the bigger winvnc.exe and the server autorestarts. Autoreconnects to CRTL-Alt-Supr screen when loging out.
Version 1.2.1.2 : Same as above.
As a workaround, I have created a script that kills any instance of winvnc.exe, and restarts the service.
Used gpedit.msc and placed the script under login scripts in "User Configuration\Windows Settings\Scripts (Logon/Logoff)". After that, I get a clean reconnection when loging in, at 1st or 2nd attemp.
The script is this:
Not ideal, of course...
Version 1.9.0.6 : Goes straight onto desktop after a 2-3 seconds pause. So OK. Desktop colors are corrupted, maybe because the desktop is 16bits depth, not 32. I can hardly read text. Losses connection when logging out a user, but can reconnect again without issue.
Version 1.2.0.6 : Goes straight onto desktop after a 2-3 seconds pause. So OK. Desktop colors are OK. Losses connection when logging out a user, but can autoreconnect if I put the timeout to 5 seconds. So I can login and logout practically without issues. Best version so far for login/logout.
Version 1.2.1.0 : Does not get to desktop. Does not crash nor restart. Cannot connect after login. I have to manually terminate the bigger of the two winvnc.exe instances in task manager. I cannot even restart service. I have to manually kill the .exe. Autoreconnects to CRTL-Alt-Supr screen when loging out.
Version 1.2.1.1 : Does not get to desktop. Server crashes and restart. Sometimes leaves a zombie behind. Task manager shows 3 instances of winvnc.exe, one of them with high CPU usage and responsible for not letting the viewer connect. If I manually kill this instance, then I can normally connect. Sometimes I get the same CLOSE_WAIT issue as with version 1.2.1.2, and cannot connect until I kill the bigger winvnc.exe and the server autorestarts. Autoreconnects to CRTL-Alt-Supr screen when loging out.
Version 1.2.1.2 : Same as above.
As a workaround, I have created a script that kills any instance of winvnc.exe, and restarts the service.
Used gpedit.msc and placed the script under login scripts in "User Configuration\Windows Settings\Scripts (Logon/Logoff)". After that, I get a clean reconnection when loging in, at 1st or 2nd attemp.
The script is this:
Code: Select all
taskkill /F /IM winvnc.exe
net start uvnc_service
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
Re: Server 2008 R2 SP1 - Connections Problems
WIndows 2008 R2 is the same OS as win7. This is not an ideal OS for using the mirror driver.
win7 already had the wddm driver while the mirror driver is xpdm, so each time it's activated the video driver need to switch mode.
First let try this first to see how stable that run.
server
-without mirror driver , vnchook on
-full screen polling
viewer
-set a fixed encoder viewer
16bit ? is the screenr realy 16bit
u2 encoder , zrle tight all use jpeg and jpeg is 32bit
16bit encoder -> use hextile
win7 already had the wddm driver while the mirror driver is xpdm, so each time it's activated the video driver need to switch mode.
First let try this first to see how stable that run.
server
-without mirror driver , vnchook on
-full screen polling
viewer
-set a fixed encoder viewer
16bit ? is the screenr realy 16bit
u2 encoder , zrle tight all use jpeg and jpeg is 32bit
16bit encoder -> use hextile
Re: Server 2008 R2 SP1 - Connections Problems
Hello Rudi.
Thank you for your response.
I've been doing what you have told me.
I really do not get the point of not using the mirror driver. Without the mirror driver I get ALWAYS a core at 100% and the computer gets terribly slow. With the mirror driver, I get 0% to 1%, so the difference is abismal.
Yes, the screen is 16bits. Matrox G200eH cannot get maximum resolution at 32bits. Anyway the human eye is not capable of differencing so many colors. Always thought 32bits were pure marketing. But that's not the reason of this setting here.
I always fix the encoder, as I select MEDIUM in connection speed and 256 colors. I do not need anymore to manage a server. It selects ZLRE encoder internally, I think. Tried with hextile aswell. The same result.
With System HookDll selected, and no mirror, I get to the desktop, but the computer is so slow that I can hardly manage anything. As I said, 1 core is always high. When I disconnect the viewer, the server icon dissapears, as if it crashed, then it restarts the server. When loging out, the connection is lost, but autoreconnects to CTRL-Alt-Supr screen. I can connect, but with such a hich CPU, it is unviable.
I can live with that high CPU on CTRL-Alt-Supr screen, before loging in, but not when managing a server remotely. It makes the temp on the server go high.
It seems that the server is not closing the connection with the client correctly when swapping modes, hence the CLOSE_WAIT status. It seems to be blocked somehow, as it stays in yellow when no connection is stablished.
Or, is there something I'm missing and the computer should not be so slow without the mirror driver?
Thank you for your response.
I've been doing what you have told me.
I really do not get the point of not using the mirror driver. Without the mirror driver I get ALWAYS a core at 100% and the computer gets terribly slow. With the mirror driver, I get 0% to 1%, so the difference is abismal.
Yes, the screen is 16bits. Matrox G200eH cannot get maximum resolution at 32bits. Anyway the human eye is not capable of differencing so many colors. Always thought 32bits were pure marketing. But that's not the reason of this setting here.
I always fix the encoder, as I select MEDIUM in connection speed and 256 colors. I do not need anymore to manage a server. It selects ZLRE encoder internally, I think. Tried with hextile aswell. The same result.
With System HookDll selected, and no mirror, I get to the desktop, but the computer is so slow that I can hardly manage anything. As I said, 1 core is always high. When I disconnect the viewer, the server icon dissapears, as if it crashed, then it restarts the server. When loging out, the connection is lost, but autoreconnects to CTRL-Alt-Supr screen. I can connect, but with such a hich CPU, it is unviable.
I can live with that high CPU on CTRL-Alt-Supr screen, before loging in, but not when managing a server remotely. It makes the temp on the server go high.
It seems that the server is not closing the connection with the client correctly when swapping modes, hence the CLOSE_WAIT status. It seems to be blocked somehow, as it stays in yellow when no connection is stablished.
Or, is there something I'm missing and the computer should not be so slow without the mirror driver?
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
Re: Server 2008 R2 SP1 - Connections Problems
The Matrox G200eH is one of the slowest card, caused by the video to system memory transfer bottleneck.
Some people prefer to use rdp instead of a real monitor...
ON the realvnc support you find some fine tunings
https://support.realvnc.com/knowledgeba ... ce-general
Are you susing the classic theme, this put the desktop in XP graphic mode... a lot faster remote.
But possible a server already has the clasic theme set.
Vnc need to follow the active session, when you logout the active session switch and the service restart winvnc in the new session.
Viewer lose connection and auto reconnect ( if set)
THis also happen when you use UAC, UAC popup run in a seperate session -> vnc need to switch to press OK and then reset default session. If not required disabled it for the asministrator to avoid the extra switches.
The capturing is the the slowest part on this video card and the mirror driver use his own capturing... indeed thiscould make a huge difference.
Just verified source and when vnc think he is running on XP it use another capture method.
Running as application you could test if this method is faster.
properties winvnc.exe -> compatibilirt [v] Run this program in compat.. mode XP SP3
Even when you run vnc on win7, vnc then think it's XP and use the alternate method.
try if pure polling also push the cpu to 100
( mirror driver in application mode only work when started runas admin)
Some people prefer to use rdp instead of a real monitor...
ON the realvnc support you find some fine tunings
https://support.realvnc.com/knowledgeba ... ce-general
Are you susing the classic theme, this put the desktop in XP graphic mode... a lot faster remote.
But possible a server already has the clasic theme set.
Vnc need to follow the active session, when you logout the active session switch and the service restart winvnc in the new session.
Viewer lose connection and auto reconnect ( if set)
THis also happen when you use UAC, UAC popup run in a seperate session -> vnc need to switch to press OK and then reset default session. If not required disabled it for the asministrator to avoid the extra switches.
The capturing is the the slowest part on this video card and the mirror driver use his own capturing... indeed thiscould make a huge difference.
Just verified source and when vnc think he is running on XP it use another capture method.
Running as application you could test if this method is faster.
properties winvnc.exe -> compatibilirt [v] Run this program in compat.. mode XP SP3
Even when you run vnc on win7, vnc then think it's XP and use the alternate method.
try if pure polling also push the cpu to 100
( mirror driver in application mode only work when started runas admin)
Re: Server 2008 R2 SP1 - Connections Problems
Thank you, Rudi, for all the explanations. It makes me understand better the behaviour.
You're right about the classic theme. No bells & whistles here. Not needed.
I have tried to execute the server as an application, in XP mode, but unfortunately, XP compatibility is not on the list. Only Vista & up.
Tried the application in application mode:
1.- Poll full screen (Ultra fast), no hook, and no driver. Terribly slow. Can hardly update the %CPU in taskmgr.exe. This slowness is observed too in iLO. The graphics, and responsiveness get slow too.
2.- Poll full screen (Ultra fast), hook activated, and no driver. Terribly slow. Maybe an impression, but seems to be more responsive. The %CPU in taskmgr.exe is painfully slow too. This slowlness is observed too in iLO. The graphics, and responsiveness get slow too.
3.- Poll full screen (Ultra fast), hook activated, driver activated. Works as it should. Practically no %CPU consumed (0% -1%).
The only drawback about the server in this current version, is that the server gets stuck when switching modes, as if it could not close the socket before switching. So it hangs and I cannot make any further connections after loging in. With the above script executed right after loging in, I get a clean server running when desktop loads, and it works. I observed too, that version 1.2.0.6 did not suffer from this when switching modes. And the current version only fails when loging in, when loging out it correctly disconnects/reconnects.
I don't know if it gives you any clue...
Edit: I did not notice the W7 compatibility note you told me. I tried that too in W7 compatibility mode and the same high CPU issue arises. Without driver it is totally unmanageable.
You're right about the classic theme. No bells & whistles here. Not needed.
I have tried to execute the server as an application, in XP mode, but unfortunately, XP compatibility is not on the list. Only Vista & up.
Tried the application in application mode:
1.- Poll full screen (Ultra fast), no hook, and no driver. Terribly slow. Can hardly update the %CPU in taskmgr.exe. This slowness is observed too in iLO. The graphics, and responsiveness get slow too.
2.- Poll full screen (Ultra fast), hook activated, and no driver. Terribly slow. Maybe an impression, but seems to be more responsive. The %CPU in taskmgr.exe is painfully slow too. This slowlness is observed too in iLO. The graphics, and responsiveness get slow too.
3.- Poll full screen (Ultra fast), hook activated, driver activated. Works as it should. Practically no %CPU consumed (0% -1%).
The only drawback about the server in this current version, is that the server gets stuck when switching modes, as if it could not close the socket before switching. So it hangs and I cannot make any further connections after loging in. With the above script executed right after loging in, I get a clean server running when desktop loads, and it works. I observed too, that version 1.2.0.6 did not suffer from this when switching modes. And the current version only fails when loging in, when loging out it correctly disconnects/reconnects.
I don't know if it gives you any clue...
Edit: I did not notice the W7 compatibility note you told me. I tried that too in W7 compatibility mode and the same high CPU issue arises. Without driver it is totally unmanageable.
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
Re: Server 2008 R2 SP1 - Connections Problems
Because i want to know myself if the capture method ( old xp one) behave better or not i will compile
a version that always use this method. Just for testing....
If it's better i always can add some swicth in the ini
Are you using a 32 or 64bit version.
a version that always use this method. Just for testing....
If it's better i always can add some swicth in the ini
Are you using a 32 or 64bit version.
Re: Server 2008 R2 SP1 - Connections Problems
Hello Rudi.
Thank you for the effort.
2008 R2 is only 64bits.
Making the switch onto the config file will be a plus, just in case someone need it. Even if it does not work with this particular configuration. I'm a fan of "manual overridings".
Thank you for the effort.
2008 R2 is only 64bits.
Making the switch onto the config file will be a plus, just in case someone need it. Even if it does not work with this particular configuration. I'm a fan of "manual overridings".
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
Re: Server 2008 R2 SP1 - Connections Problems
Thank you.
I will need 2 days for testing. I'm travelling for Xmas, and I'm just taking the CPU down.
Will post results on Saturday.
I will need 2 days for testing. I'm travelling for Xmas, and I'm just taking the CPU down.
Will post results on Saturday.
Re: Server 2008 R2 SP1 - Connections Problems
Hello Rudi and Merry Xmas to all.
I've finally mounted the server on another new location and made the tests.
I had to avoid using Windows authentication because the server said it missed a .dll.
1.- No hook, no mirror, as application : cpu high, slow but seems not as slow. If VNC is minimized, the real screen does not slow down (well, just a bit). When maximized, the real screen also slows down. If no parts on screen are changed, the CPU remains low. As soon as anything is changed the CPU goes high. This may be caused because the card is really slow.
2.- Hook, no mirror, as application : same as above.
3.- hook, mirror, as application : fast as it should.
I've finally mounted the server on another new location and made the tests.
I had to avoid using Windows authentication because the server said it missed a .dll.
1.- No hook, no mirror, as application : cpu high, slow but seems not as slow. If VNC is minimized, the real screen does not slow down (well, just a bit). When maximized, the real screen also slows down. If no parts on screen are changed, the CPU remains low. As soon as anything is changed the CPU goes high. This may be caused because the card is really slow.
2.- Hook, no mirror, as application : same as above.
3.- hook, mirror, as application : fast as it should.