-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start of docker image fails with error Cannot find module 'log4js' with DB_TYPE=sqlite #5735
Comments
Thanks for the issue. Did we change anything log4js related yesterday? I can't remember that we did something in that corner @JohnMcLear ? Could be related to the comment in the Dockerfile stating that npm is buggy and might remove log4js when installing sqlite. The npm logic could have changed again. |
@SamTV12345 no, we did not. the Log4JS exploit doesn't impact Etherpad, it is something we need to address in general though.. Afaik the TLDR is that log4js changed the format of their settings blob so anyone with an old settings blob for logs would be unable to use the latest versions.. |
Ok. Thanks for the info. The latest ueber version didn't fix the problem. Maybe installing an older SQLite version might work. |
I'm facing almost similar problem with redis. Looks like
|
Im working on it. Unfortunately I couldn't find a fix yet. Do you also install something at startup? Try to add log4js to the initial installation. |
For my case I've bypassed the issue of missing
But now I'm having problem with |
I tried to install log4js directly as we install sqlite. Unfortunately it still refused to start due to unresolved functions. |
Is the method named something like setGlobalLogLevel or appenders? |
the startup fails with the following log output
|
@cybertschunk I finally found the error. We forgot to cd into the source directory. Installing in the root directory caused npm to be confused and remove all the other dependencies causing the container to fail. log4js was installed as the latest version because there was no other requirements in the root directory. services:
etherpad:
image: etherpad/etherpad
container_name: etherpad
volumes:
- type: bind
source: TRUNCATED/etherpad/pads.db
target: /opt/etherpad-lite/var/pads.db
environment:
- TITLE=TRUNCATED
- DB_TYPE=sqlite
- API_KEY=${ETHERPAD_API_KEY}
- ADMIN_PASSWORD=${ETHERPAD_ADMIN_PASSWORD}
- ADMIN_USER=TRUNCATED
ports:
- 127.0.0.1:13080:9001
restart: unless-stopped
command: bash -c "cd src && npm install sqlite3 && node node/server.js" |
The redis bug is not really related but due to an redis & ueberdb version bump and the docs being straight up wrong for ueberdb & redis. The TLDR is you should use |
doing so still causes the server to fail. Now it can't locate the database file anymore |
I finally found the solution. Seems like the default type is erroring out because no directory is set. Given the following docker-compose services:
etherpad:
image: etherpad/etherpad:develop
container_name: etherpad
volumes:
- type: bind
source: ./data
target: /opt/etherpad-lite/var
- type: bind
source: ./settings.json
target: /opt/etherpad-lite/settings.json
environment:
- TITLE=TRUNCATED
- DB_TYPE=sqlite
- API_KEY=${ETHERPAD_API_KEY}
- ADMIN_PASSWORD=${ETHERPAD_ADMIN_PASSWORD}
- ADMIN_USER=TRUNCATED
ports:
- 127.0.0.1:13080:9001
restart: unless-stopped
command: bash -c "cd src && npm install sqlite3 && node node/server.js" Download the attached settings.log and put it in the root directory of your etherpad directory. Execute this in your bash mv settings.log settings.json
nano docker-compose.yml # Take the source from above You should have a data directory in your etherpad directory which contains the sqlite database once the server is up and you e.g. create a pad. To circumvent the constant download of sqlite you can create a new Dockerfile based on the etherpad image and run the commands in that shell and export that image again. That way you have a completely local file. |
Closing as the issue is resolved. If you need more help. Just reopen the issue or comment here. |
thanks for your help! The command we finally ended up using was |
Describe the bug
We upgraded to the latest etherpad release and now our etherpad installation refuses to start correctly. It fails with the following error:
To Reproduce
Steps to reproduce the behavior:
docker-compose up
Expected behavior
The docker container starts up normally.
Screenshots
Server (please complete the following information):
The text was updated successfully, but these errors were encountered: