cancel
Showing results for 
Search instead for 
Did you mean: 

SAP iRPA - Agent 3 Connection Lost every 20 minutes

alisarde
Explorer
0 Kudos
397

Hello SAP Intelligent RPA and SAP Process Automation experts!

We are having problems with the connection between Desktop Agent and Cloud Factory.

We use the SAP Intelligent Robotic Process Automation service, and all our automations are unattended.

A few weeks ago, we installed version 3.16.62 of the agent and the Agent Service.

Since then, we have noticed that when the agent has been running for a while (several hours, sometimes even after a couple of days), connection failures start to occur and recur every 20 minutes or so. After a few seconds a reconnection event is registered again.

Checking the documentation we have seen that since version 3.16 of the agent, the connections with the tenants are managed in a different way and are stored in a different path in the system:

https://help.sap.com/docs/intelligent-robotic-process-automation/what-is-sap-intelligent-rpa/user-ad... (Second Caution).

Just in case we decide to uninstall the agent by checking the "Remove personal settings" checkbox, uninstalling the agent service, and deleting the folders and all the content we have found from SAP Intelligent RPA on the computer in the following paths:

1. C:\Program Files (x86)\SAP\Intelligent RPA

2. C:\ProgramData\SAP\Intelligent RPA

3. C:\Users\USER_NAME\AppData\Local\SAP\Intelligent RPA

4. C:\Users\USER_NAME\AppData\Local\sapdesktopagent-updater

5. C:\Users\USER_NAME\AppData\Local\Programs\SAPDesktopAgent

6. C:\Users\USER_NAME\AppData\Local\Roaming\SAPDesktopAgent

We have restarted the computer, reinstalled Desktop Agent and Agent Service and configured the Windows user in Settings > System > Connection > With user account and filled in the Windows user credentials.

The problem is still happening, we have been able to trace the error twice, with the trace recorder tool (sorry for the trace that is in Spanish, but although I have the agent 3 configured in English, it seems to be taking the language of the computer)

First One:

{
        "Msg": " sendMessageAsync start [Th81]",
        "TS": "23/08/30 10:49:54:113",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "21164",
        "level": 3
    }, {
        "Msg": " sendMessageAsync: message{\"name\":\"ping\"} [Th81]",
        "TS": "23/08/30 10:49:54:113",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "21164",
        "level": 3
    }, {
        "Msg": " sendMessageAsync: messagesCount1 [Th81]",
        "TS": "23/08/30 10:49:54:113",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "21164",
        "level": 3
    }, {
        "Msg": " sendMessageAsync end true [Th70]",
        "TS": "23/08/30 10:49:54:114",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "12944",
        "level": 3
    }, {
        "Msg": " - ERROR - sendMessageAsync error Ya hay una llamada a 'SendAsync' pendiente para esta instancia de WebSocket. Se puede llamar a ReceiveAsync y a SendAsync simultáneamente, pero solo se permite una operación pendiente para cada uno de ellos al mismo tiempo. [Th81]",
        "TS": "23/08/30 10:49:54:116",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "21164",
        "level": 3
    }, {
        "Msg": " sendMessageAsync end false [Th81]",
        "TS": "23/08/30 10:49:54:116",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "21164",
        "level": 3
    }, {
        "Msg": " - ERROR - listen: Exception onErrorLa instancia de 'System.Net.WebSockets.InternalClientWebSocket' no se puede usar para la comunicación porque ha pasado al estado 'Aborted'. [Th70]",
        "TS": "23/08/30 10:49:54:120",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "12944",
        "level": 3
    }, {
        "Msg": " Task onError funcError called [Th70]",
        "TS": "23/08/30 10:49:54:120",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "12944",
        "level": 3
    }, {
        "Msg": " - ERROR - listen: Exception onClose [Th70]",
        "TS": "23/08/30 10:49:54:120",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "12944",
        "level": 3
    }, {
        "Msg": " Task onClose funcClose called [Th70]",
        "TS": "23/08/30 10:49:54:120",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "12944",
        "level": 3
    }, {
        "msg": "Error in [Galaxy]",
        "component": "RUN",
        "pid": 11208,
        "tid": "",
        "ts": "23/08/30 10:49:54:122",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 1
    }, {
        "msg": "Websocket error",
        "component": "RUN",
        "pid": 11208,
        "tid": "",
        "ts": "23/08/30 10:49:54:122",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }, {
        "msg": "ws: c# close message",
        "transmitter": "factory",
        "target": "desktopAgent",
        "component": "COM",
        "data": {
            "name": "c# close message",
            "wsCodeClosure": 1006,
            "csDescription": "La instancia de 'System.Net.WebSockets.InternalClientWebSocket' no se puede usar para la comunicación porque ha pasado al estado 'Aborted'."
        },
        "tid": "",
        "pid": 11208,
        "ts": "23/08/30 10:49:54:123",
        "level": 3
    }, {
        "msg": "StateMachine transition: ERROR_IN_CONNECTION: The state machine has changed (SUCCESS)",
        "data": {
            "state": {
                "connection": "Retry",
                "agent": "Warning",
                "project": "Stopped",
                "mode": "unattended"
            },
            "transition": "ERROR_IN_CONNECTION",
            "hasChanged": true,
            "context": {
                "previousMode": null
            }
        },
        "component": "RUN",
        "pid": 11208,
        "tid": "",
        "ts": "23/08/30 10:49:54:135",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }, {
        "msg": "ws: closure code : 1006",
        "transmitter": "factory",
        "target": "desktopAgent",
        "component": "COM",
        "data": {
            "name": "closure code : 1006",
            "info": "The closure code is 1006:ABNORMAL_CLOSURE/NO_CLOSE_FRAME. We are trying a reconnection"
        },
        "tid": "",
        "pid": 11208,
        "ts": "23/08/30 10:49:54:156",
        "level": 3
    }, {
        "msg": "check anonymisation start",
        "component": "RUN",
        "pid": 11208,
        "tid": "",
        "ts": "23/08/30 10:49:54:364",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }, {
        "msg": "No anonymous on command line, check registry",
        "component": "RUN",
        "pid": 11208,
        "tid": "",
        "ts": "23/08/30 10:49:54:364",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }, {
        "msg": "AgentApi - send channel used not found",
        "data": "channelId: undefined",
        "transmitter": "desktopAgent",
        "traceLevel": 4,
        "component": "RUN",
        "pid": 11208,
        "tid": "",
        "ts": "23/08/30 10:49:54:364",
        "target": "desktopAgent",
        "level": 3
    }, {
        "Msg": " listen end [Th70]",
        "TS": "23/08/30 10:49:54:121",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "12944",
        "level": 3
    }, {
        "msg": "Starting the reconnection update",
        "data": {
            "wsEndpoint": "wss://galaxy.irpa.cfapps.eu10.hana.ondemand.com/v1/ws"
        },
        "component": "RUN",
        "pid": 11208,
        "tid": "",
        "ts": "23/08/30 10:49:54:851",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }

