Web app crashes after configuring Azure-storage for templates.

  • I get the error shown below after configuring azure storage account to store report templates.

    I created an azure storage account as indicated in the documentation.
    I added the following application settings to the App Service:

    extensions_fsStoreAzureStoragePersistence_accountKey=<my key>

    Since this is a proof of concept project I did not configure an azure service bus at this time. I understand that this is optional.


    Thank you for your help.
    Pedro Reinoso

  • Please paste here the jsreport logs.
    It prints logs to the file logs/reporter.log but also the stdout, so you should be able to get it from the azure portal.

  • Jan,

    I added the "fsStore" extension application settings and this time the application did NOT crash. I am sure I repeated the same steps as before. I copied the log content from the Azure "Log stream" interface. As you can see the logs seem to indicate that "fs store" is configured and initialized successfully. However, the templates are NOT being saved in the azure storage account at all. Every time I re-start the app service, it recreates the samples again. Am I missing another configuration? Thank you for your help.

    ================= LOG below
    2020-09-14T20:59:34.722Z INFO - Pulling image from Docker hub: jsreport/jsreport:2.7.2-full
    2020-09-14T20:59:35.748Z INFO - 2.7.2-full Pulling from jsreport/jsreport
    2020-09-14T20:59:35.749Z INFO - Digest: sha256:c1dbbb740a4d56d0aa865d39ecd79a99f69923123a0b8016ddc778471c4f09c7
    2020-09-14T20:59:35.751Z INFO - Status: Image is up to date for jsreport/jsreport:2.7.2-full
    2020-09-14T20:59:35.754Z INFO - Pull Image successful, Time taken: 0 Minutes and 1 Seconds
    2020-09-14T20:59:35.781Z INFO - Starting container for site
    2020-09-14T20:59:35.781Z INFO - docker run -d -p 9253:5488 --name jsreportengine_0_d687e593 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=jsreportengine -e WEBSITE_AUTH_ENABLED=False -e PORT=5488 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=jsreportengine.azurewebsites.net -e WEBSITE_INSTANCE_ID=05893460edd64dea18419719afaa21f452a43339bdce881ba0f8ccabe7ab2e9c -e HTTP_LOGGING_ENABLED=1 jsreport/jsreport:2.7.2-full

    2020-09-14T20:59:38.894Z INFO - Initiating warmup request to container jsreportengine_0_d687e593 for site jsreportengine

    2020-09-14T20:59:54.514Z INFO - Waiting for response to warmup request for container jsreportengine_0_d687e593. Elapsed time = 15.6199018 sec

    2020-09-14T21:00:01.592Z INFO - Container jsreportengine_0_d687e593 for site jsreportengine initialized successfully and is ready to serve requests.

    2020-09-14T20:59:39.064199434Z Trying to remove the lock on display 99
    2020-09-14T20:59:39.103032186Z Running display 99
    2020-09-14T20:59:39.103158188Z Starting node.js
    2020-09-14T20:59:42.399258109Z 2020-09-14T20:59:42.398Z - info: Initializing jsreport@2.7.2 in production mode using configuration file: jsreport.config.json
    2020-09-14T20:59:42.408415516Z 2020-09-14T20:59:42.407Z - info: Searching for available extensions in /app/
    2020-09-14T20:59:42.418869238Z 2020-09-14T20:59:42.418Z - info: Extensions location cache not found, crawling directories
    2020-09-14T20:59:48.461250709Z 2020-09-14T20:59:48.461Z - info: Found 55 extensions
    2020-09-14T20:59:50.154216852Z 2020-09-14T20:59:50.153Z - info: Setting dedicated-process (process based) strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
    2020-09-14T20:59:50.173073771Z 2020-09-14T20:59:50.172Z - info: Using extension authentication@2.4.2
    2020-09-14T20:59:50.345445979Z 2020-09-14T20:59:50.345Z - info: Using extension azure-storage@1.1.0
    2020-09-14T20:59:51.362098323Z 2020-09-14T20:59:51.361Z - info: Using extension cli@2.2.2
    2020-09-14T20:59:51.377767906Z 2020-09-14T20:59:51.377Z - info: Using extension debug@2.1.3
    2020-09-14T20:59:51.380086533Z 2020-09-14T20:59:51.379Z - info: Using extension ejs@2.2.0
    2020-09-14T20:59:51.381227646Z 2020-09-14T20:59:51.381Z - info: Using extension express@2.6.0
    2020-09-14T20:59:51.993237976Z 2020-09-14T20:59:51.993Z - info: Using extension fop-pdf@2.2.0
    2020-09-14T20:59:52.103268358Z 2020-09-14T20:59:52.103Z - info: Using extension freeze@2.0.0
    2020-09-14T20:59:52.111251951Z 2020-09-14T20:59:52.111Z - info: Using extension handlebars@2.1.0
    2020-09-14T20:59:52.131197483Z 2020-09-14T20:59:52.131Z - info: Using extension import-export@1.5.1
    2020-09-14T20:59:52.278472399Z 2020-09-14T20:59:52.278Z - info: Using extension jsrender@2.1.1
    2020-09-14T20:59:52.279583512Z 2020-09-14T20:59:52.279Z - info: Using extension mongodb-store@1.3.0
    2020-09-14T20:59:53.030847264Z 2020-09-14T20:59:53.030Z - info: Using extension mssql-store@1.3.0
    2020-09-14T20:59:54.313129703Z 2020-09-14T20:59:54.307Z - info: Using extension postgres-store@1.3.0
    2020-09-14T20:59:54.550974074Z 2020-09-14T20:59:54.550Z - info: Using extension pug@3.1.0
    2020-09-14T20:59:54.559400772Z 2020-09-14T20:59:54.559Z - info: Using extension tags@2.3.0
    2020-09-14T20:59:54.573703338Z 2020-09-14T20:59:54.573Z - info: Using extension templates@2.3.2
    2020-09-14T20:59:54.583502952Z 2020-09-14T20:59:54.583Z - info: Using extension authorization@2.2.6
    2020-09-14T20:59:54.593701371Z 2020-09-14T20:59:54.593Z - info: Using extension base@2.0.2
    2020-09-14T20:59:54.598601428Z 2020-09-14T20:59:54.598Z - info: Using extension browser-client@2.2.2
    2020-09-14T20:59:54.601687964Z 2020-09-14T20:59:54.601Z - info: Using extension child-templates@1.3.1
    2020-09-14T20:59:54.617286746Z 2020-09-14T20:59:54.617Z - info: Using extension chrome-pdf@1.7.1
    2020-09-14T20:59:54.892181449Z 2020-09-14T20:59:54.883Z - info: Using extension data@2.2.0
    2020-09-14T20:59:54.892235749Z 2020-09-14T20:59:54.890Z - info: Using extension docx@2.5.0
    2020-09-14T20:59:54.900688548Z 2020-09-14T20:59:54.900Z - info: Using extension electron-pdf@3.1.0
    2020-09-14T20:59:55.099943469Z 2020-09-14T20:59:55.099Z - info: Using extension fs-store@2.7.2
    2020-09-14T20:59:55.504267879Z 2020-09-14T20:59:55.504Z - info: Using extension html-embedded-in-docx@2.2.0
    2020-09-14T20:59:55.522349490Z 2020-09-14T20:59:55.522Z - info: Using extension html-to-text@2.1.0
    2020-09-14T20:59:55.530552086Z 2020-09-14T20:59:55.530Z - info: Using extension licensing@2.2.1
    2020-09-14T20:59:55.555497176Z 2020-09-14T20:59:55.555Z - info: Using extension pdf-meta@0.2.0
    2020-09-14T20:59:55.561036441Z 2020-09-14T20:59:55.560Z - info: Using extension pdf-password@2.3.0
    2020-09-14T20:59:56.141760706Z 2020-09-14T20:59:56.141Z - info: Using extension pdf-utils@1.6.1
    2020-09-14T20:59:56.839992540Z 2020-09-14T20:59:56.835Z - info: Using extension phantom-image@2.1.0
    2020-09-14T20:59:56.922467801Z 2020-09-14T20:59:56.922Z - info: Using extension phantom-pdf@2.5.1
    2020-09-14T20:59:56.933944935Z 2020-09-14T20:59:56.933Z - info: fs store underlying changes synchronization with studio is disabled
    2020-09-14T20:59:56.935847757Z 2020-09-14T20:59:56.935Z - info: Using extension pptx@0.5.0
    2020-09-14T20:59:56.956263595Z 2020-09-14T20:59:56.956Z - info: Using extension reports@2.2.1
    2020-09-14T20:59:56.983401611Z 2020-09-14T20:59:56.983Z - info: Using extension static-pdf@0.3.1
    2020-09-14T20:59:56.996664266Z 2020-09-14T20:59:56.996Z - info: Using extension studio@2.7.0
    2020-09-14T20:59:57.171655604Z 2020-09-14T20:59:57.171Z - info: Using extension text@2.0.0
    2020-09-14T20:59:57.179974501Z 2020-09-14T20:59:57.179Z - info: Using extension version-control@1.3.2
    2020-09-14T20:59:57.602196920Z 2020-09-14T20:59:57.602Z - info: Using extension wkhtmltopdf@2.2.0
    2020-09-14T20:59:57.750809951Z 2020-09-14T20:59:57.750Z - info: Using extension assets@1.5.2
    2020-09-14T20:59:57.819132447Z 2020-09-14T20:59:57.818Z - info: Using extension fs-store-aws-s3-persistence@1.4.0
    2020-09-14T20:59:58.095460569Z 2020-09-14T20:59:58.095Z - info: Using extension fs-store-aws-sns-sync@1.2.1
    2020-09-14T20:59:58.442451224Z 2020-09-14T20:59:58.442Z - info: Using extension fs-store-azure-sb-sync@1.1.0
    2020-09-14T20:59:58.750155519Z 2020-09-14T20:59:58.749Z - info: Using extension fs-store-azure-storage-persistence@1.1.0
    2020-09-14T20:59:59.203500317Z 2020-09-14T20:59:59.177Z - info: Using extension html-to-xlsx@2.6.0
    2020-09-14T21:00:00.287893189Z 2020-09-14T21:00:00.287Z - info: html-to-xlsx detected chrome as available html engine
    2020-09-14T21:00:00.294165562Z 2020-09-14T21:00:00.288Z - info: html-to-xlsx detected phantom as available html engine
    2020-09-14T21:00:00.294775669Z 2020-09-14T21:00:00.294Z - info: Using extension pdf-sign@0.4.0
    2020-09-14T21:00:00.301356246Z 2020-09-14T21:00:00.301Z - info: Using extension scheduling@2.2.0
    2020-09-14T21:00:00.398868586Z 2020-09-14T21:00:00.398Z - info: Using extension scripts@2.3.0
    2020-09-14T21:00:00.411135629Z 2020-09-14T21:00:00.411Z - info: Using extension studio-theme-dark@0.3.0
    2020-09-14T21:00:00.433208987Z 2020-09-14T21:00:00.433Z - info: Using extension xlsx@2.3.0
    2020-09-14T21:00:00.770409127Z 2020-09-14T21:00:00.770Z - info: Using extension public-templates@2.1.0
    2020-09-14T21:00:00.771864544Z 2020-09-14T21:00:00.771Z - info: Using extension resources@2.0.3
    2020-09-14T21:00:00.773805467Z 2020-09-14T21:00:00.773Z - info: Using extension sample-template@2.5.1
    2020-09-14T21:00:00.790776565Z 2020-09-14T21:00:00.790Z - info: Using general timeout for rendering (reportTimeout: 60000)
    2020-09-14T21:00:00.791366872Z 2020-09-14T21:00:00.791Z - info: Using fs provider for template store.
    2020-09-14T21:00:00.811797511Z 2020-09-14T21:00:00.811Z - info: fs store is persisting using fs
    2020-09-14T21:00:00.813375429Z 2020-09-14T21:00:00.813Z - info: fs store sync is disabled
    2020-09-14T21:00:00.852862891Z 2020-09-14T21:00:00.852Z - info: fs store is loading data
    2020-09-14T21:00:00.922036199Z 2020-09-14T21:00:00.921Z - info: fs store is initialized successfully
    2020-09-14T21:00:01.205973917Z 2020-09-14T21:00:01.205Z - info: Creating default express app.
    2020-09-14T21:00:01.376588811Z 2020-09-14T21:00:01.376Z - info: jsreport server successfully started on http port: 5488
    2020-09-14T21:00:01.414867558Z 2020-09-14T21:00:01.414Z - info: Verifying license key free
    2020-09-14T21:00:01.431851056Z 2020-09-14T21:00:01.431Z - info: Using free license
    2020-09-14T21:00:01.443856097Z 2020-09-14T21:00:01.443Z - info: reporter initialized

  • The trouble is that your log outputs

    fs store is persisting using fs

    when it should be

    fs store is persisting using azure-storage

    I tried to replicate your problem by creating new azure app service based on Linux and with the same docker container as you have jsreport/jsreport:2.7.2-full. I filled the same 3 configurations as you

    extensions_fsStoreAzureStoragePersistence_accountKey=<my key>

    And after azure was able to propagate the change (it often takes some minutes, because azure seems to create a brand new app somewhere else and then swaps the addresses), I see the container correctly talking with the blob storage and " fs store is persisting using azure-storage" in the output.

    The azure web apps are behaving strangely sometimes, please try to restart the app and give it some time.

  • Jan,

    I was able to successfully configure jsreport to save templates in an azure storage account. The problem was what I was missing a character in the settings for the storage account. Once I corrected the issue and re-started the app service the app created a blob container "jsreport" and I can see the templates created. I was also able to import a custom report I created into the azure web app and this report template was also saved into the blob storage.
    I am impressed with the product and its overall architecture. I will be presenting my POC solution to the engineering team and recommend its use in our SaaS solution.
    Thank you very much for your help.
    Pedro Reinoso

  • Great! Glad to hear that

Log in to reply

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