No log in Orchestrator for a robot

Please try below steps on the server.

Step 1:
Open a File Explorer and go to %appdata%\uipath\logs. (if there is no folder, then ignore this step and go to step 2)
You may find a file there, without extension, called “offline”. It is created by a Windows library “Event Tracing for Windows” or ETW and sometimes gets corrupted.
This file may be hidden, so please open the “View” menu in file explorer and check the option “Hidden items”.
Delete this file and restart the UiPath Robot service.

Step 2:
stop the UiPath Robot service
Delete the folder “C:\Windows\SysWOW64\config\systemprofile\AppData\Local\UiPath\Logs\execution_log_data folder” and restart the service.

16 Likes

I see this %appdata%\uipath\uipath\log (no logs)

Please ignore

If you have file ‘offline’ in that folder, remove it.
If not, go to step 2. That should solve the problem!

1 Like

Hello Kumar,
It works !!!
I’ve been checking for weeks to solve this issue.
Many thanks

This also fixed our issue. Can you please fix this issue so others do not have to repeat these ridiculous and unnecessary steps? Thank you.

Step 2 helped me to resolve the issue. It happens randomly once we see the below error in event viewer. May be this is the cause.Restart the service helps in some instance for the same error.

Communication Failure.
{“message”:“Error while closing the websocket: System.Net.WebSockets.WebSocketException (0x80004005): An internal WebSocket error occurred. Please see the innerException, if present, for more details. —> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. —> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host\r\n at System.Net.Sockets.Socket.BeginSend(Byte buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)\r\n at System.Net.Sockets.NetworkStream.BeginWrite(Byte buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)\r\n — End of inner exception stack trace —\r\n at System.Net.Sockets.NetworkStream.BeginWrite(Byte buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)\r\n at System.Net.Security._SslStream.StartWriting(Byte buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)\r\n at System.Net.Security._SslStream.ProcessWrite(Byte buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)\r\n at System.Net.Security._SslStream.BeginWrite(Byte buffer, Int32 offset, Int32 count, AsyncCallback asyncCallback, Object asyncState)\r\n at System.Net.TlsStream.BeginWrite(Byte buffer, Int32 offset, Int32 size, AsyncCallback asyncCallback, Object asyncState)\r\n at System.Net.PooledStream.BeginWrite(Byte buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)\r\n at System.IO.Stream.<>c.b__53_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, Object state)\r\n at System.Threading.Tasks.TaskFactory1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func5 beginMethod, Func`3 endMethod)\r\n at System.IO.Stream.BeginEndWriteAsync(Byte buffer, Int32 offset, Int32 count)\r\n at System.IO.Stream.WriteAsync(Byte buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)\r\n at System.Net.DelegatedStream.WriteAsync(Byte buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)\r\n at System.Net.WebSockets.WebSocketConnectionStream.WebSocketConnection.WriteAsync(Byte buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)\r\n at System.Net.DelegatedStream.WriteAsync(Byte buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)\r\n at System.Net.WebSockets.WebSocketConnectionStream.<>n__1(Byte buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)\r\n at System.Net.WebSockets.WebSocketConnectionStream.d__22.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Net.WebSockets.WebSocketBase.d__48.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n at System.Net.WebSockets.WebSocketBase.WebSocketOperation.d__19.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Net.WebSockets.WebSocketBase.d__51.MoveNext()\r\n at System.Net.WebSockets.WebSocketBase.ThrowIfConvertibleException(String methodName, Exception exception, CancellationToken cancellationToken, Boolean aborted)\r\n at System.Net.WebSockets.WebSocketBase.d__51.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.<>c.<b__13_0>d.MoveNext()”,“level”:“Error”,“timeStamp”:“2017-10-27T15:28:27.0725288+05:30”}

2 Likes

The issue has been fixed in our lasted release of the orchestrator, Request you all to please update the Orchestrator to the latest version for the permanent fix.

Hey @Pawan.rathore

Just for reference - “latest release” - could you give a specific version?
There’s no mention of it in 2017.1.6547 (2017-12-05) release notes and that’s the latest that has any.

1 Like

@andrzej.kniola
Yes, the issue has been fixed in 2017.1.6547 (2017-12-05), Released notes will be updated.

1 Like

@ovi @Cosmin_Ion_Nicolae @badita

Could you please confirm why this is required? This only impacts logging to Orchestrator, not to elastic search. We need to know how to prevent this in the future? I guess we could add something in to clear out this folder on a regular basis.

RD

Hi Richard,

The logging architecture has been changed in latest release(as per my knowledge there were many fixes on Logs in 17.1.6522). So it’s not just a fix for the issue in particular, but improvements for logs in general.

Yes, if it happens(hopefully not anymore) a batch file can be run to delete that folder.

I don’t have an exact answer to this but i can tell you how this folder gets populated. The Robot uses this folder(C:\Windows\SysWOW64\config\systemprofile\AppData\Local\UiPath\Logs\execution_log_data) to store temporary log files when the connection with Orchestrator is lost. Once the connection is restored it pushes the log messages to Orchestrator. This is a proprietary folder of Windows which sometimes gets corrupted therefore the logs are not sent to Orchestrator.

5 Likes

Thanks Ovi. Great explanation.

1 Like

And what about slighthly different situation. There are few robots connected to orchestrator. All logs are visible in orchestrator but all except one robot have daily log files in …/AppData/Local/Uipath/Logs. One of backoffice robots stopped creating log files and it used to made them. How to fix it? Purging execution_log_data and restarting uipath service didnt help.

Hi Bartosz,

What about the “offline” file? Can you find it using the steps Sunil provided above?

Can you see those logs in Orchestrator?

Hi ovi,

Unfortunatelly there is no such file and no Logs folder in %APPDATA%\Uipath.

Yes, I can see logs in orchestrator, there is just no log file on the machine where BO robots are running.

If I “open Logs” from tray there are everyday logs till some day. So it was working.
No clue about the cause of the problem, last entry from last existing log file is about successfully ending proces.

@qateam

@bdziedzi
If you look in the NLog.config file in the UiPath Platform folder where UiPath was installed, you can actually change where the execution logs are stored. So what I’m wondering if in your case that is set to a different location in that file?

I have just compared NLog.config between machines (working/not working).
Files were exactly the same only targets were in different order.

I have changed LogDirectory by adding ‘test’ subdirectory in config and also by changing it to “Logs2”:

  1. <variable name="LogDirectory" value=${specialfolder:folder=LocalApplicationData}/UiPath/Logs/test />
  2. <variable name="LogDirectory" value=${specialfolder:folder=LocalApplicationData}/UiPath/Logs2/>

and after UiRobotSvc restart and UiPath Robot Tray restart it didnt used new location:

  • “Open Logs” from tray opened old location (…/Users//AppData/Uipath/Logs)
  • There is UIPATH studio installed on the machine, when i run it, …/Users//AppData/Uipath/Logs/Studio.log has been updated. Studio is not registered, it is a BO machine so it is not used, but opening it and canceling registration is enough to made an entry in Studio.log. So Studio.log was updated in an old location.

Do you know what exactly should be restarted to apply new log directory?
Just for sure i could overwrite NLOG with the one from working machine but something more is needed to apply new config.

I can’t answer you fully, but I do know that restarting the UiRobotSvc is unneeded for the NLog to take effect. Also, note that the AppData location used is per user so it will only show in that users folder that was used to run the job on.
Here is a link I used to change the NLog: Layout Renderers · NLog/NLog Wiki · GitHub
with info on the environment variables.

Other than that, I’m not familiar enough with the Studio settings toward Logging to help.

2 Likes