Azure blob storage not working.
-
I followed the same instrunctions mentioned on your site.https://jsreport.net/blog/render-reports-using-azure-app-service
The azure storage Connection string looks like this:
DefaultEndpointsProtocol=https;AccountName=storageaccountxxxxx;AccountKey=xxxxxxxx/xxxxx/xxxxxxxx==;EndpointSuffix=core.windows.net
The jsReport's azure web app is throwing "invalid connection string error". I rechecked the value and it's as provided from azure storage
Any idea?
-
The error log:
2020-10-28T12:29:08.692Z INFO - Pulling image from Docker hub: jsreport/jsreport:2.10.0-full 2020-10-28T12:29:09.740Z INFO - 2.10.0-full Pulling from jsreport/jsreport 2020-10-28T12:29:09.742Z INFO - Digest: sha256:62d10967695ede1be8d74a0f274d50ec4365e3e54dc470ee5d5cc7dcb52d3967 2020-10-28T12:29:09.744Z INFO - Status: Image is up to date for jsreport/jsreport:2.10.0-full 2020-10-28T12:29:09.747Z INFO - Pull Image successful, Time taken: 0 Minutes and 1 Seconds 2020-10-28T12:29:09.754Z INFO - Starting container for site 2020-10-28T12:29:09.755Z INFO - docker run -d -p 5614:5488 --name jsreportwebapp_0_c1eb759d -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=JsReportWebApp -e WEBSITE_AUTH_ENABLED=False -e PORT=5488 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=jsreportwebapp.azurewebsites.net -e WEBSITE_INSTANCE_ID=0ba78dffa618a60516959c0666483417863a6a3954d0cd16e20f72ea2335e9cb jsreport/jsreport:2.10.0-full npm start 2020-10-28T12:29:09.756Z INFO - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here. 2020-10-28T12:29:10.903Z INFO - Initiating warmup request to container jsreportwebapp_0_c1eb759d for site jsreportwebapp 2020-10-28T12:29:11.179153847Z 2020-10-28T12:29:11.179219348Z > jsreport-server@ start /app 2020-10-28T12:29:11.179239448Z> node server 2020-10-28T12:29:11.179243348Z 2020-10-28T12:29:11.598631112Z 2020-10-28T12:29:11.597Z - [32minfo[39m: Initializing jsreport@2.10.0 in production mode using configuration file: jsreport.config.json 2020-10-28T12:29:11.600602223Z 2020-10-28T12:29:11.600Z - [32minfo[39m: Searching for available extensions in /app/ 2020-10-28T12:29:11.605321147Z 2020-10-28T12:29:11.605Z - [32minfo[39m: Extensions location cache not found, crawling directories 2020-10-28T12:29:12.560071275Z 2020-10-28T12:29:12.559Z - [32minfo[39m: Found 52 extensions 2020-10-28T12:29:12.788647454Z 2020-10-28T12:29:12.788Z - [32minfo[39m: Setting dedicated-process (process based) strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance. 2020-10-28T12:29:12.795650290Z 2020-10-28T12:29:12.795Z - [32minfo[39m: Using extension authentication@2.6.0 2020-10-28T12:29:12.822164327Z 2020-10-28T12:29:12.822Z - [32minfo[39m: Using extension azure-storage@1.1.1 2020-10-28T12:29:13.036189232Z 2020-10-28T12:29:13.034Z - [32minfo[39m: Using extension cli@2.2.5 2020-10-28T12:29:13.038022641Z 2020-10-28T12:29:13.036Z - [32minfo[39m: Using extension debug@2.1.3 2020-10-28T12:29:13.039801051Z 2020-10-28T12:29:13.038Z - [32minfo[39m: Using extension ejs@2.2.0 2020-10-28T12:29:13.039859051Z 2020-10-28T12:29:13.038Z - [32minfo[39m: Using extension express@2.8.0 2020-10-28T12:29:13.129383813Z 2020-10-28T12:29:13.129Z - [32minfo[39m: Using extension fop-pdf@2.2.0 2020-10-28T12:29:13.160836575Z 2020-10-28T12:29:13.160Z - [32minfo[39m: Using extension freeze@2.0.0 2020-10-28T12:29:13.162321883Z 2020-10-28T12:29:13.162Z - [32minfo[39m: Using extension handlebars@2.1.0 2020-10-28T12:29:13.165156098Z 2020-10-28T12:29:13.164Z - [32minfo[39m: Using extension import-export@2.1.0 2020-10-28T12:29:13.205815907Z 2020-10-28T12:29:13.205Z - [32minfo[39m: Using extension jsrender@2.1.1 2020-10-28T12:29:13.206516011Z 2020-10-28T12:29:13.206Z - [32minfo[39m: Using extension mongodb-store@1.3.3 2020-10-28T12:29:13.322941312Z 2020-10-28T12:29:13.322Z - [32minfo[39m: Using extension mssql-store@1.4.0 2020-10-28T12:29:13.576306720Z 2020-10-28T12:29:13.576Z - [32minfo[39m: Using extension postgres-store@1.3.1 2020-10-28T12:29:13.723635880Z 2020-10-28T12:29:13.723Z - [32minfo[39m: Using extension pug@3.1.0 2020-10-28T12:29:13.724238383Z 2020-10-28T12:29:13.724Z - [32minfo[39m: Using extension tags@2.5.0 2020-10-28T12:29:13.729411010Z 2020-10-28T12:29:13.726Z - [32minfo[39m: Using extension templates@2.4.0 2020-10-28T12:29:13.729430410Z 2020-10-28T12:29:13.728Z - [32minfo[39m: Using extension authorization@2.4.0 2020-10-28T12:29:13.731568621Z 2020-10-28T12:29:13.731Z - [32minfo[39m: Using extension base@2.0.2 2020-10-28T12:29:13.732925728Z 2020-10-28T12:29:13.732Z - [32minfo[39m: Using extension browser-client@2.2.2 2020-10-28T12:29:13.734773337Z 2020-10-28T12:29:13.734Z - [32minfo[39m: Using extension child-templates@1.4.0 2020-10-28T12:29:13.737931054Z 2020-10-28T12:29:13.737Z - [32minfo[39m: Using extension chrome-pdf@1.9.0 2020-10-28T12:29:13.789858922Z 2020-10-28T12:29:13.789Z - [32minfo[39m: Using extension data@2.4.0 2020-10-28T12:29:13.790592325Z 2020-10-28T12:29:13.790Z - [32minfo[39m: Using extension docx@2.8.0 2020-10-28T12:29:13.793969743Z 2020-10-28T12:29:13.793Z - [32minfo[39m: Using extension electron-pdf@3.2.0 2020-10-28T12:29:13.843202297Z 2020-10-28T12:29:13.842Z - [32minfo[39m: Using extension fs-store@2.9.0 2020-10-28T12:29:13.933931165Z 2020-10-28T12:29:13.933Z - [32minfo[39m: Using extension html-embedded-in-docx@2.2.0 2020-10-28T12:29:13.935713974Z 2020-10-28T12:29:13.935Z - [32minfo[39m: Using extension html-to-text@2.1.0 2020-10-28T12:29:13.938389188Z 2020-10-28T12:29:13.938Z - [32minfo[39m: Using extension licensing@2.2.3 2020-10-28T12:29:13.940992602Z 2020-10-28T12:29:13.940Z - [32minfo[39m: Using extension pdf-utils@1.9.0 2020-10-28T12:29:13.997348193Z 2020-10-28T12:29:13.997Z - [32minfo[39m: Using extension phantom-image@2.1.0 2020-10-28T12:29:14.016827893Z 2020-10-28T12:29:14.016Z - [32minfo[39m: Using extension phantom-pdf@2.6.0 2020-10-28T12:29:14.020812714Z 2020-10-28T12:29:14.020Z - [32minfo[39m: fs store underlying changes synchronization with studio is disabled 2020-10-28T12:29:14.022409822Z 2020-10-28T12:29:14.022Z - [32minfo[39m: Using extension pptx@0.7.0 2020-10-28T12:29:14.029934561Z 2020-10-28T12:29:14.029Z - [32minfo[39m: Using extension reports@2.5.0 2020-10-28T12:29:14.032798676Z 2020-10-28T12:29:14.032Z - [32minfo[39m: Using extension static-pdf@0.4.0 2020-10-28T12:29:14.035767191Z 2020-10-28T12:29:14.035Z - [32minfo[39m: Using extension studio@2.10.1 2020-10-28T12:29:14.086832154Z 2020-10-28T12:29:14.086Z - [32minfo[39m: Using extension text@2.0.0 2020-10-28T12:29:14.087435458Z 2020-10-28T12:29:14.087Z - [32minfo[39m: Using extension version-control@1.5.1 2020-10-28T12:29:14.135980108Z 2020-10-28T12:29:14.135Z - [32minfo[39m: Using extension wkhtmltopdf@2.3.0 2020-10-28T12:29:14.170166885Z 2020-10-28T12:29:14.169Z - [32minfo[39m: Using extension assets@1.7.0 2020-10-28T12:29:14.189873186Z 2020-10-28T12:29:14.189Z - [32minfo[39m: Using extension fs-store-aws-s3-persistence@1.4.0 2020-10-28T12:29:14.248266088Z 2020-10-28T12:29:14.248Z - [32minfo[39m: Using extension fs-store-aws-sns-sync@1.2.1 2020-10-28T12:29:14.314685530Z 2020-10-28T12:29:14.314Z - [32minfo[39m: Using extension fs-store-azure-sb-sync@1.1.0 2020-10-28T12:29:14.391988629Z 2020-10-28T12:29:14.391Z - [32minfo[39m: Using extension fs-store-azure-storage-persistence@1.2.0 2020-10-28T12:29:14.457352067Z 2020-10-28T12:29:14.457Z - [32minfo[39m: Using extension html-to-xlsx@2.8.0 2020-10-28T12:29:14.646457043Z 2020-10-28T12:29:14.646Z - [32minfo[39m: html-to-xlsx detected chrome as available html engine 2020-10-28T12:29:14.646506043Z 2020-10-28T12:29:14.646Z - [32minfo[39m: html-to-xlsx detected phantom as available html engine 2020-10-28T12:29:14.647549948Z 2020-10-28T12:29:14.646Z - [32minfo[39m: Using extension scheduling@2.5.0 2020-10-28T12:29:14.679678714Z 2020-10-28T12:29:14.679Z - [32minfo[39m: Using extension scripts@2.6.0 2020-10-28T12:29:14.682388028Z 2020-10-28T12:29:14.682Z - [32minfo[39m: Using extension studio-theme-dark@0.3.0 2020-10-28T12:29:14.682957531Z 2020-10-28T12:29:14.682Z - [32minfo[39m: Using extension xlsx@2.5.0 2020-10-28T12:29:14.780423434Z 2020-10-28T12:29:14.780Z - [32minfo[39m: Using extension public-templates@2.2.0 2020-10-28T12:29:14.781107738Z 2020-10-28T12:29:14.780Z - [32minfo[39m: Using extension resources@2.1.0 2020-10-28T12:29:14.781803741Z 2020-10-28T12:29:14.781Z - [32minfo[39m: Using extension sample-template@2.6.0 2020-10-28T12:29:14.783461750Z 2020-10-28T12:29:14.783Z - [32minfo[39m: Using general timeout for rendering (reportTimeout: 60000) 2020-10-28T12:29:14.783497050Z 2020-10-28T12:29:14.783Z - [32minfo[39m: Using fs provider for template store. 2020-10-28T12:29:14.790343385Z 2020-10-28T12:29:14.790Z - [32minfo[39m: fs store is persisting using azure-storage 2020-10-28T12:29:14.810150288Z 2020-10-28T12:29:14.809Z - [32minfo[39m: fs store is synchronizing using azure-sb 2020-10-28T12:29:14.811900497Z 2020-10-28T12:29:14.811Z - [31merror[39m: Error occured during reporter init Error: Invalid connection string setting key "defaultendpointsprotocol" 2020-10-28T12:29:14.811942797Z at /app/node_modules/azure-common/lib/services/servicesettings.js:78:13 2020-10-28T12:29:14.811950297Z at Array.forEach (<anonymous>) 2020-10-28T12:29:14.811954597Z at Object.exports.parseAndValidateKeys (/app/node_modules/azure-common/lib/services/servicesettings.js:76:34) 2020-10-28T12:29:14.811958897Z at Function.ServiceBusSettings.createFromConnectionString (/app/node_modules/azure-common/lib/services/servicebussettings.js:164:43) 2020-10-28T12:29:14.811962997Z at ServiceBusServiceBase (/app/node_modules/azure-sb/lib/servicebusservicebase.js:57:45) 2020-10-28T12:29:14.811966997Z at new ServiceBusService (/app/node_modules/azure-sb/lib/servicebusservice.js:69:31) 2020-10-28T12:29:14.811970797Z at Object.exports.createServiceBusService (/app/node_modules/azure-sb/lib/servicebus.js:39:10) 2020-10-28T12:29:14.811974697Z at module.exports (/app/node_modules/jsreport-fs-store-azure-sb-sync/lib/syncAzureServiceBus.js:20:27) 2020-10-28T12:29:14.811978597Z at /app/node_modules/jsreport-fs-store-azure-sb-sync/lib/main.js:9:54 2020-10-28T12:29:14.811992397Z at Object.load (/app/node_modules/jsreport-fs-store/lib/provider.js:78:21) 2020-10-28T12:29:14.811996597Z at Object.init (/app/node_modules/jsreport-core/lib/store/documentStore.js:188:29) 2020-10-28T12:29:14.812000497Z at Reporter.init (/app/node_modules/jsreport-core/lib/reporter.js:244:32) 2020-10-28T12:29:14.812442499Z Error: Invalid connection string setting key "defaultendpointsprotocol" 2020-10-28T12:29:14.812456199Z at /app/node_modules/azure-common/lib/services/servicesettings.js:78:13 2020-10-28T12:29:14.812460999Z at Array.forEach (<anonymous>) 2020-10-28T12:29:14.812465100Z at Object.exports.parseAndValidateKeys (/app/node_modules/azure-common/lib/services/servicesettings.js:76:34) 2020-10-28T12:29:14.812469300Z at Function.ServiceBusSettings.createFromConnectionString (/app/node_modules/azure-common/lib/services/servicebussettings.js:164:43) 2020-10-28T12:29:14.812473300Z at ServiceBusServiceBase (/app/node_modules/azure-sb/lib/servicebusservicebase.js:57:45) 2020-10-28T12:29:14.812477300Z at new ServiceBusService (/app/node_modules/azure-sb/lib/servicebusservice.js:69:31) 2020-10-28T12:29:14.812481200Z at Object.exports.createServiceBusService (/app/node_modules/azure-sb/lib/servicebus.js:39:10) 2020-10-28T12:29:14.812493700Z at module.exports (/app/node_modules/jsreport-fs-store-azure-sb-sync/lib/syncAzureServiceBus.js:20:27) 2020-10-28T12:29:14.812497600Z at /app/node_modules/jsreport-fs-store-azure-sb-sync/lib/main.js:9:54 2020-10-28T12:29:14.812501400Z at Object.load (/app/node_modules/jsreport-fs-store/lib/provider.js:78:21) 2020-10-28T12:29:14.812505200Z at Object.init (/app/node_modules/jsreport-core/lib/store/documentStore.js:188:29) 2020-10-28T12:29:14.812509000Z at Reporter.init (/app/node_modules/jsreport-core/lib/reporter.js:244:32) 2020-10-28T12:29:14.829984890Z npm ERR! code ELIFECYCLE 2020-10-28T12:29:14.830633393Z npm ERR! errno 1 2020-10-28T12:29:14.831717699Z npm ERR! jsreport-server@ start: `node server` 2020-10-28T12:29:14.832027600Z npm ERR! Exit status 1 2020-10-28T12:29:14.832038601Z npm ERR! 2020-10-28T12:29:14.832092901Z npm ERR! Failed at the jsreport-server@ start script. 2020-10-28T12:29:14.832101001Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2020-10-28T12:29:14.840897146Z 2020-10-28T12:29:14.840927146Z npm ERR! A complete log of this run can be found in: 2020-10-28T12:29:14.840933846Z npm ERR! /home/jsreport/.npm/_logs/2020-10-28T12_29_14_832Z-debug.log
Most relevant line:
2020-10-28T12:29:14.811900497Z 2020-10-28T12:29:14.811Z - [31merror[39m: Error occured during reporter init Error: Invalid connection string setting key "defaultendpointsprotocol"
2020-10-28T12:29:14.811942797Z at /app/node_modules/azure-common/lib/services/servicesettings.js:78:13Note that I rechecked the inputted value and it's surely not just "defaultendpointsprotocol", it seems there's a bug in that jsreport container?
Note that when I put the store configuration in a local jsreport app, it worked, the templates were uploaded to that azure storage, but however it's not working on the web app where I am using the container you're providing.
In the local storage I noticed there's no 'connection string' required but just accountName and accountKey for fs-store-azure-storage-persistence
-
2020-10-28T12:29:14.811978597Z at /app/node_modules/jsreport-fs-store-azure-sb-sync/lib/main.js:9:54
It isn't crashing because of the blob storage connection string, but because of the service bus connection string.
I see in your config the following lines, this enables synchronization of the templates changes between multiple jsreport instances through azure service bus.extensions_fsStore_sync_provider=azure-sb extensions_fsStoreAzureSbSync_connectionString=xxx
See this covered in the documentation https://jsreport.net/learn/fs-store#azure-storage
For the start, try running with single jsreport app service instance, disable the service bus synchronization, and see if it works. Just remove the mentioned two lines from the app settings and restart.
-
Yes, you're right, yesterday I tried it without the azure-sb and it worked, but I don't know why it is crushing on the connection sb string (required by bus).
Currently I don't need more than one instance, but I'll have to look into it later.