Second One:

{
        "Msg": " sendMessageAsync start [Th226]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "13472",
        "level": 3
    }, {
        "Msg": " sendMessageAsync: message{\"name\":\"ping\"} [Th226]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "13472",
        "level": 3
    }, {
        "Msg": " sendMessageAsync: messagesCount1 [Th226]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "13472",
        "level": 3
    }, {
        "Msg": " sendMessageAsync start [Th226]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "13472",
        "level": 3
    }, {
        "Msg": " sendMessageAsync: message{\"name\":\"ping\"} [Th226]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "13472",
        "level": 3
    }, {
        "Msg": " sendMessageAsync: messagesCount1 [Th226]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "13472",
        "level": 3
    }, {
        "Msg": " - ERROR - sendMessageAsync error La parte remota cerró la conexión WebSocket sin completar el protocolo de enlace de cierre. [Th229]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "11476",
        "level": 3
    }, {
        "Msg": " sendMessageAsync end false [Th229]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "11476",
        "level": 3
    }, {
        "Msg": " - ERROR - sendMessageAsync error Ya hay una llamada a 'SendAsync' pendiente para esta instancia de WebSocket. Se puede llamar a ReceiveAsync y a SendAsync simultáneamente, pero solo se permite una operación pendiente para cada uno de ellos al mismo tiempo. [Th226]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "13472",
        "level": 3
    }, {
        "Msg": " sendMessageAsync end false [Th226]",
        "TS": "23/09/04 15:45:26:494",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "13472",
        "level": 3
    }, {
        "Msg": " - ERROR - listen: Exception onErrorLa instancia de 'System.Net.WebSockets.InternalClientWebSocket' no se puede usar para la comunicación porque ha pasado al estado 'Aborted'. [Th230]",
        "TS": "23/09/04 15:45:26:511",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "16152",
        "level": 3
    }, {
        "Msg": " Task onError funcError called [Th230]",
        "TS": "23/09/04 15:45:26:511",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "16152",
        "level": 3
    }, {
        "Msg": " - ERROR - listen: Exception onClose [Th230]",
        "TS": "23/09/04 15:45:26:511",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "16152",
        "level": 3
    }, {
        "Msg": " Task onClose funcClose called [Th230]",
        "TS": "23/09/04 15:45:26:511",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "16152",
        "level": 3
    }, {
        "msg": "Error in [Galaxy]",
        "component": "RUN",
        "pid": 21964,
        "tid": "",
        "ts": "23/09/04 15:45:26:514",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 1
    }, {
        "msg": "Websocket error",
        "component": "RUN",
        "pid": 21964,
        "tid": "",
        "ts": "23/09/04 15:45:26:514",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }, {
        "msg": "ws: c# close message",
        "transmitter": "factory",
        "target": "desktopAgent",
        "component": "COM",
        "data": {
            "name": "c# close message",
            "wsCodeClosure": 1006,
            "csDescription": "La instancia de 'System.Net.WebSockets.InternalClientWebSocket' no se puede usar para la comunicación porque ha pasado al estado 'Aborted'."
        },
        "tid": "",
        "pid": 21964,
        "ts": "23/09/04 15:45:26:515",
        "level": 3
    }, {
        "msg": "StateMachine transition: ERROR_IN_CONNECTION: The state machine has changed (SUCCESS)",
        "data": {
            "state": {
                "connection": "Retry",
                "agent": "Warning",
                "project": "Stopped",
                "mode": "unattended"
            },
            "transition": "ERROR_IN_CONNECTION",
            "hasChanged": true,
            "context": {
                "previousMode": null
            }
        },
        "component": "RUN",
        "pid": 21964,
        "tid": "",
        "ts": "23/09/04 15:45:26:542",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }, {
        "msg": "ws: closure code : 1006",
        "transmitter": "factory",
        "target": "desktopAgent",
        "component": "COM",
        "data": {
            "name": "closure code : 1006",
            "info": "The closure code is 1006:ABNORMAL_CLOSURE/NO_CLOSE_FRAME. We are trying a reconnection"
        },
        "tid": "",
        "pid": 21964,
        "ts": "23/09/04 15:45:26:565",
        "level": 3
    }, {
        "msg": "check anonymisation start",
        "component": "RUN",
        "pid": 21964,
        "tid": "",
        "ts": "23/09/04 15:45:26:726",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }, {
        "msg": "No anonymous on command line, check registry",
        "component": "RUN",
        "pid": 21964,
        "tid": "",
        "ts": "23/09/04 15:45:26:727",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }, {
        "msg": "AgentApi - send channel used not found",
        "data": "channelId: undefined",
        "transmitter": "desktopAgent",
        "traceLevel": 4,
        "component": "RUN",
        "pid": 21964,
        "tid": "",
        "ts": "23/09/04 15:45:26:727",
        "target": "desktopAgent",
        "level": 3
    }, {
        "Msg": " listen end [Th230]",
        "TS": "23/09/04 15:45:26:511",
        "Components": "WebSocket in ",
        "PID": "0",
        "TID": "16152",
        "level": 3
    }, {
        "msg": "Starting the reconnection update",
        "data": {
            "wsEndpoint": "wss://galaxy.irpa.cfapps.eu10.hana.ondemand.com/v1/ws"
        },
        "component": "RUN",
        "pid": 21964,
        "tid": "",
        "ts": "23/09/04 15:45:27:182",
        "transmitter": "desktopAgent",
        "target": "desktopAgent",
        "level": 3
    }

