-
-
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
systemd service file for v2.0 (was: unexpected string in JSON after upgrade to v2) #6306
Comments
After finding a json linter that's able to handle comments, I noticed that my skinVariants constructs isn't correct, I've probably misunderstood that the option was there to define multiple themes. Also I forgot to close the second bracket from the users entry. The issue now is a working systemd service file node_modules/ep_etherpad-lite/node/server.js doesn't seem to exist anymore. But there are now several server.js files:
Which one would I need for the systemd file? The line I use to start the systemd service is |
You can give it a try with |
Good to know. But how do I get the scripts to install all relevant dependencies? Because now when I run the run.sh, it gives me these errors:
Even removing the lock file doesn't fix this. Also the script keeps complaining about
|
You can do |
The files still don't exits |
Im wondering why. You did clone the GitHub repository? |
Yes. And I just had git sync up again (git pull origin develop, as for some reason the v2.0.1 tag isn't part of master), yet no fix. |
Can you remove all node_modules folder in every directory and then do pnpm I again? Maybe something got out of sync. |
I had find delete all node_modules directories, had git pull from origin, checked out tags/v2.0.1, ran |
So you still get errors? Can you list every command on your Linux VM? Maybe I can replicate that. |
Well I started from v1.9.2. Then
All until now as the etherpad user. Because v2 switched to pnpm which works fundamentally different (and maybe because I didn't really initialize pnpm) it couldn't access somwhere in /usr/libs for the pnpm modules directory. So I ran
So I installed tsx with pnpm (as root and form the root users home directory), but that issue actually continues showing up in the journal. But executing |
Adapt your systemd service to this. That should hopefully work. [Unit]
Description=Etherpad-lite, the collaborative editor.
After=syslog.target network.target
[Service]
Type=simple
User=etherpad
Group=etherpad
WorkingDirectory=/opt/etherpad
Environment=NODE_ENV=production
ExecStart=pnpm run prod
# use mysql plus a complete settings.json to avoid Service hold-off time over, scheduling restart.
Restart=always
[Install]
WantedBy=multi-user.target |
It still gives me the same complaints |
Can you go to the folder and do manually pnpm run prod? |
|
If you did |
I know that it should. Just to be sure, just ran it again:
|
Im wondering why there should be only 4. develop has already 6 workspaces. |
No idea |
Other than that go to the package.json and remove the bin section. We don't really use it anymore so it should be safe to delete that. |
Result is still the same |
What exactly would it take to redo the installation from scratch? I can just save the settings.json and APIKEY.txt, purge the rest and pull everything fresh from github. The pads themselves are stored in the database. |
Etherpad is since v2 a 1 line installation. You can just do pnpm I and everything installs itself. If you pull from develop you can even get rid of the apikey. |
I do need the APIkey as there is no other method left afaik for communication between etherpad and other software for reading from and writing to pads. How is it with updates? How well can pnpm handle those? With git it was always quite easy. Also it's very easy with git to roll back to an older version if you find some issue (just like I did) and just don't have the time to bother with it at the moment. |
It handles it better than npm. You can just pull from GitHub with git and then do pnpm install. |
Just done that, it tells me that it doesn't know the file extension .ts (after running pnpm run prod in the directory):
even after adding tsx to the workspace root ( EDIT: removing type: module from packages.json as recommended in a few different places doesn't help. |
My guess is this may be somehow related to TypeStrong/ts-node#1062 and similar issues as this seems to be quite a common error. Meanwhile I went back to v1.9.7 until v2 has found a solution that's more reliable than 50 % of the time. |
Wait you are again at NodeJS 20.5.1. Try it only with NodeJS 21 and it should work :) |
As you recommended NodeJS 20 and as that's the latest LTS release, I was using that. But yes, after upgrading to 21 it finally works now. Would be great though if the minimal Node version would be clarified as the readme still lists "Node.js >= 18.18.2" as requirement. Also it would be great if the LTS versions would be the minimal required version, not the latest latest. Servers usually use distros like Debian, Ubuntu LTS and what not for a reason. Now after having it running, I'm noticing a different issue: the admin user defined in the settings.json - that still worked back on v1.9.7 that I installed in the meantime - isn't able to log in anymore. The Etherpad just says "login failed" when navigating to /admin/settings and entering the account data into the new mask.
The eplite.error.log is empty. |
@webzwo0i found a way to run Etherpad with NodeJS<21 but code changes are required so this will be fixed in a future version. |
This is finally merged. You can continue running the startup commands as before but it is now NodeJS18 compatible |
Describe the bug
When running etherpad for the first time after update with
sudo -u etherpad bin/run.sh
, it complains about an unknown string in the settings, yet I can't see any difference to the template in the mentioned place.We are coming from v1.9.2 (as far as I can tell). I had git to pull the latest versions and checked out to tags/v2.0.1, as we always did with previous updates. For the first run I had to run bin/run.sh it as root as otherwise it couldn't access /usr/local/lib/node_modules otherwise (and I don't think having the etherpad user own that directory is the best solution). Of course afterwards I re-owned all files in the etherpad directory by the etherpad user. It threw some fatal error - maybe because of tidyHtml setting still present, who knows - so I went through the whole settings.json, compared to the settings.json.template and made the appropriate changes. Yet running the etherpad from shell still results in
Or as the whole output:
Here is the current settings.json we use, obviously with passwords redacted:
settings.json
Now I don't know how json interpreters read positions. But the only two positions that should be possible for position 129 should be either
or
"favicon": null,
But in both cases there's no difference, even diff can't find one there. So what exactly is the issue?
Server (please complete the following information):
node --version
): v18.19.0npm --version
): 9.2.0pnpm --version
): 8.15.6The text was updated successfully, but these errors were encountered: