dataserver access exception

Answered
xiasj asked on April 15, 2022

Hello Support Team,
 
When the dataserver is started, there is an error in the cache information for the first access, and then everything is normal.
 
dataserver connect Oracle
 
The error message is as follows:
2022-04-15T08:50:05.667600723Z 2022-04-15 08:50:05.6671|ERROR|Flexmonster.DataServer.Middlewares.ErrorHandlingMiddleware|One or more errors occurred. (Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')) (Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')) (Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')) (Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index'))
2022-04-15T08:50:05.668557089Z 2022-04-15 08:50:05.6671|INFO|Flexmonster.DataServer.Controllers.CubeController|Request finished in 57.7902ms 200
2022-04-15T08:50:05.668785204Z 2022-04-15 08:50:05.6671|WARN|Flexmonster.DataServer.Middlewares.ErrorHandlingMiddleware|   at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
2022-04-15T08:50:05.668855993Z    at System.Linq.Parallel.SpoolingTask.SpoolStopAndGo[TInputOutput,TIgnoreKey](QueryTaskGroupState groupState, PartitionedStream`2 partitions, SynchronousChannel`1[] channels, TaskScheduler taskScheduler)
2022-04-15T08:50:05.668870995Z    at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
2022-04-15T08:50:05.668876559Z    at System.Linq.Parallel.MergeExecutor`1.Execute()
2022-04-15T08:50:05.668881509Z    at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
2022-04-15T08:50:05.668888745Z    at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
2022-04-15T08:50:05.668893966Z    at System.Linq.Parallel.WhereQueryOperator`1.WrapPartitionedStream[TKey](PartitionedStream`2 inputStream, IPartitionedStreamRecipient`1 recipient, Boolean preferStriping, QuerySettings settings)
2022-04-15T08:50:05.668899025Z    at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream`2 inputStream)
2022-04-15T08:50:05.668904368Z    at System.Linq.Parallel.ListQueryResults`1.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
2022-04-15T08:50:05.668909204Z    at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
2022-04-15T08:50:05.668914606Z    at System.Linq.Parallel.QueryOperator`1.ExecuteAndGetResultsAsArray()
2022-04-15T08:50:05.668919497Z    at System.Linq.ParallelEnumerable.ToArray[TSource](ParallelQuery`1 source)
2022-04-15T08:50:05.669007160Z    at Flexmonster.DataServer.Core.Models.Data.DataSlice.FilterData(BaseFilter filters)
2022-04-15T08:50:05.669039437Z    at Flexmonster.DataServer.Core.FlexmonsterApiServices.<>c__DisplayClass13_0.<<GetAggregatedDataAsync>b__0>d.MoveNext()
2022-04-15T08:50:05.669046494Z --- End of stack trace from previous location ---
2022-04-15T08:50:05.669051188Z    at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)
2022-04-15T08:50:05.669065489Z    at Flexmonster.DataServer.Core.FlexmonsterApiServices.GetAggregatedDataAsync(String index, Query query, Int32 page)
2022-04-15T08:50:05.669070507Z    at Flexmonster.DataServer.Core.FlexmonsterApiServiceExtensions.GetAggregatedDataAsync(IApiService apiServices, String index, Query query, Int32 page, IEnumerable`1 serverFilters)
2022-04-15T08:50:05.669075680Z    at Flexmonster.DataServer.Core.FlexmonsterApiServiceExtensions.GetAggregatedDataAsync(IApiService apiServices, SelectRequest selectRequest, IEnumerable`1 serverFilters)
2022-04-15T08:50:05.669080413Z    at Flexmonster.DataServer.Controllers.CubeController.PostSelect(SelectRequest request)
2022-04-15T08:50:05.669084768Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
2022-04-15T08:50:05.669089249Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
2022-04-15T08:50:05.669094362Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2022-04-15T08:50:05.669118023Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
2022-04-15T08:50:05.669122987Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
2022-04-15T08:50:05.669127975Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
2022-04-15T08:50:05.669133181Z --- End of stack trace from previous location ---
2022-04-15T08:50:05.669137858Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2022-04-15T08:50:05.669142787Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
2022-04-15T08:50:05.669147348Z    at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
2022-04-15T08:50:05.669152132Z    at Flexmonster.DataServer.Middlewares.ErrorHandlingMiddleware.Invoke(HttpContext context)

15 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 15, 2022

Hello,
 
Thank you for reaching out to us.
 
