Still can't install Mobilizon

My YunoHost server

Hardware: Hetzner Cloud
YunoHost version: 4.3.5 (stable)
I have access to my server : through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

https://paste.yunohost.org/raw/hukowuxena

I still have the same issue described in this closed topic:

Should I create a bug report?

Can you share the output of ls -l /tmp/setup_db.psql ?

-rw-r–r-- 1 pleroma pleroma 314 Dec 19 08:01 /tmp/setup_db.psql

Hmyeah sounds like mobilizon’s package is using a similar piece of code than pleroma and they both use a temporary file with the same name that doesn’t get cleanedup …

You can just safely rm /tmp/setup_db.sql and try again

1 Like

Thanks.

Now this happens:

https://paste.yunohost.org/raw/ebezaliqip

Anybody have some further ideas?

Hmyeah idk, something related to some postgresql extension named postgis but i don’t understand why it would crash on your install but not on the ci é_è

1 Like

What about the last couple of lines in the log,

2021-12-31 17:56:22,009: DEBUG - To get started:
2021-12-31 17:56:22,009: DEBUG - 1. Check the contents of the generated files.
2021-12-31 17:56:22,009: DEBUG - 2. Run `sudo -u postgres psql -f '/tmp/setup_db.psql' && rm '/tmp/setup_db.psql'`.
2021-12-31 17:56:22,009: DEBUG - 
2021-12-31 17:56:27,788: DEBUG -     #########################################################
2021-12-31 17:56:27,788: DEBUG -     # If the CREATE EXTENSION or DROP EXTENSION calls fail, #
2021-12-31 17:56:27,788: DEBUG -     # please manually execute them with an authorized       #
2021-12-31 17:56:27,788: DEBUG -     # PostgreSQL user with SUPER USER role.                 #
2021-12-31 17:56:27,788: DEBUG -     #########################################################
2021-12-31 17:56:27,788: DEBUG - 
2021-12-31 17:56:27,789: DEBUG - 
2021-12-31 17:56:27,790: DEBUG - 17:56:27.790 [info]  execute "CREATE EXTENSION IF NOT EXISTS postgis"
2021-12-31 17:56:27,807: WARNING - ** (Postgrex.Error) ERROR 42501 (insufficient_privilege) permission denied to create extension "postgis"
2021-12-31 17:56:27,807: DEBUG - 
2021-12-31 17:56:27,807: WARNING -     hint: Must be superuser to create this extension.

In short, try running:

$ sudo -u postgres psql -f '/tmp/setup_db.psql' && rm '/tmp/setup_db.psql'

It doesn’t explain or give an answer to Aleks’ question of course: if it doesn’t work for you, it also should not work when creating and testing the app package.

1 Like

As admin I get

Sorry, user admin is not allowed to execute '/usr/bin/psql -f /tmp/setup_db.psql' as postgres on wien.rocks.

After entering sudo su I get:

could not change directory to "/home/admin": Permission denied
/tmp/setup_db.psql: No such file or directory

There is a slight difference between sudo su and sudo su -, try it like this:

$ sudo su - 
# pwd
# ls -ahls /tmp/setup_db.psql
# sudo -u postgres psql -f '/tmp/setup_db.psql' && rm '/tmp/setup_db.psql'

So, first change from admin to root by using sudo su -. The minus will load all of roots environment and startup variables and changes to roots home dir (as you see with pwd).
Then check if the setup_db still exists; if there is no result after the ls command, the setup-db has already been removed and you have to start at the beginning (installing the app from the catalog), so that the DB is recreated.
If the DB is available, sudo -u postgres to execute the setup as user postgres.

At this point I get “no such file or directory”.

If you try installing Mobilizon from scratch, and then you run ls, does it exist after the installation fails?
Maybe the installation script tidies the mess after failing a step, and the setup_db.psql is deleted on exit.

In that case I have no more suggestions :frowning: