Threads.expose is called to late - "Did not receive an init message from worker after 10000ms" on clean 1.8.16 install
See original GitHub issueClean install of etherpad-lite 1.8.16 fails to run on alpine edge in an lxc container on armhf architecture. The same command chain on a x86_64 succeeds (sic!).
I’m quite lost where to look for a solution to this problem, especially that the SBC (banana pro) that etherpad fails to start on is slow.
What I see on the first request from any web browser is:
[2022-01-26 12:38:09.239] [INFO] server - Etherpad is running
[2022-01-26 12:38:35.968] [ERROR] console - Error: Timeout: Did not receive an init message from worker after 10000ms. Make sure the worker calls expose().
at Timeout._onTimeout (/var/etherpad-lite-1.8.16/src/node_modules/threads/dist/master/spawn.js:35:53)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)
The error repeats multiple times at once. The error appears almost immediately after entering container IP in a web browser, not after the 10 seconds that the message mentions.
Node.js versions tested: 16.13.2 and 17.4.0
To Reproduce
- lxc-create -t download -n ep
- Distribution: alpine
- Release: edge
- Architecture: armhf
- lxc-start ep && lxc-attach ep
- apk update
- apk add nodejs npm build-base python3 sqlite # extra packages are needed due to ep dependencies
- wget https://github.com/ether/etherpad-lite/archive/1.8.16.zip
- unzip 1.8.16.zip
- cd etherpad-lite-1.8.16
- cp settings.json.template settings.json
- vi settings.json # added an admin user and changed the port to 80
- ./bin/run.sh --root
Server
- Etherpad version: 1.8.16 (I hit the problem first with current development branch, then tried a clean install once all else failed)
- OS: alpine in lxc (run in debian testing, but I doubt this matters)
- Hardware: armhf, sun7i-a20-bananapro
- Node.js version: v16.13.2 (upgrading to 17.4.0 did not help either)
- npm version: 8.3.0
- Is the server free of plugins: yes
Additional For some reason installing dependencies compiles sqlite3 (for node-pre-gyp fails to find precompiled binaries), and so installing dependencies takes way too long.
I ended up hitting this issue on an upgrade from etherpad-lite1.8.0-beta.1 running on node v12.13.1 in another alpine container on the same machine that now fails to run current etherpad-lite & node. Simple upgrade failed with the same results, so I tried a clean install and it fails the same way…
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (8 by maintainers)
@rhansen No, I am not running on armhf. I am running on x86_64. However, the minify workaround in settings.json worked for me too! Thank you!
(you can skip to past the last <hr>)
Yes.
Hm… this is theoretically possible, for I tested right now that 1.8.0-beta.1 still works with updated node (v16.13.2).
The practical problem that refrains me from this is that new node (1.8.16) needs something that needs sqlite3. Now the problem is that node-pre-gyp finds no pre-build binaries for sqlite3 and compiles it itself, and so installing dependencies takes half an hour (that arm is old and sqlite3 alone compiles about 3 minutes on my desktop…).
This seems fine, I get similar error (line numbers slightly differ, though):
Wow! This worked! 👍
Also: this significantly speeds up loading time: tell me, does etherpad cache minifed js, or minifies it frequently?
(I’m fine with this workround, so the issue might be closed.)