We haven't managed to reproduce the described issue on our side. Could you please provide us with more details?
Kindly check which index exactly causes the issue. It would be great if you send your Data Server configurations (a current flexmonster-config.json file) and a dummy data set. 
 
Looking forward to hearing from you.
 
Kind regards,
Nadia

Public
xiasj April 18, 2022

hello:
This problem occurs only when the member or select interface is accessed for the first time after the dataserver is restarted.
 
flexmonster-config.json file is as follows:
{
"DataSources": [
{
"Type": "csv",
"Indexes": {
"sample-index": {
"Path": "sample-data/data.csv"
}
}
},
{
"Type": "database",
"DatabaseType": "oracle",
"ConnectionString":
"Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =****)(PORT = ***)) ) (CONNECT_DATA = (SERVICE_NAME =**) ) );User Id=***;Password=****;",
"Indexes": {
"index_database": {
"Query": "SELECT inst.TITLE 标题,inst.ISSUE_NUM 文号,inst.PUBLISH_ORG 拟稿部门,inst.PUBLISH_DATE 发文时间,to_char(inst.PUBLISH_DATE,'yyyy') 发文年份,inst.INST_FILE_TYPE 制度类型,inst.INST_STATUS 制度状态,inst.VIEW_COUNT 阅读次数,ietype.NAME 制度分类,attr.INST_ID,max(decode(attr.ATTR_KEY, 'ISSUE_TYPE', attr.ATTR_VALUE, '')) as 发文类型,max(decode(attr.ATTR_KEY, 'CONTACTS_NAME', attr.ATTR_VALUE, '')) as 联系人名称,max(decode(attr.ATTR_KEY, 'SCOPE_APPLICATION', attr.ATTR_VALUE, '')) as 适用范围,max(decode(attr.ATTR_KEY, 'EFFECTIVE_DATE', attr.ATTR_VALUE, '')) as 施行时间,max(decode(attr.ATTR_KEY, 'EXPIRE_DATE', attr.ATTR_VALUE, '')) as 失效时间,max(decode(attr.ATTR_KEY, 'INST_NATURE', attr.ATTR_VALUE, '')) as 制度性质,max(decode(attr.ATTR_KEY, 'LEVEL', attr.ATTR_VALUE, '')) as 制度层级,max(decode(attr.ATTR_KEY, 'PERIOD_DATE', attr.ATTR_VALUE, '')) as 有效期 from IE_INSTITUTION inst LEFT JOIN IE_INSTITUTION_ATTR attr on attr.INST_ID=inst.INST_ID LEFT JOIN IE_TYPE_RELATION rel on rel.INST_ID=inst.INST_ID LEFT JOIN IE_TYPE ietype on rel.TYPE_ID=ietype.TYPE_ID GROUP BY attr.INST_ID,inst.TITLE,inst.ISSUE_NUM,inst.PUBLISH_ORG,inst.PUBLISH_DATE,inst.INST_FILE_TYPE,inst.INST_STATUS,ietype.NAME,inst.VIEW_COUNT"
}
}
},
{
"Type": "database",
"DatabaseType": "oracle",
"ConnectionString":
"Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =****)(PORT = ***)) ) (CONNECT_DATA = (SERVICE_NAME =**) ) );User Id=***;Password=****;",
"Indexes": {
"view_inst_report": {
"Query": "select inst_id 制度id,issue_num 制度文号,title 制度标题,issue_type 发文类型,inst_trans_line 制度性质,inst_status 制度状态,publish_date 印发时间,interview_time 访问时间,interview_month 访问月份,user_org_name 访问人机构名称,org_path_name 访问人机构全路径,interview_user 访问人,firast_org 第一级机构,second_org 第二级机构,third_org 第三级机构,fourth_org 第四级机构,fifth_org 第五级机构,sixth_org 第六级机构,seventh_org 第七级机构,eighth_org 第八级机构,ninth_org 第九级机构,tenth_org 第十级机构 from ie_user_view_inst_report"
}
}
},
{
"Type": "database",
"DatabaseType": "oracle",
"ConnectionString":
"Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =****)(PORT = ***)) ) (CONNECT_DATA = (SERVICE_NAME =**) ) );User Id=***;Password=****;",
"Indexes": {
"inst_statistical_report": {
"Query": "select DISTINCT inst_id 制度id,issue_num 制度文号,title 制度标题,issue_type 发文类型,inst_trans_line 制度性质,inst_status 制度状态,publish_date 印发时间,publish_year 印发年份,publish_org_name 发文机构名称,org_path_name 发文机构全路径,firast_org 第一级机构,second_org 第二级机构,third_org 第三级机构,fourth_org 第四级机构,fifth_org 第五级机构,sixth_org 第六级机构,seventh_org 第七级机构,eighth_org 第八级机构,ninth_org 第九级机构,tenth_org 第十级机构 from ie_inst_statistical_report where inst_trans_line = '新建' or inst_trans_line = '补丁'"
}
}
}
],
"Security": {
"Authorization": {
"Enabled": false
},
"CORS": {
"AllowOrigin": "*"
}
},
"DataStorageOptions": {
"DataRefreshTime": "60"
},
"Port": "9500"
}

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 18, 2022

