Rdservice never reconnects

Hi Allan,
we are currently facing a problem with HDRobots.
The Terminal we run the HDRobots on currently tents to lose connection to the outer World and therefore also to OpenCore. This is obviously a problem on our side.

The Issue we have so is:
Once we reestablish connection to the OuterWorld the OpenRPA service which is still showing as running never recoonects to the OpenCore and does not show up in the clients list(Therefore also no HDRobots ever connect) until we restart the Terminal Server.

Is there no build in reconnect functionality in the rdservice? Or are we missing something? If there is not is there any way you can add that?

Greetings Marvin

I have never heard of people having issues with RDServices not reconnecting. Whenever I restart our production, I see lots of RD Service clients from all over the world reconnecting without problems. Maybe something is making the service think it’s still connected when the network is down?

Yea seemed to be an issue on our side, the service reconnected just fine at some point.

I mean, I could add a “ping” function inside the service, and if it does not get a reply, assume you’re disconnected, but that requires we know for sure the issue is, does not know it’s disconnected.

Inside Program Files\OpenRPA, there should be a file called something with “log” and “rd”. Can you check that file to see if it does disconnect when the network is down?

I think we misread the situation whats actually happening is:

  1. rdservice loses connection
  2. therefore all client HDBots lose connection
  3. rdservice reconnects
  4. rd service cant restore control over HDBots and HDBots never react again.

Atleast the rdservice keeps showing up back in the client list but the HDBots never come back.

[14:34:18.972][Information] Disconnected Unable to connect to the remote server
[14:34:20.019][Information] Connected to wss://*************/
[14:34:20.019][Information] WebSocketClient_OnOpen
[14:34:20.019][Information] Signing in
[14:34:20.175][Information] Signed in as **********
[14:34:20.175][Information] Get hostname and fqdn
[14:34:20.175][Information] Query for unattendedserver object in openrpa collection matcing computername 949dcrpats1 and computerfqdn 949dcrpats1.avag.holding
[14:34:20.269][Information] Check openflow config if it supports watches
[14:34:20.457][Information] Adding session for 949dcrpats1\serviceuserrpa1
[14:34:20.457][Information] Adding session for 949dcrpats1\serviceuserrpa3
[14:34:20.457][Information] Adding session for 949dcrpats1\serviceuserrpa4
[14:34:20.488][Information] Adding session for 949dcrpats1\serviceuserrpa2
[14:34:20.503][Output] watch created with id 9c7aecfb3bd36f23
[14:34:20.519] watch created with id 9c7aecfb3bd36f23
[14:34:20.519][Output] initialization complete, if any unattendedclients was found they should be loggin in now
[14:34:20.519] initialization complete, if any unattendedclients was found they should be loggin in now
[14:34:26.219][Error] System.Runtime.InteropServices.COMException (0x80070582): Class already exists. (Exception from HRESULT: 0x80070582)
   at MSTSCLib.IMsRdpClient9.Connect()
   at OpenRPA.RDService.Client.<ProcessTaskThread>b__21_0(Object sender, EventArgs args)
[14:34:26.219][Error] System.Runtime.InteropServices.COMException (0x80070582): Class already exists. (Exception from HRESULT: 0x80070582)
   at MSTSCLib.IMsRdpClient9.Connect()
   at OpenRPA.RDService.Client.<ProcessTaskThread>b__21_0(Object sender, EventArgs args)
[14:34:26.234][Error] System.Runtime.InteropServices.COMException (0x80070582): Class already exists. (Exception from HRESULT: 0x80070582)
   at MSTSCLib.IMsRdpClient9.Connect()
   at OpenRPA.RDService.Client.<ProcessTaskThread>b__21_0(Object sender, EventArgs args)
[14:34:38.645][Output] RdpConnectionOnOnDisconnected: 3 Your Remote Desktop Services session has ended, possibly for one of the following reasons:  The administrator has ended the session. An error occurred while the connection was being established. A network problem occurred.  For help solving the problem, see "Remote Desktop" in Help and Support.
[14:34:38.723][Output] RdpConnectionOnOnDisconnected: 3 Your Remote Desktop Services session has ended, possibly for one of the following reasons:  The administrator has ended the session. An error occurred while the connection was being established. A network problem occurred.  For help solving the problem, see "Remote Desktop" in Help and Support.
[14:34:38.863][Output] RdpConnectionOnOnDisconnected: 3 Your Remote Desktop Services session has ended, possibly for one of the following reasons:  The administrator has ended the session. An error occurred while the connection was being established. A network problem occurred.  For help solving the problem, see "Remote Desktop" in Help and Support.
[14:34:44.238][Output] RdpConnectionOnOnDisconnected: 2 User-initiated client logoff.
[14:34:44.393][Output] RdpConnectionOnOnDisconnected: 2 User-initiated client logoff.
[19:49:35.682][Information] Disconnected One or more errors occurred.
[19:49:35.682][Information] Disconnected 
[19:49:57.690][Information] Disconnected Unable to connect to the remote server
[19:50:19.696][Information] Disconnected Unable to connect to the remote server
[19:50:20.703][Information] Connected to wss://**************/
[19:50:20.704][Information] WebSocketClient_OnOpen
[19:50:20.706][Information] Signing in
[19:50:20.721][Information] Signed in as *********
[19:50:20.721][Information] Get hostname and fqdn
[19:50:20.724][Information] Query for unattendedserver object in openrpa collection matcing computername 949dcrpats1 and computerfqdn 949dcrpats1.********
[19:50:20.780][Information] Check openflow config if it supports watches
[19:50:20.792][Output] watch created with id f07ce43c8b97efcb
[19:50:20.793] watch created with id f07ce43c8b97efcb
[19:50:20.794][Output] initialization complete, if any unattendedclients was found they should be loggin in now
[19:50:20.796] initialization complete, if any unattendedclients was found they should be loggin in now

Hmm looking at it this morning it seems the HDBot Clients are back too but the Workitem Queue trigger is not working.

Are the robots connected or still stuck as disconnected?
You can check the Clients page in OpenCore to see if they are online

Also, when the OpenRPA-RD service tries to connect to the client sessions, it does it on 127.0.0.2 (localhost is 127.0.0.1). I don’t know how Windows handles 127.0.0.2.
Normally, you can still connect to 127.0.0.1 even if the network is down. I don’t know if that is the case for 127.0.0.2.

The Clients were online but never processed new items in the Workitem queue which has a trigger to them set.

After VM restart it works as intended again. But still something we have to look into.

So the queue trigger stopped working again 40 minutes ago neither logfile.txt nor log_rdservice.txt shows anything newer then 2 hours ago when the service was running fine.

rdservice and all the HDBots show up fine under clients, but the queue is just filling up with no items going into processing status.

Found a lot of these in the console they keep repeating:

err 7986e84cf53e DatabaseConnection queuemonitoring [object Object]
err 7986e84cf53e DatabaseConnection queuemonitoring [object Object]
dbg 7986e84cf53e DatabaseConnection queuemonitoring Send workitem payload 'undefined' to client serviceuserrpa4/openrpa/add2e4f12cff2b964/openrpa/add2e4f12cff2b96

This topic can be closed, the service and the bots reconnect just fine. The underlying issue is that all of them are stuck in a never ending process as detailed in this bug report:
https://discourse.openiap.io/t/export-document-stuck-in-loop