YunoHost-Apps / mastodon_ynh

Free, open-source social network for YunoHost
https://joinmastodon.org/
GNU Affero General Public License v3.0
85 stars 36 forks source link

Mastodon installation fails / install script error #380

Closed blitzgneisserin closed 1 year ago

blitzgneisserin commented 1 year ago

Context

Steps to reproduce

Tried to install Mastodon both via webadmin & command line (ssh), but the installation fails while Mastodon is being built. I tried both mastodon in the app catalog + git and always get the same error.

Error: Unable to install mastodon: An error occurred inside the app installation script
Info: The operation 'Install the 'mastodon' app' could not be completed.

Log: https://paste.yunohost.org/raw/kerabomapo

Maybe this is helpful, too:


Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - pages for Ruby libraries. You may access it like this:
Info: DEBUG -   ri Classname
Info: DEBUG -   ri Classname.class_method
Info: DEBUG -   ri Classname#instance_method
Info: DEBUG - If you do not wish to install this documentation in the future, use the
Info: DEBUG - --no-document flag, or set it as the default in your ~/.gemrc file. See
Info: DEBUG - 'gem help env' for details.
Info: DEBUG -
Info: DEBUG - RubyGems system software updated
Info: DEBUG - + /opt/rbenv/versions/mastodon/bin/gem install bundler --no-document
Info: DEBUG - Successfully installed bundler-2.4.10
Info: DEBUG - 1 gem installed
Info: DEBUG - + ynh_exec_as mastodon PATH=/opt/rbenv/versions/mastodon/bin:/opt/node_n/n/versions/node/16/bin:/opt/node_n/bin:/opt/rbenv/shims:/opt/rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so bin/bundle config deployment true
Info: DEBUG - + local user=mastodon
Info: DEBUG - + shift 1
Info: DEBUG - ++ whoami
Info: DEBUG - + [[ mastodon = root ]]
Info: DEBUG - + sudo -u mastodon PATH=/opt/rbenv/versions/mastodon/bin:/opt/node_n/n/versions/node/16/bin:/opt/node_n/bin:/opt/rbenv/shims:/opt/rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so bin/bundle config deployment true
Info: WARNING - bin/bundle: Permission denied @ rb_check_realpath_internal - bin/bundle (Errno::EACCES)
Info: DEBUG - + ynh_exit_properly
Warning: Removing the app after installation failure...

Please help, I am writing an article about installing Fediverse instances for a well known IT magazine, this used to work reliably a few weeks/months ago. It seems that some time ago other people had the same or a similar issue which was fixed - but why is it not working here? I had a working Mastodon instance some months ago on the same VPS.

panomaki commented 1 year ago

This error seems to point to permission issues. Are you installing on a clean yunohost install? Or could it be possible there are still files left that may have wrong permissions? It's not something I have encountered before.

blitzgneisserin commented 1 year ago

@panomaki clean brand new server, just I set it up yesterday

blitzgneisserin commented 1 year ago

https://forum.yunohost.org/t/cant-install-mastodon/22846/12

panomaki commented 1 year ago

That discussion is about a different error caused by blurhash. That shouldn't prevent you from installing 4.0.2 as that's been patched to solve this error. (For newer versions see the various issues and pull requests).

I've just done a fresh install and don't get any errors for some reason. What kind of VPS are you installing on?

blitzgneisserin commented 1 year ago

@panomaki I don't have many infos about the hardware. It has 4 GB of RAM, 1 virtual core and 100 GB of SSD storage, seems to be a 64 bit processor, company is easyname.at However, apparently there is no info about the virtual machine software, whether it's wmware or something else. well I will also try another fresh install of the whole system. Btw, setting up Pleroma seems to work without any issues. Anyway, thanks for trying to help. Maybe also worth to mention: apparently the Debian 11 that this company provides for the VPS is tweaked somehow. When I am installing Yunohost, I have to remove several packages, e.g. Apache. I mean I think it's not a regular/official Debian 11 iso that Debian provides, I think it's somehow custom built for a web server or something like that.

panomaki commented 1 year ago

@blitzgneisserin That could indeed mean that e.g. ownership of /var/www is different. What is the output of sudo ls -lart /var/www ?

blitzgneisserin commented 1 year ago

@panomaki

total 16
drwxr-xr-x   2 root root 4096 Apr  5 16:25 html
drwxr-xr-x   3 root root 4096 Apr  5 16:34 .well-known
drwxr-xr-x+  4 root root 4096 Apr  5 16:34 .
drwxr-xr-x  13 root root 4096 Apr  5 16:34 ..
panomaki commented 1 year ago

@blitzgneisserin OK, that's not it - looks the same here.

blitzgneisserin commented 1 year ago

@panomaki thanks for trying to help, I reinstalled the whole system and it worked.