Hello,
 
Thank you for the details.
 
We still cannot reproduce the behavior described. Could you please provide us with the code snippet of the report you set to Flexmonster? It will help us to continue the investigation.
 
Looking forward to hearing from you.
 
Kind regards,
Nadia

Public
xiasj April 19, 2022

Hello
dataserver cache data in "sql.txt". The path and parameters of the request are in "jmeter-param.csv". When the front-end interface is loaded, the colleague calls all the interfaces in "jmeter-param.csv". Only the first restart of the dataserver or the shelf data will have this error, and there are no other cases. For the error information, see the picture "dataserver-errorinformation.png" . The information of flexmonster-config.json is in "flexmonster-config1.json"

Public
angelsaber April 19, 2022

i create a demo for it with vue.js .  that data on above answers.you only need to change the report->datasouse->url,then it will run and you will reproduce the behavior described

Attachments:
hellow-felx.rar

Public
angelsaber April 21, 2022

Hello!
 
We are wondering if you had some time to try the suggested demo. Was it helpful for reproduce the behavior described?
Looking forward to hearing your feedback.
 
Regards,
Zhao

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 21, 2022

Hello,
 
Thank you for providing the detailed information.
 
Our team is currently working on the described issue. We will get back to you soon.
 
Feel free to contact us if other questions arise.
 
Kind regards,
Nadia 

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 22, 2022

Hello,
 
Thank you for giving us some time.
 
We haven't managed to reproduce the mentioned issue using your sample. On our side, everything works as expected. We suppose that it might be caused by a specific environment. Are there any details in your environment that we have to know?
Alternatively, it would greatly help us debug and find the cause of the issue if it is possible for you to provide us with direct access to the necessary table from your database.
 
Looking forward to hearing from you.
 
Kind regards,
Nadia 

Public
angelsaber April 24, 2022

Hello,
I made a video for reproduce the behavior described.we direct connection the dataserver without a specific environment. when and only when we first to refresh dataserver,flexmonster will report an error. We wonder if it's dataserver caching to lead to it.
 
Looking forward to hearing from you.

Regards,
Zhao

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster April 27, 2022

Hello,
 
Thank you for providing us with the video illustrating the issue.
 
Currently, we are working on the reproduction of this issue. We suppose that the specific configuration of your database might cause the problem. Is your database already deployed so that you could provide us with access to it? Also are there any specific configurations of the database?
 
Looking forward to hearing from you.
 
Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster May 3, 2022

Hello,
 
Thank you for giving us some time.
 
Our team has managed to reproduce the issue. We will provide a fix with our minor release with the ETA May 16th.
 
Feel free to contact us if other questions arise.
 
Kind regards,
Nadia

Public
angelsaber May 5, 2022

Hello,
 
Thank you for spenting so long trying reproduce the issue.
  
Looking forward to solveing this issue.
 
Regards,
Zhao

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster May 17, 2022

Hello,

We are pleased to inform you that the issue with multiple pivot instances was fixed.

This fix is available in the 2.9.25 version of Flexmonster: https://www.flexmonster.com/release-notes/version-2925/ 

You are welcome to update the component: https://www.flexmonster.com/doc/updating-to-the-latest-version/ 

Please let us know if any questions arise.

Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster May 25, 2022

Hello, Zhao,

Hope you are doing well.

We were wondering if you had a chance to test the update. Could you please confirm if the fix works well for you?

Looking forward to hearing your feedback.

Kind regards,
Nadia

Public
Maksym Diachenko Maksym Diachenko Flexmonster May 31, 2022

Hello,

Our team is wondering whether you had time to try out the provided fix.
Looking forward to hearing your feedback.

Kind regards,
Maksym

Please login or Register to Submit Answer