Unable to install Flarum App (OpenVZ)

Hi friends,

I’ve been using Yunohost without issue for almost three years for single user apps (miniflux, notes etc), but this month I decided to try using BBS software.

I’ve been trying to install flarum, but I keep hitting a wall.

My YunoHost server

Hardware: I’m on a vps I bought online from ethernetservers.com
YunoHost version: 11.2.27 (stable)
I have access to my server : Through SSH, Terminal, Webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:
If your request is related to an app, specify its name and version: Flarum
Current version: 1.8.5~ynh1

Description of my issue

The installation starts normally, and I can confirm that there is plenty of space available on my vps. I also increased the available ram / memory to be more than 1gb, so I would not need to make a swap file (because I think my VPS does not allow for that and uses VSwap instead). But it still seems to error out.

I’ve pasted the log here hastebin

Would appreciate any help you’re able to offer! I tried the other software, but Nodebbs and Discourse don’t seem to be as light as I’d like. It’s either this or phpbb, but this one seems more modern and in active development.

Thank you!!

2024-08-21 15:07:55,010: DEBUG - + swapon /swap_flarum
2024-08-21 15:07:55,013: WARNING - swapon: /swap_flarum: swapon failed: Operation not permitted

This is probably related to your virtualization/containerization technology, or the filesystem

We can try to investigate with lsblk -f and systemd-detect-virt

ok, here’s the results from
lsblk -f

NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT ploop26768 └─ploop26768p1 76.4G 18%

and systemd-detect-virt

openvz

Eeeeeh wokay, well “openvz” is definitely something “unusual” i guess … I don’t know much about it but it always felt like it’s something closer to something like an LXC rather than an actual “virtual machine” … so not surprised that swap cannot be mounted

The lsblk -f is puzzling because we’re supposed to see the filesystem type in there but it’s not really listed ? …

Anyway … naively you could try to “workaround” the whole swap thing (assuming you do have a significant amount of RAM otherwise the build we likely fail because lack of RAM) using this kind of ugly hack:

cp /usr/sbin/swapon /usr/sbin/swapon.bkp
cp /usr/bin/true /usr/sbin/swapon

OK that did not work. But it did give me an idea!
I went into /usr/bin/ and created a swapon folder (chmod 777) super insecure, I know.

But then I looked at the script and manually created the swap_flarum, allocated the swap memory, effectively :

touch swap_flarum

chown 06000 swap_flarum

fallocate -l 1048576K /swap_flarum

mkswap /swap_flarum

and then tried the install script again. This time it looks like it went through successfully.

I will keep an eye on the software, but I think this worked.

Thank you for your help!!

Since it’s works with your ugly swapon folder (chmod 777) super insecure, did you reduced rights on this folder?

I’m curious about this.

May be you only need a folder where the Flarum script can write.

I also suggest to add OpenVZ env in the title.

Like after the fact? I haven’t changed the rights on that folder.

Will edit the threat to have openvz in the title. Thanks

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