Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: 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://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

UltraVNC server not reconnecting to repeater in user session

Post Reply
xexijreil
8
8
Posts: 10
Joined: 2015-08-31 08:56

UltraVNC server not reconnecting to repeater in user session

Post by xexijreil »

Hi,

I've got a Repeater allowing modes I and II installed in an Amazon server, and I'm trying to connect viewer and server through it.
On the server side, I've got two accounts, user and admin one. I've installed 1.2.0.9 server as service in admin account, and have added the following line after [admin] to the uvnc.ini file:
service_commandline=-autoreconnect ID:0001 -connect Repeater_server_IP:5502
On startup, the pc automatically logs on user account, and server connects to Repeater, so I can login with Viewer, but once I close connection in Viewer and both, server and viewer remove from the repeater List, werver won't reconnect to repeater as it should do. But it does reconnect to repeater if I try what I've explained, logging into admin account instead of user one.

Is there any workaround for this? Any command that I'm missing or permissions I should grant to uvnc.ini file?
I've tried to read the winvnc.log file but I get lost in it.

Thank's a lot in advance.
xexijreil
8
8
Posts: 10
Joined: 2015-08-31 08:56

Re: UltraVNC server not reconnecting to repeater in user ses

Post by xexijreil »

No idea why this could be?
xexijreil
8
8
Posts: 10
Joined: 2015-08-31 08:56

Re: UltraVNC server not reconnecting to repeater in user ses

Post by xexijreil »

I've tried workarounds suggested here (https://forum.ultravnc.net/viewtopic.php?f=3&t=31073&), even although it's not the same problem, cause I have two instances in user account as well as in admin one. It keeps on not reconnecting.
It seems as in user account the -autoreconnect line is not read or accesible, or if it is, the autoreconnect it's not executed.
How does autoreconnect work in server? Maybe knowing this I can get to where the problem is.
Last edited by xexijreil on 2015-12-02 09:50, edited 1 time in total.
xexijreil
8
8
Posts: 10
Joined: 2015-08-31 08:56

Re: UltraVNC server not reconnecting to repeater in user ses

Post by xexijreil »

I've also tried to execute the following line from cmd while in user Account:
winvnc.exe -autoreconnect ID:0001 -connect IP:PORT

This makes the server connect to repeater, but it doesn't reconnect after a session is closed.

So how does the autoreconnection works? What file, code or behaviour needs to be executed so that the server will try to always reconnect? Why it does it in admin account but not in user one?

Please help.


Update:
The autoreconnection also occurs while logged off of both users. Hope this example illustrates clearly enough what I'm experiencing:

1. Power on PC
2. Autologon User account -> Server connects to Repeater
3. Viewer connects to Repeater and remote access server
4. Viewer close connection -> Viewer and server disconnect from Repeater
5. There's no Server reconnection unless I execute via cmd: winvnc.exe -autoreconnect ID:0001 -connect IP:PORT. Let's suppose I don't execute it, so server is not connected to Repeater
6. Logoff from user account -> Screen to choose user logon: Admin or User -> server connects to Repeater
7. Viewer connects to Repeater and remote access server
8. Viewer close conecction -> Viewer and server disconnect from Repeater -> Server autoreconeccts to repeater
9. Logon to admin account
10. Viewer connects to Repeater and remote access server
11. Viewer close conecction -> Viewer and server disconnect from Repeater -> Server autoreconeccts to repeater
12. Logoff from admin account -> server disconnect from Repeater -> Screen to choose user logon: Admin or User -> server connects to Repeater
13. Logon to user account
14. Viewer connects to Repeater and remote access server
15. Viewer close conecction -> Viewer and server disconnect from Repeater -> Repeater no longer autoreconnects until executed command line connection, logoff from user or restart the PC.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6832
Joined: 2004-04-23 10:21
Contact:

Re: UltraVNC server not reconnecting to repeater in user ses

Post by Rudi De Vos »

session 1 Current Desktop user <<<<<< Access as Normal user/admin/service
session 1 Secure desktop logon/uac/ctraltdel/select user switch <<< Require winvnc.exe to be started with runas admin/service
session 2 other user2/logon session <<< session2 is only accessable if winvnc was started as service.
This are OS limitations

When you start winvnc.exe manual, you are resticted to the current desktop.

cmd: winvnc.exe -autoreconnect ID:0001 -connect IP:PORT -run
service_commandline=winvnc.exe -autoreconnect ID:0001 -connect IP:PORT
You can not run 2 winvnc.exe simultanious ( as user and service)

Try latest repeater/winvnc and only in service mode with service_commanline, this is the only way it can work with multiple users.
Latest rep is in this zip
http://www.uvnc.eu/download/1209/UVNC_Launch07.zip
Latest winvnc.exe
http://www.uvnc.eu/download/test/winvnc_test1_2110.zip
xexijreil
8
8
Posts: 10
Joined: 2015-08-31 08:56