We tried installing version 3.17.60, but the same problem occurred as well.

The errors are happening on our personal computers as well as on the virtual machines where the automations are running.

There is only one Tenant configured in the agent.

Has anyone experienced this error, and do you know what the cause might be? We don't know if this is a normal behaviour, if we have to install some other component or if we are missing some prerequisite in the system for it to work correctly. Previously with other versions of agent 3 and agent 2 we haven't had this kind of issue.

Thanks in advance and best regards,

Alejandro Lisarde

Accepted Solutions (0)

Answers (3)

Answers (3)

janv7306
Active Participant
0 Kudos

Hello Alejandro,

I am facing the same issue now with 3.31.45 version of client. Did you approach to the solutions, btw?

Jan

vishalakshmi
Contributor
0 Kudos

Hello Alejandro,

Can you refer to the document for agent issues:

https://me.sap.com/notes/3155610

https://me.sap.com/notes/3152105

If you stil face issues, raise ticket to SAP.

Thanks,

Lakshmi.

vishalakshmi
Contributor
0 Kudos

Hello Alejandro,

Can you check the below document (Page 102, 103)

https://help.sap.com/doc/ba928721bf7d4fd4b8a794faead5c51a/Cloud/en-US/loiod10fed49ebb24e2eb02fa94522...

Thanks,

Lakshmi.

alisarde
Explorer
0 Kudos

Hello Lakshmi,

Thank you for your answer, we already had the alerts configured as it is shown in your link. The problem is that the time between connection lost and connection restored events is less than 5 minutes, it doesn't warn us.

On the other hand, what we are looking for is a solution to these disconnection problems that happen since we have upgraded the agent version. Previously these problems didn't happen.

Thanks,

Alejandro Lisarde.