This is a migrated thread and some comments may be shown as answers.

Report Service runs normally on Windows, but fails in Docker.

4 Answers 1171 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sky
Top achievements
Rank 1
sky asked on 25 Sep 2020, 12:36 AM

Report Service runs normally on Windows, but fails in Docker.

I deployed the Report Service in Docker, and the following API call reported an error:

http://localhost:60248/api/reports/clients/813685ac1f3/parameters

http method: post

request body:

{
    "report": "MedDispense.Reporting.ReportService.InventoryCost, MedDispense.Reporting.ReportService",
    "parameterValues": {
        "SiteID": "999",
        "StationID": "1",
        "SortBy": ""
    }
}

 

response:

{
    "message": "An error has occurred.",
    "exceptionMessage": "Invalid report type",
    "exceptionType": "System.ArgumentException",
    "stackTrace": "   at Telerik.Reporting.Processing.TypeReportDocumentResolver.Resolve(IProcessingContext context, TypeReportSource rs)\n   at Telerik.Reporting.Processing.ReportDocumentResolver`1.Telerik.Reporting.Processing.IReportDocumentResolver.Resolve(IProcessingContext context, ReportSource rs)\n   at Telerik.Reporting.Processing.ReportDocumentResolver.<>c__DisplayClass0_0.<Resolve>b__0(IReportDocumentResolver r)\n   at Telerik.Reporting.Processing.ReportDocumentResolver.Bind[T](IProcessingContext context, ReportSource source, Func`2 func)\n   at Telerik.Reporting.Processing.ReportDocumentResolver.Resolve(IProcessingContext context, ReportSource source)\n   at Telerik.Reporting.Processing.ResolvedReportDocument.ResolveReportsRecursively(ReportSource rs, IProcessingContext context, IDictionary`2 parentRsParameters, Boolean parentShouldDispose, List`1 result, IReportDocument& definition, ResolvedReport& tocReport, ReportBookTocPosition& tocReportPosition)\n   at Telerik.Reporting.Processing.ResolvedReportDocument.Create(ReportSource rs, IProcessingContext context)\n   at Telerik.Reporting.Processing.DocumentParametersManager`1..ctor(ReportSource definition, IProcessingContext processingContext, IParameterValueParser parameterValueParser)\n   at Telerik.Reporting.Processing.DocumentParametersManager..ctor(ReportSource rs, IProcessingContext processingContext, IParameterValueParser parameterValueParser)\n   at Telerik.Reporting.Services.Engine.ReportEngine.GetParameters(String clientID, String report, Dictionary`2 parameterValues)\n   at Telerik.Reporting.Services.AspNetCore.ReportsControllerBase.GetParameters(String clientID, ClientReportSource reportSource)\n   at lambda_method(Closure , Object , Object[] )\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)"
}

 

Anybody can help me?

 

4 Answers, 1 is accepted

Sort by
0
sky
Top achievements
Rank 1
answered on 25 Sep 2020, 12:41 AM
The report service project based on asp.net core 3.1 webapi.
0
Accepted
Todor
Telerik team
answered on 29 Sep 2020, 10:01 AM

Hello sky,

The error message indicates that you use a Type report (e.g. CS class inheriting from Telerik.Reporting.Report) and it cannot be resolved in the Docker environment. Is the report type hosted in a .NET Core/Standard project? Is the report library assembly deployed and accessible by the REST Service?

If you use a Linux Docker container, make sure you have installed the required libgdiplus library - see Containerize Telerik Reporting.

Regards,
Todor
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
sky
Top achievements
Rank 1
answered on 29 Sep 2020, 10:45 AM

yes, I used a Typer report, hosted in a .NET Core 3.1 project, and report library assembly deployed and accessible by the REST Service.

I used a LInux Docker container. I will installed libgidplus and test it on linux docker container.

1
sky
Top achievements
Rank 1
answered on 30 Sep 2020, 01:54 AM

hi Todor, 

Thank you so much!

I add GDI+ component in my report service linux container, the problem resolved.

FROM microsoft/dotnet:2.1-runtime AS base
RUN apt-get update \
    && apt-get install -y --allow-unauthenticated \
        libc6-dev \
        libgdiplus \
        libx11-dev \
    && rm -rf /var/lib/apt/lists/*
Tags
General Discussions
Asked by
sky
Top achievements
Rank 1
Answers by
sky
Top achievements
Rank 1
Todor
Telerik team
Share this question
or