Error rendering report on CentOs 7



  • Hm. Not sure how to proceed with this. It would help if you would prepare for me a way how to replicate this. Like a minimal project that I can try to run on ubuntu.
    However I guess there is a problem rather with server set up. The best would be if you would prepare a dockerfile i can try to use and replicate the issue.



  • Uhm ... how can I create a docker file ? I can google a bit, but if u have short instructions I'll do my best to create it.



  • Give me a moment, I will give you some hints.



  • I prepared repository showing how can jsreport run on ubuntu docker container. You can open it in VS and just hit F5 to see it working,
    https://github.com/pofider/jsreport-net-core-docker

    You will be mainly interested in the dockerfile which describe the steps how is .net core initialized on the fresh ubuntu and how it starts the .net core app.



  • Well, just installed Docker ... How to run on container from VS 2017 Pro ?

    But my question is: how can I 100% reproduce my AWS server with Docker, if I really can ?



  • Well, just installed Docker ... How to run on container from VS 2017 Pro ?

    You should be able just to F5 my example solution. Here are the docs to vs tools for docker

    But my question is: how can I 100% reproduce my AWS server with Docker, if I really can ?

    There are usually some community docker images which tries to reflect the AWS linux images. However I have no experience with that.
    What kind of AWS service you use? Simple EC2? Which image? Did you try to run as root?



  • If I hit F5 it runs as a standard console app on my machine.
    Did u forget some files, maybe ? I can't find no docker-compose.yml, for example



  • My apologize ... Now is the repo full.



  • So, on my Win10 Pro I installed Docker, Linux containers mode is on, a small Hyper-V VM is running ...
    I open your last repository, hit F5 but if I print in which OS is running the app I receive Windows.
    How do I know if I'm running in a container ?

    Ok, a few steps ahead:

    dotnet publish --> ok

    docker build --> ko
    Step 10/11 : COPY ${source:-obj/Docker/publish} .
    docker : COPY failed: stat /var/lib/docker/tmp/docker-builder957303330/obj/Docker/publish: no such file or directory
    At line:1 char:1

    • docker build dockernetcoretest
    •   + CategoryInfo          : NotSpecified: (COPY failed: st...le or directory:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError


  • Not sure if this is the issue. But my docker settings include the shared drive.

    0_1517484550576_upload-e6f0b628-2222-4f04-8a03-b3cd3201fcd2



  • Mine too.
    I'll inspect this issue.



  • here they recommend to clear the .dockerignore file.



  • So, if i publish explicitly in /Docker/publish the doker build process terminate correctly ?
    Now ? Where is my app ? Can I debug it on Linux ?
    Too many doubts :-)



  • This post is deleted!


  • I'm not sure I get what you ask for. I simply run it as on the following gif. Thank you for your patience.

    demo



  • This is exactly what I want to do, but I always ges Windows as OS.
    Did you run some manual command (dotnet, docker, ...) or simply hit F5 ?
    To start the image I run some manual commands



  • Make sure the startup project is the docker-compose one.
    I don't run any special command, just f5 or click on the Run docker arrow.



  • Holy crap! I set the console as starting prj!!!
    Let's try ... TY



  • Ok, it works.
    So I'm gonna find an aws imager for docker.



  • I have got same error. Did you find any solution?

    To reproduce the issue

    Create new asp net core project add the libs.
    Add the service for jsreport to the project.

    dotnet publish -r debian.8-x64 -c Release

    And build it with docker image with this Dockerfile

    FROM microsoft/dotnet:2.1-runtime
    RUN apt-get update &&
    apt-get install -yyq libappindicator1 libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6
    ENV ASPNETCORE_URLS="http://:5000"
    ENV ASPNETCORE_ENVIRONMENT="Production"
    WORKDIR /app
    EXPOSE 5000/tcp
    ENV ASPNETCORE_URLS http://
    :5000
    ENTRYPOINT ["dotnet", "PdfProject.dll"]
    COPY bin/Release/netcoreapp2.1/debian.8-x64/publish /app

    While on windows all working well, on docker i get this error:

    fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
    An unhandled exception has occurred while executing the request.
    System.ComponentModel.Win32Exception (13): Permission denied
    at PdfProject.Helper.HtmlToPdf.getPdf(String filename) in C:\Test\PdfProject\PdfProject\Helper\HtmlToPdf.cs:line 63
    at PdfProject.Controllers.TestController.ViewReport() in C:\Test\PdfProject\PdfProject\Controllers\TestController.cs:line 27
    at lambda_method(Closure , Object )
    at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
    at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
    at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
    at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
    at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.