2016-03-23T17:31:50.033Z - info: Initializing embedded storage at /home/jsreport/data
2016-03-23T17:31:50.075Z - error: Failed to load collection templates Error: EISDIR: illegal operation on a directory, read
at Error (native)
2016-03-23T17:31:50.078Z - error: Error occured during reporter init Error: EISDIR: illegal operation on a directory, read
at Error (native)
From previous event:
at /home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:78:8
From previous event:
at Reporter.init (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:57:30)
at Reporter.reporter.init (/home/jsreport/node_modules/jsreport/lib/extendInit.js:8:21)
at Object.<anonymous> (/home/jsreport/server.js:1:85)
2016-03-23T17:31:50.079Z - error: Failed to load collection images Error: EISDIR: illegal operation on a directory, read
at Error (native)
2016-03-23T17:31:50.080Z - error: Failed to load collection data Error: EISDIR: illegal operation on a directory, read
at Error (native)
Background: We are building a Docker container to run our reports in production. To do this, we copy the /data file to our container from our local drive. When we start the jsreport server, it errors out. This was previously running fine until a day or so ago.
Did the latest release invalidate some of the folders underneath the /data folder? Is there a new structure? or... It seems that the new docker build cannot use the files that we have been creating using an older version of jsreports maybe?
Here is our DockerFile:
FROM node:4.4.0
MAINTAINER -----
EXPOSE 2945
RUN apt-get update && apt-get install -y sudo
RUN adduser --disabled-password --gecos "" jsreport
RUN echo "jsreport ALL=(root) NOPASSWD: /usr/local/bin/node" >> /etc/sudoers
RUN echo "jsreport ALL=(root) NOPASSWD: /usr/local/bin/npm" >> /etc/sudoers
VOLUME ["/jsreport"]
WORKDIR /home/jsreport
ADD run.sh /home/jsreport/run.sh
# Install current version of jsreports
RUN sudo npm install jsreport --production
# Install 3rd Party plugin (ours) that saves report output to S3
RUN sudo npm install jsreport-s3-storage
# Initialize jsreports
RUN node node_modules/jsreport --init
# Copy over all of the report code. Make sure you are building the Docker container
# from the root of your report folder (ex: $HOME/local-reports)
COPY /data /home/jsreport/data
# Copy over all of our environment's config files. Note: these are not kept in
# source control. See Production Ops staff for information.
COPY dev.config.json /home/jsreport/
COPY prod.config.json /home/jsreport/
ENV NODE_ENV production
# Start the jsreports server
CMD ["bash", "/home/jsreport/run.sh"]
2016-03-23T19:53:03.054Z - info: Initializing embedded storage at /home/jsreport/data
2016-03-23T19:53:03.071Z - error: Error occured during reporter init Error: EEXIST, file already exists '/home/jsreport/data/schedules'
at Object.fs.mkdirSync (fs.js:653:18)
at Function.sync (/home/jsreport/node_modules/jsreport/node_modules/mkdirp/index.js:71:13)
at Function.Persistence.ensureDirectoryExists (/home/jsreport/node_modules/jsreport/node_modules/jsreport-embedded-store/lib/persistence.js:63:12)
at new Persistence (/home/jsreport/node_modules/jsreport/node_modules/jsreport-embedded-store/lib/persistence.js:55:17)
at EmbeddedCollection.load (/home/jsreport/node_modules/jsreport/node_modules/jsreport-embedded-store/lib/embeddedProvider.js:107:32)
at /home/jsreport/node_modules/jsreport/node_modules/jsreport-embedded-store/lib/embeddedProvider.js:43:20
at Array.map (native)
at EmbeddedProvider.init (/home/jsreport/node_modules/jsreport/node_modules/jsreport-embedded-store/lib/embeddedProvider.js:39:56)
at DocumentStore.init (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/store/documentStore.js:43:24)
at q.ninvoke.then.then.then.then.then.then.self.initializeListener.fire.then.self.extensionsManager.recipes.push.name (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:75:33)
at node.js:906:3
From previous event:
at /home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:78:8
From previous event:
at Reporter.init (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:57:30)
at Reporter.reporter.init (/home/jsreport/node_modules/jsreport/lib/extendInit.js:8:21)
at Object.<anonymous> (/home/jsreport/server.js:1:85)
2016-03-23T19:53:03.083Z - error: Failed to load collection templates Error: EISDIR, read
2016-03-23T19:53:03.085Z - error: Failed to load collection data Error: EISDIR, read
2016-03-23T19:53:03.087Z - error: Failed to load collection images Error: EISDIR, read
GC-MAC-002:scripts franklingauer$
2016-03-23T21:20:22.344Z - info: Initializing jsreport in development mode using configuration file dev.config.json
2016-03-23T21:20:22.348Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2016-03-23T21:20:22.353Z - info: Searching for available extensions in /home/jsreport/
2016-03-23T21:20:22.356Z - error: Error occured during reporter init Error: ENOENT: no such file or directory, stat '/home/jsreport/data/data'
at Error (native)
at Object.fs.statSync (fs.js:844:18)
at /home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:46:21
at Array.forEach (native)
at Object.exports.walkSync (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:44:10)
at /home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/extensionsManager.js:154:25
From previous event:
at /home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:78:8
From previous event:
at Reporter.init (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:57:30)
at Reporter.reporter.init (/home/jsreport/node_modules/jsreport/lib/extendInit.js:8:21)
at Object.<anonymous> (/home/jsreport/server.js:1:85)
GC-MAC-002:greenchef-reports franklingauer$
2016-03-23T21:12:23.198Z - info: Initializing jsreport in development mode using configuration file dev.config.json
2016-03-23T21:12:23.203Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2016-03-23T21:12:23.210Z - error: Error occured during reporter init Error: EEXIST: file already exists, mkdir '/home/jsreport/data'
at Error (native)
at Object.fs.mkdirSync (fs.js:794:18)
at sync (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/node_modules/mkdirp/index.js:70:13)
at Function.sync (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/node_modules/mkdirp/index.js:76:24)
at new module.exports (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/blobStorage/fileSystemBlobStorage.js:14:12)
at /home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:68:28
From previous event:
at /home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:78:8
From previous event:
at Reporter.init (/home/jsreport/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:57:30)
at Reporter.reporter.init (/home/jsreport/node_modules/jsreport/lib/extendInit.js:8:21)
at Object.<anonymous> (/home/jsreport/server.js:1:85)
G