Re: UltraVNC server not reconnecting to repeater in user ses

Post by xexijreil »

Please, tell me if I'm wrong.
Rudi De Vos wrote:session 1 Current Desktop user <<<<<< Access as Normal user/admin/service
I understand this is the session where there would have to be no problem, as is the current desktop user.
I'm installing UltraVNC server in a Windows Embedded 8 Standard OS, which is the same as Windows 8 but customized, and just with the modules that I want to be installed. I've configured this system with two users: Admin and User. Admin has a password, User doesn't (although I have tried adding password to user to see if this could be a problem, but no autoreconnection yet). The system autologon to User account on startup, and it doesn't launch the explorer, it launches a program executable.
This is the session where the server is unable to reconnect to repeater.
I've also tried the following to no avail:
Within this User session, execute taskmgr as admin (entering admin password), terminating current UltraVNC processes, executing winvnc.exe as admin (entering admin password), executing uvnc_settings as admin (entering admin password), starting service in service tab. Check if this way server autorecconets, but it doesn't.
Rudi De Vos wrote:session 1 Secure desktop logon/uac/ctraltdel/select user switch <<< Require winvnc.exe to be started with runas admin/service
I suppose this is my Admin session, as to enter it I have to logoff from User, select Admin, enter the Admin pass and accept uac.
In this session everything works as expected, UltraVNC server reconnects to repeater the right way, even, as stated in my previous post, before entering Admin session but upon exiting User one.
Rudi De Vos wrote:session 2 other user2/logon session <<< session2 is only accessable if winvnc was started as service.
I think I don't have a session of this kind.
Rudi De Vos wrote:When you start winvnc.exe manual, you are resticted to the current desktop.
I install UltraVNC server following the installer steps, and check the install as service box so it gets installed this way. I don't start winvnc.exe manually.
Rudi De Vos wrote: cmd: winvnc.exe -autoreconnect ID:0001 -connect IP:PORT -run
service_commandline=winvnc.exe -autoreconnect ID:0001 -connect IP:PORT
You can not run 2 winvnc.exe simultanious ( as user and service)
My goal trying to execute that command was to see if the not autoreconnection issue was related to it.
Rudi De Vos wrote:Try latest repeater/winvnc and only in service mode with service_commanline, this is the only way it can work with multiple users.
Latest rep is in this zip
http://www.uvnc.eu/download/1209/UVNC_Launch07.zip
Latest winvnc.exe
http://www.uvnc.eu/download/test/winvnc_test1_2110.zip
The server version I have is 1.2.0.9, and the repeater version is the Unix1 one that can be found here: http://www.uvnc.com/downloads/repeater/ ... loads.html
Is this version of Repeater the same you have linked to me? As I have to install Repeater in Linux server I would need the .tar
Anyway, I will try to install this repeater files in Windows and see if server autoreconnects in user session.

Thank's a lot for your help Rudi!!! Much appreciate it.

Kind regards.

UPDATE:
I've tried the files you've sent me but both, server and repeater, keep acting the same way. I don't think this is a repeater issue, but I've tried using a Windows Laptop as repeater just in case.

I've executed the server testversion, added service_commandline, and installed as service. As with previous server version, there is no problem connecting to repeater in both user and Admin sessions, but it will just autoreconnect when exiting user session. If there is anything you think I could try to debug this please tell me.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6832
Joined: 2004-04-23 10:21
Contact:

Re: UltraVNC server not reconnecting to repeater in user ses

Post by Rudi De Vos »

After rereading the message again, it looks like you wanted to say

When you make a connection to the repeater, connect/disconnect the viewer, the server doesn't reconnect to the repeater.
Unless you force the uvnc service to restart winvnc.exe by doing a windows logoff/logon.

This mean that in your case, the autoreconnect isn't working
After viewer disconnect, the server also disconnect. The autoreconnect option should then reconnect the server back to the repeater. I can try to simulate it, but it isn't a general issue.

Can you activate winvnc.log, connect to repeater and connect/disconnect viewer.
Perhaps some clue is logged..
xexijreil
8
8
Posts: 10
Joined: 2015-08-31 08:56

Re: UltraVNC server not reconnecting to repeater in user ses

Post by xexijreil »

I already did it, but I couldn't understand it as to discover any clue. I will try it again, it's possible that I won't be able to do it till Monday.
Thank's a lot for your help!!
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6832
Joined: 2004-04-23 10:21
Contact:

Re: UltraVNC server not reconnecting to repeater in user ses

Post by Rudi De Vos »

I'm testing with the repeater for a few weeks now and after disconnect i don't have this issue
winvnc + repeater on same pc
service_commandline=-autoreconnect ID:12345678 -connect localhost
The only problem is when you start winvnc and the repeater is offline, then it take a long time before winvnc try to reconnect.

