I have modified the jsreport configuration in production but reports stopped working
-
Hi sir,
Im using jsreport version 3.3
JSReport config,
{
"httpPort": 8050,
"store": {
"provider": "mongodb"
},
"blobStorage": {
"provider": "mongodb"
},
"logger": {
"console": {
"transport": "console",
"level": "debug"
},
"file": {
"transport": "file",
"level": "info",
"filename": "logs/reporter.log"
},
"error": {
"transport": "file",
"level": "error",
"filename": "logs/error.log"
}
},
"allowLocalFilesAccess": true,
"reportTimeout": 600000,
"workers": {
"numberOfWorkers": 13
},
"extensions": {
"fs-store": {
"sync": {
"provider": "aws-sns"
}
},
"mongodb-store": {
"uri": "",
"prefix": ""
},
"authentication": {
"cookieSession": {
"secret": ""
},
"admin": {
"username": "",
"password": ""
}
},
"reports": {
"cleanInterval": "",
"cleanThreshold": ""
}
}
}workers name is modified to
"chrome": {
"numberOfWorkers": 13
},as per the doc
after update the configuration and deployed to aws via docker production jsreport stopped working
Also we are using trial version and we have more than 5 templates
Is because of trial version or no of templates exceed why jsreport stopped working?
Is V3.3 have any issue?
Also after im reverting the configuration to
"workers": {
"numberOfWorkers": 13
},still jsreport stopped working?
Also i have added 3 environment variables in docker file too after making modification in configuration .I dont know why jsreport stopped working?Docker file is,
FROM jsreport/jsreport:3.3.0
USER rootENV a=********
ENV b=********
ENV c=****************
ENV d="***********r"RUN npm i handlebars-intl
RUN npm i handlebars
RUN npm install @jsreport/jsreport-fs-store-aws-s3-persistence
RUN npm install request --save
RUN npm i jwt-decode --save
RUN npm i aws-sdk --save
RUN npm install @jsreport/jsreport-mongodb-store@3.0.0
RUN npm i moment-timezone --savePackages like handlebars , moment-timezone also installed but this also removed without uninstalling is because of that report stopped working?
can u please reply???
Why i modified the configuration file is that report rendering is quite slow in production compared to developed . dev in aws mumbai region and prod in aws frankfurt.Is there any mistake in my configuration ?
Actually report rendering slowness is my main issue in production and clients are also asking can u please help me?
-
Please share the jsreport output from stdout or logs.
-
[1_1692095426216_reporter.log](Uploading 100%) [0_1692095426216_error.log](Uploading 100%) hi sir ,
i have tried to import the producrion export file to localhost but so many errors and warnings.
Also out production jsreport store in mongodb and localhost is file system . idont whether the error is because of that i have mailed the error log to mail id - bjrmatos@gmail.com, jan.blaha@jsreport.net
since i cant upload the file through this forum
Error
copy consistent transaction to the data directory crashed, trying again in 200ms EMFILE: too many open files, open 'D:\WorkArea\JS Report\jsreportapp\data~.tran\Test\Clients\TENANT_fc0a0d46-64af-4e41-84e0-665d30a2faae\LOCATION_3b1e58f9-90a3-44c1-8385-e64229e4d0b3\House\Invoice\Invoice\Logo_684-136.png\content.png' errno=-4066, code=EMFILE, syscall=open, path=D:\WorkArea\JS Report\jsreportapp\data~.tran\Test\Clients\TENANT_fc0a0d46-64af-4e41-84e0-665d30a2faae\LOCATION_3b1e58f9-90a3-44c1-8385-e64229e4d0b3\House\Invoice\Invoice\Logo_684-136.png\content.png, stack=Error: EMFILE: too many open files, open 'D:\WorkArea\JS Report\jsreportapp\data~.tran\Test\Clients\TENANT_fc0a0d46-64af-4e41-84e0-665d30a2faae\LOCATION_3b1e58f9-90a3-44c1-8385-e64229e4d0b3\House\Invoice\Invoice\Logo_684-136.png\content.png'
2023-08-15T14:08:13.018Z - warn: unable to load planned schedules, but no need to worry, we will retry, details:Error: Timeout during waiting for file system, try it again later.
at Object.rejectItemsWithTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\queue.js:52:23)
at Timeout._onTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\transaction.js:29:11)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
2023-08-15T14:08:17.705Z - warn: Error when syncing fs journal, no worry, we will run again Timeout during waiting for file system, try it again later. stack=Error: Timeout during waiting for file system, try it again later.
at Object.rejectItemsWithTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\queue.js:52:23)
at Timeout._onTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\transaction.js:29:11)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
2023-08-15T14:08:19.710Z - warn: unable to load planned schedules, but no need to worry, we will retry, details:Error: Timeout during waiting for file system, try it again later.
at Object.rejectItemsWithTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\queue.js:52:23)
at Timeout._onTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\transaction.js:29:11)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
2023-08-15T14:08:21.726Z - warn: Error when cleaning fs journal, no worry, we will run again Timeout during waiting for file system, try it again later. stack=Error: Timeout during waiting for file system, try it again later.
at Object.rejectItemsWithTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\queue.js:52:23)
at Timeout._onTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\transaction.js:29:11)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
2023-08-15T14:08:23.735Z - warn: fs store compaction failed, but no problem, it will retry the next time.Timeout during waiting for file system, try it again later.
2023-08-15T14:08:25.944Z - warn: unable to load planned schedules, but no need to worry, we will retry, details:Error: Timeout during waiting for file system, try it again later.
at Object.rejectItemsWithTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\queue.js:52:23)
at Timeout._onTimeout (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-fs-store\lib\transaction.js:29:11)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)can u please tell me what is meaning of this error?
After restarting
error: Error occurred during reporter init: Error: EMFILE: too many open files, open 'D:\WorkArea\JS Report\jsreportapp\data~.tran\Test\Clients\TENANT_fc0a0d46-64af-4e41-84e0-665d30a2faae\LOCATION_3b1e58f9-90a3-44c1-8385-e64229e4d0b3\House\Label\Label\Label-Template\headerTemplate.handlebars'
An error ocurred while trying to execute "start" command (3)
(because) an error has occurred when trying to initialize jsreport (2)
(because) eMFILE: too many open files, open 'D:\WorkArea\JS Report\jsreportapp\data~.tran\Test\Clients\TENANT_fc0a0d46-64af-4e41-84e0-665d30a2faae\LOCATION_3b1e58f9-90a3-44c1-8385-e64229e4d0b3\House\Label\Label\Label-Template\headerTemplate.handlebars' (1)-- error (1) --
-> meta = {"errno":-4066,"code":"EMFILE","syscall":"open","path":"D:\WorkArea\JS Report\jsreportapp\data\~.tran\Test\Clients\TENANT_fc0a0d46-64af-4e41-84e0-665d30a2faae\LOCATION_3b1e58f9-90a3-44c1-8385-e64229e4d0b3\House\Label\Label\Label-Template\headerTemplate.handlebars"}
-> stack
Error: EMFILE: too many open files, open 'D:\WorkArea\JS Report\jsreportapp\data~.tran\Test\Clients\TENANT_fc0a0d46-64af-4e41-84e0-665d30a2faae\LOCATION_3b1e58f9-90a3-44c1-8385-e64229e4d0b3\House\Label\Label\Label-Template\headerTemplate.handlebars'
wrapped by:
-- error (2) --
-> meta = {"code":"EMFILE"}
-> stack
Error:
at D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\instanceHandler.js:31:29
at async executeCommand (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\commander\executeCommand.js:22:20)
at async Object.handler (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\commander\registerCommand.js:76:9)
at async parseCLI (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\commander\startCommand.js:156:3)
at async startCLI (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\commander\startCommand.js:121:20)
at async startCommand (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\commander\startCommand.js:67:5)
at async startProcessing (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\commander\startProcessing.js:195:3)
wrapped by:
-- error (3) --
-> stack
Error:
at startCLI (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\commander\startCommand.js:127:19)
at async startCommand (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\commander\startCommand.js:67:5)
at async startProcessing (D:\WorkArea\JS Report\jsreportapp\node_modules@jsreport\jsreport-cli\lib\commander\startProcessing.js:195:3)What do u mean by too many open files?
-
The above error comes after few weeks before that it was working fine .Now 2 (asset) files comes at the root cant able to delete it throw error,
I think due to this error when i try to export file and import in localhost it throw error like,
copy consistent transaction to the data directory crashed, trying again in 200ms EMFILE: too many open files,
-
I am quite confused about this.
So the problem is that you can't import something to your localhost running on windows with file system store?
Can you share that export file somewhere and link it here?
-
Sorry sir it is production export file. copy consistent transaction to the data directory crashed, trying again in 200ms EMFILE: too many open files,
What does it mean by open files?
-
Also i dont know how the files like receipt-stlye.css and logo_192-48.png file comes at the root and why it cant be deleted .How such scenario comes?Since it is production account and few clients were using it
-
Can you try to back up your current data folder, remove it, restart jsreport and try the import again?
Also, does it help to update nodejs?The error comes from the OS. We do parallel copy of the dirs/files. Maybe it is too much parallelization for the OS. Although I didn't encounter this before. If the clean import or nodejs update won't help, we gonna limit the parallelization which should fix this.
-
Is this error due to the number of templates in trial version exceeds like above 5?
-
yes i deleted the data folder and restart the jsreport and import it , then it throws
how can i delete the 2 files in root?
-
It mentiones just warning, does it actually throw or pass their import?
Is this error due to the number of templates in trial version exceeds like above 5?
Likely no.
yes i deleted the data folder and restart the jsreport and import it , then it throws
Seems like your export is corrupted. It contains entities that don't have parents.
how can i delete the 2 files in root?
You can unzip the
jsrexport
file, remove entries from inside and then zip it back.
-
How to unzip? Should I need to download any tool to unzip it? Also it doesn't tell the correct location of corrupted area .
-
as for your last screenshot, it is not clear what throws, the screenshot just shows that the import validation passes with some warnings, however, even with warnings you can still continue the import, just click "Import". if you continue, what happens?
How to unzip? Should I need to download any tool to unzip it? Also it doesn't tell the correct location of corrupted area .
rename your export file extension from
.jsrexport
to.zip
, from example if your file isfile.jsrexport
rename it tofile.zip
then you can unzip it with any tool available on your OS for handling zip files.