I'm trying to run jsreport 4.3.1
on an ECS cluster running Fargate. I'm currently getting the following error in the task logs:
2024-04-25T14:16:51.143-04:00 2024-04-25T18:16:51.143Z - [32minfo[39m: fs store is persisting using fs for /app/data
2024-04-25T14:16:51.465-04:00 2024-04-25T18:16:51.465Z - [31merror[39m: Error occurred during reporter init: Error: Failed to acquire fs store file system lock.
2024-04-25T14:16:51.465-04:00 at Object.lock (/app/node_modules/@jsreport/jsreport-fs-store/lib/fileSystem.js:126:13)
2024-04-25T14:16:51.465-04:00 at async lock (/app/node_modules/@jsreport/jsreport-fs-store/lib/customUtils.js:151:13)
2024-04-25T14:16:51.465-04:00 at async Object.load (/app/node_modules/@jsreport/jsreport-fs-store/lib/provider.js:121:7)
2024-04-25T14:16:51.465-04:00 at async Object.init (/app/node_modules/@jsreport/jsreport-core/lib/main/store/documentStore.js:162:9)
2024-04-25T14:16:51.465-04:00 at async MainReporter.init (/app/node_modules/@jsreport/jsreport-core/lib/main/reporter.js:228:7)
2024-04-25T14:16:51.467-04:00 Error: Failed to acquire fs store file system lock.
2024-04-25T14:16:51.467-04:00 at Object.lock (/app/node_modules/@jsreport/jsreport-fs-store/lib/fileSystem.js:126:13)
2024-04-25T14:16:51.467-04:00 at async lock (/app/node_modules/@jsreport/jsreport-fs-store/lib/customUtils.js:151:13)
2024-04-25T14:16:51.467-04:00 at async Object.load (/app/node_modules/@jsreport/jsreport-fs-store/lib/provider.js:121:7)
2024-04-25T14:16:51.467-04:00 at async Object.init (/app/node_modules/@jsreport/jsreport-core/lib/main/store/documentStore.js:162:9)
2024-04-25T14:16:51.467-04:00 at async MainReporter.init (/app/node_modules/@jsreport/jsreport-core/lib/main/reporter.js:228:7)
jsconfig:
{
"logger": {
"console": { "transport": "console", "level": "debug" }
},
"httpPort": 5488,
"allowLocalFilesAccess": true,
"store": {
"provider": "fs"
},
"blobStorage": {
"provider": "fs"
},
"templatingEngines": {
"timeout": 300000
},
"chrome": {
"timeout": 300000
},
"sample-template": {
"createSamples": false
},
"scripts": {
"timeout": 300000
},
"scheduling": {
"misfireThreshold": 300000
},
"reports": {
"cleanInterval": "1d",
"cleanThreshold": "1w"
}
}
Current Dockerfile
FROM jsreport/jsreport:4.3.1
WORKDIR /app
COPY --chown=jsreport:jsreport data/ /app/data
COPY --chown=jsreport:jsreport jsreport.config.json /app
VOLUME [ "/app/data" ]
Relevant ECS task definition configuration:
...
"mountPoints": [
{
"sourceVolume": "data",
"containerPath": "/app/data",
"readOnly": false
}
],
...
"volumes": [
{
"name": "data",
"host": {}
}
],
...