Get status info
winvnc: systray icon " list clients" also has some info
repeater:
browser http://localhost ( repeater ip address when it's hosted on another server)
user admin password adminadmi2 ( default repeater password )
xexijreil
8
8
Posts: 10
Joined: 2015-08-31 08:56

Re: UltraVNC server not reconnecting to repeater in user ses

Post by xexijreil »

Rudi De Vos wrote:I'm testing with the repeater for a few weeks now and after disconnect i don't have this issue
winvnc + repeater on same pc
service_commandline=-autoreconnect ID:12345678 -connect localhost
The only problem is when you start winvnc and the repeater is offline, then it take a long time before winvnc try to reconnect.

Get status info
winvnc: systray icon " list clients" also has some info
repeater:
browser http://localhost ( repeater ip address when it's hosted on another server)
user admin password adminadmi2 ( default repeater password )
Have you tried using server installed as server but login in User (without admin rights) session?
I've checked that info and also seen the repeater log but no clue about why this could happen. I'm gonna see winvnc.log and post it here.
Thank's!
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6832
Joined: 2004-04-23 10:21
Contact:

Re: UltraVNC server not reconnecting to repeater in user ses

Post by Rudi De Vos »

As service, winvnc always run as system, not the desktop user.

When you noticed a difference between admin and guest desktop user..i will check that specific.
You never know if some internal function is using the desktop permission for some reason.

R.
xexijreil
8
8
Posts: 10
Joined: 2015-08-31 08:56

Re: UltraVNC server not reconnecting to repeater in user ses

Post by xexijreil »

I've activated winvnc.log and checked it. There are some errors that may be related to my problem but I get lost in it. Can I send you the log?

These are some of the errors or possible problem causes that I've spotted:

Sometimes the GetCurrentUser returns PixelAdmin and sometimes returns SYSTEM. As I said in previous posts, I have two Users, PixelAdmin (password protected) and PixelUser (not password protected and autologon on PC startup). I suppose it returns SYSTEM when the current session is PixelUser one.

After
GetCurrentUser - Username found:
, when PixelAdmin, after it appears
vncmenu.cpp : ########### Shell_TrayWnd found 1
vncservice.cpp : @@@@@@@@@@@@@
, when SYSTEM, after it appears
--No hay más archivos.
which means
--There are no more files.
Also, this appears several times:
ApplyUserPrefs - Plugin NOT enabled
c:\users\rudi\desktop\ultravnc_latest\winvnc\winvnc\vncpasswd.h : PASSWD : ToText called
vncsockconnect.cpp : started socket connection thread
--No se puede encontrar el módulo especificado.
I've checked if ultravnc creates rudi user but it doesn't.

After viewer disconnection while in PixelUser session, there appear several errors while trying to exit desktop.

Another one:
@@@@@@@@@@@@@ GetCurrentUser - Error: Usersize 0
vncproperties.cpp : ***** DBG - Force USER SYSTEM 2
vncservice.cpp : @@@@@@@@@@@@@ GetCurrentUser - Error: Usersize 0
vncservice.cpp : @@@@@@@@@@@@@
It would be great if I could send you the log or post it here, cause I don't understand most of it.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6832
Joined: 2004-04-23 10:21
Contact:

Re: UltraVNC server not reconnecting to repeater in user ses

Post by Rudi De Vos »

press my name in the post and you have my mail ro can pm stuff.

GetcurrentUser -> fail when there is no user loggen, like on a logon screen.
The functions give errors like size=0, but expected result, no real error.

You have 3 users:
Pixeladmin -> admin
PixelUser -> guest, autologin
System -> for logon desktop, switchuser desktop... Usersize=0, force system.
xexijreil
8
8
Posts: 10
Joined: 2015-08-31 08:56

Re: UltraVNC server not reconnecting to repeater in user ses

Post by xexijreil »

Rudi De Vos wrote: GetcurrentUser -> fail when there is no user loggen, like on a logon screen.
On a logon screen the server autoreconnects, I've tried that.

I've sent you a link to the log. This is the sequence I've followed in case it helps you understand the log:

1. Inside PixelAdmin session I activate the log in server properties, then I restart the PC.
2. Autologon to PixelUser, server connects to repeater, viewer connects to server through repeater.
3. Viewer disconnects from server, server diconnects from repeater, there is no autoreconnection inside PixelUser Session.
4. Logoff from PixelUser, server reconnects on logon screen. Viewer connects to server through repeater. Viewer an server are removed from repeater, server autoreconnects.
5. Log on to PixelAdmin session, viewer connects to server through repeater. Viewer disconects and so does server from repeater, server autoreconnects.
6. Logoff from PixelAdmin and Logon to PixelUser, server disconnects and reconnects (didn't notice if disconnected before or after logon), viewer connects to server through repeater.
7. Viewer disconnects, viewer and server are removed from repeater. Server dont autoreconect.
Post Reply