[SOLVED] Installing Etherpad MyPads fails

What app is this about, and its version: Etherpad MyPads
What YunoHost version are you running: Latest
What type of hardware are you using: VPS bought online

Describe your issue

Installing Etherpad MyPads (with no AbiWord/LibreOffice) fails because of checksum error.

Previous report a month ago at Checksum error installing Etherpad.

Installation of testing branch fails because of race condition.

Installation of local clone of testing with the race condition fix completes, but throws 502 bad gateway when navigating to url.

Share relevant logs or error messages

main: https://paste.yunohost.org/raw/hogeragexe
testing: https://paste.yunohost.org/raw/arinanelah

The package hasn’t been updated in a while, but I don’t know why…

Managed to install:

git clone https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
cd etherpad_mypads_ynh
git checkout testing
cd ..
vi etherpad_mypads_ynh/scripts/install
ynh_systemctl --service="$app" --action=restart
if [ $mypads -eq 1 ]
then
+    sleep 100 # because race condition otherwise
    ynh_replace --match="__LANGUAGE__" --replace="$language" --file="../conf/lang_mypads.sql"
    ynh_mysql_db_shell < "../conf/lang_mypads.sql"
    ynh_systemctl --service="$app" --action=restart
fi
sudo yunohost app install ./etherpad_mypads_ynh

The installation completed, the service is running, no errors in the logs, but getting a 502 bad gateway.

Reinstalled without ldap: same.

Can you share the service log ?

sudo journalctl -u etherpad_mypads -n 50 --no-pager

It seems to just hang after loading the plugins.

Thanks for looking into it, but I think I’ll use cryptpad or hedgedoc instead, don’t have much time right now for troubleshooting.

You can try to install from testing for the newest version

Yes, that’s what I did, forgot to add git checkout testing in the commands above.

There is also the etherpad app but I don’t know if it fits your needs

Unfortunately I needed some of the plugins, hence going with etherpad_mypads.

This is not the way to install from testing

That’s because the testing branch install fails too.

Hence the git clone and race condition fix, which I had added as a comment a few lines below, but now I updated the post with that info too.

Could you share the logs from the failed installation test?
I have no issues with the testing branch installation.
The GitHub - YunoHost-Apps/etherpad_ynh: Etherpad-Lite package for YunoHost · GitHub branch installs Etherpad without plugins (you can install plugins via the app admin panel).
Unfortunately, I am unable to connect to the admin panel. I’m not sure what the issue is.

The link for the failed testing install is in the post, the reason for a race condition, attempting to contact the db while it was still being initialised.

But the fix for that was straightforward. The install completed, but still didn’t result in an accessible app.

I understood that installing dbs/plugins on Etherpad is enough of a pain to have a whole different plugins app, no? In any case, since there is a bug on Etherpad for accessing the admin panel anyway, it doesn’t seem like an alternative for now.

Solved. The issue was:

  1. installing the ep_mypads plugin during installation would lead to the 502 bad gateway, so not installing the plugin (but answering yes to LDAP) would at least allow the admin url to load
  2. the Etherpad admin UI logs in via POST /admin-auth/ with an Authorization: Basic header. The permission protect_against_basic_auth_spoofing wasn’t set in the install script and defaulted to true, so the portal would strip that header before it reached Etherpad and bounce the request to /yunohost/sso.

Full installation process:

git clone https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
cd etherpad_mypads_ynh
git checkout testing
cd ..
vi etherpad_mypads_ynh/scripts/install
ynh_systemctl --service="$app" --action=restart
if [ $mypads -eq 1 ]
then
+    sleep 30 # because race condition otherwise
    ynh_replace --match="__LANGUAGE__" --replace="$language" --file="../conf/lang_mypads.sql"
    ynh_mysql_db_shell < "../conf/lang_mypads.sql"
    ynh_systemctl --service="$app" --action=restart
fi
sudo yunohost app install ./etherpad_mypads_ynh
# make sure to answer no to "install mypads plugin"

sudo yunohost app setting etherpad_mypads protect_against_basic_auth_spoofing --value false
sudo yunohost app ssowatconf
sudo systemctl reload nginx

# once in the admin, you can reinstall ep_mypads

The last steps might also be relevant to your bug @ericg.

The ep_mypads config (at https://yourdomain.tld/mypads/?/admin) is still inaccessible however, but all the other plugins are functional.

I spent probably 10 hours on this by now and can’t be bothered to spend a second more: people are welcome to make a PR to GitHub - YunoHost-Apps/etherpad_mypads_ynh at testing · GitHub to solve the underlying issues based on my patches.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.