Error with logs in Orchestrator and Elastic

Installer(.exe or .msi): UiPathOrchestrator.msi

License type(Free, Trial/License code): Trial License

Studio/Robot version: 2019.4.3

Current behavior:

Hi, I’ve installed Orchestrator and trying some setups. I’ve installed it with SQL Server only and everything went fine. I’ve uninstalled Orchestrator and for made a new installation with Elastic.

Now I do have the logs in Elastic but when I try to access them in Orchestrator I do have an error : GET “https://mydomain/odata/RobotLogs?$filter=((JobKey%20eq%20b658d921-c060-4f77-8fe2-be23f9ee2ae6))&$top=10&$orderby=TimeStamp%20desc” 500

Thus, I got the “An error has occurred.” toolbar showing, and no logs to see :frowning: .

And each time I try to access them an error in the event viewer of windows is visible:

Orchestrator Error event

Elasticsearch.Net.UnexpectedElasticsearchClientException: Cannot deserialize the current JSON object (e.g. {“name”:“value”}) into type ‘System.Int64’ because the type requires a JSON primitive value (e.g. string, number, boolean, null) to deserialize correctly.
To fix this error either change the JSON to a JSON primitive value (e.g. string, number, boolean, null) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path ‘hits.total.value’, line 1, position 113. —> Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {“name”:“value”}) into type ‘System.Int64’ because the type requires a JSON primitive value (e.g. string, number, boolean, null) to deserialize correctly.
To fix this error either change the JSON to a JSON primitive value (e.g. string, number, boolean, null) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path ‘hits.total.value’, line 1, position 113.
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at bool Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at bool Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent)
at object Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at T Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader)
at T Nest.JsonNetSerializer.Deserialize(Stream stream)
at Task Nest.JsonNetSerializer.DeserializeAsync(Stream stream, CancellationToken cancellationToken)
at async Task Elasticsearch.Net.ResponseBuilder.SetBodyAsync(ElasticsearchResponse response, Stream stream)
at async Task<ElasticsearchResponse> Elasticsearch.Net.ResponseBuilder.ToResponseAsync()
at async Task<ElasticsearchResponse> Elasticsearch.Net.HttpConnection.RequestAsync(RequestData requestData)
at async Task<ElasticsearchResponse> Elasticsearch.Net.RequestPipeline.CallElasticsearchAsync(RequestData requestData)
at async Task<ElasticsearchResponse> Elasticsearch.Net.Transport.RequestAsync(HttpMethod method, string path, PostData data, IRequestParameters requestParameters)
— End of inner exception stack trace —
at async Task<ElasticsearchResponse> Elasticsearch.Net.Transport.RequestAsync(HttpMethod method, string path, PostData data, IRequestParameters requestParameters)
at async Task Nest.ElasticClient.Nest.IHighLevelToLowLevelDispatcher.DispatchAsync<TRequest, TQueryString, TResponse, TResponseInterface>(TRequest request, Func<IApiCallDetails, Stream, TResponse> responseGenerator, Func<TRequest, PostData, Task<ElasticsearchResponse>> dispatch)
at async Task<ISearchResponse> UiPath.Core.Services.Logging.ElasticLogsManager.SearchAsync(ExtractedQueryOptions extractedQueryOptions)
at async Task<QueryResult> UiPath.Application.Services.Logs.ElasticLogsReader.FindAllAsync(ODataQueryOptions queryOptions, CancellationToken cancellationToken)
at async Task Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult(Task actualReturnValue, Func postAction, Action finalAction)
at async Task UiPath.WebApi.OData.Controllers.RobotLogsController.GetRobotLogs(ODataQueryOptions queryOptions, CancellationToken cancellationToken)
at async Task System.Threading.Tasks.TaskHelpersExtensions.CastToObject(Task task)
at async Task System.Web.Http.Controllers.ApiControllerActionInvoker.InvokeActionAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken)
at async Task System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task UiPath.Web.Common.Filters.CancellationTokenFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task UiPath.Web.Common.Filters.AuditExecutionFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task Abp.WebApi.Uow.AbpApiUowFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task Abp.WebApi.Validation.AbpApiValidationFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task Abp.WebApi.Auditing.AbpApiAuditFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Controllers.ActionFilterResult.ExecuteAsync(CancellationToken cancellationToken)
at async Task System.Web.Http.Filters.AuthorizationFilterAttribute.ExecuteAuthorizationFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task UiPath.Web.Common.Filters.OrganizationUnitValidationFilter.ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task UiPath.Web.Common.Authorization.UiApiAuthorizeFilter.ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task Abp.WebApi.Security.AntiForgery.AbpAntiForgeryApiFilter.ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func<Task> continuation)
at async Task System.Web.Http.Controllers.AuthenticationFilterResult.ExecuteAsync(CancellationToken cancellationToken)
at async Task System.Web.Http.Controllers.ExceptionFilterResult.ExecuteAsync(CancellationToken cancellationToken)
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {“name”:“value”}) into type ‘System.Int64’ because the type requires a JSON primitive value (e.g. string, number, boolean, null) to deserialize correctly.
To fix this error either change the JSON to a JSON primitive value (e.g. string, number, boolean, null) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path ‘hits.total.value’, line 1, position 113.
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at bool Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at bool Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent)
at object Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at T Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader)
at T Nest.JsonNetSerializer.Deserialize(Stream stream)
at Task Nest.JsonNetSerializer.DeserializeAsync(Stream stream, CancellationToken cancellationToken)
at async Task Elasticsearch.Net.ResponseBuilder.SetBodyAsync(ElasticsearchResponse response, Stream stream)
at async Task<ElasticsearchResponse> Elasticsearch.Net.ResponseBuilder.ToResponseAsync()
at async Task<ElasticsearchResponse> Elasticsearch.Net.HttpConnection.RequestAsync(RequestData requestData)
at async Task<ElasticsearchResponse> Elasticsearch.Net.RequestPipeline.CallElasticsearchAsync(RequestData requestData)
at async Task<ElasticsearchResponse> Elasticsearch.Net.Transport.RequestAsync(HttpMethod method, string path, PostData data, IRequestParameters requestParameters)

My Web.config is the following for logs :

<logger name="Robot.*" final="true" writeTo="database,robotElasticBuffer" />

and

<target xsi:type="ElasticSearch" name="robotElastic" requireAuth="false" username="" password="" index="${event-properties:item=indexName}-${date:format=yyyy.MM}" documentType="logEvent" includeAllProperties="true" layout="${message}" excludedProperties="agentSessionId,tenantId,organizationUnitId,indexName" uri="http://mydomain:9200" />

By the way, it is said in the doc that by default it uses SQL and ElasticSearch to log both, but I checked and don’t understand how according to the config file I got (writeTo was set to robotElasticBuffer only).

I’ve tried using different Elastic installs method and created new SQL Table just in case, but each time the robots logs are generating errors and are only visible in Kibana

Thanks in advance for your help :).

Just to precise: the Database is filled with logs of robots, so it feels kinda weird :confused:

fixed it. The Elastic Search was in version 7.2 …

1 Like

Hi,
I have same error and can’t resolve.
My Elastic Search run in version 7.2 too.

@Smixi, you update the Elastic Search to resolve this?
Thx

The docs says it has to be under version 6.X, so you need to downgrade ):.

Hello @Smixi . I could solve it. !!! : star_struck:

it was not necessary to download the version

The problem was an error in web.config, I had InternalLogLevel=“On”.

Well, feels weird because I still had the issue with Elastic but i’ve not changed this parameters. Meanwhile the errors clearly show problems with the Elastic module ^^.

Hi,

I also have the same problem such as prompted “an error has occurred” when viewing the error.
I changed InternalLogLevel to" On”, the default was “Off”. After which, no more error appears but I don’t see any error log.
What is the actual parameter for InternalLoglevel? Is On or Off? I’m using ElasticSearch 7.2.0.

Thank you

Same issue here. :frowning: Elastic version 7.1, Uipath 2019.4.3.

If I remove the Elastic uri the loggs appear, as they are just logged in the database. But I need them in Elastic.

@AL13 @cristina.chiana My solution was to downgrade :confused:.

Which version of Elastic are you using now?

I’m using the latest version in 6.X which should be 6.7.0