Tuesday, September 12, 2023
support@conference.yunohost.org
September
Mon Tue Wed Thu Fri Sat Sun
        1
2
3
4
5
6
7
8
9
10
11
12
13 14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
             

[08:57:39] <Guillaume Bouzige> Hello, I am having issue with Umami app upgrade since the v1-v2 https://paste.yunohost.org/raw/xezumijumi
[08:57:51] <Guillaume Bouzige> in the forum I saw it is advised to do a clean install
[08:58:08] <Guillaume Bouzige> how can I keep my configuration and stats data while doing a clean install ?
[09:57:20] <orhtej2> > in the forum I saw it is advised to do a clean install

any rationale behind why you should do clean install?
[09:57:21] <Guillaume Bouzige> https://forum.yunohost.org/t/umami-website-analytics/20133/8
[09:57:21] <orhtej2> > dixit "PS. Umami had a number of breaking changes from v1 to v2, it is advised to do a clean install."

https://umami.is/docs/migrate-v1-v2
[09:57:22] <Guillaume Bouzige> v1
[09:57:22] <Guillaume Bouzige> dixit "PS. Umami had a number of breaking changes from v1 to v2, it is advised to do a clean install."
[09:57:23] <Guillaume Bouzige> hum no the upgrade systematically crash
[09:57:23] <Guillaume Bouzige> already did those the script detect db in v2 not in v
[09:57:23] <orhtej2> > hum no the upgrade systematically crash

as they say on this channel
[09:57:23] <orhtej2> logs or it did not happen :P
[09:57:23] <orhtej2> and I hope you backed stuff up before embarking on this journey
[09:57:23] <orhtej2> how confident are you with console?
[09:57:23] <orhtej2> so if your db is in v2 just install the latest version I guess and you're good?
[09:57:23] <orhtej2> you can **theoretically** back umami up in case things go haywire, unpack v2, run db migration, force install latest ynh version
[09:57:25] <Guillaume Bouzige> indeed logs are in my initial message her
[09:57:26] <orhtej2> > indeed logs are in my initial message her

ahhh reading, my arch nemesis
[09:57:26] <orhtej2> > here

it's failing to install nodejs for some reason
[09:57:26] <orhtej2> not really caused by neither YNH nor umami
[09:57:26] <Guillaume Bouzige> > Hello, I am having issue with Umami app upgrade since the v1-v2 https://paste.yunohost.org/raw/xezumijumi

here
[09:57:26] <Guillaume Bouzige> if I un-install umami, and re-install the latest version, then import the backup, would it still be on the latest version or on the backed up old version ?
[09:57:26] <Guillaume Bouzige> here
[09:57:27] <Guillaume Bouzige> in other words, how can I backup an app data independently from the app install
[09:57:28] <orhtej2> > in other words, how can I backup an app data independently from the app install

you can just back the app up, the data is likely some database dump which you can then re-import
[09:57:28] <orhtej2> again, the issue you're having is not... real? it's not related to umami version
[09:57:28] <orhtej2> > https://github.com/YunoHost-Apps/umami_ynh/issues/12

this is not what's happening to you
[09:57:28] <orhtej2> it fails before it even starts for good
[09:57:28] <Guillaume Bouzige> https://github.com/YunoHost-Apps/umami_ynh/issues/12
[09:57:29] <orhtej2> I believe the db migrations are run in interactive mode hence cannot be done as a part of upgrade script, see that they are commented out: https://github.com/YunoHost-Apps/umami_ynh/blob/6b6b2db37da37d89f0507ad069c44d4cf6457073/scripts/upgrade#L95
[09:57:29] <Guillaume Bouzige> https://github.com/YunoHost-Apps/umami_ynh/issues/12#issuecomment-1527699991
[09:58:09] <orhtej2> > this is not what's happening to you

```
2023-09-12 10:35:59,821: DEBUG - + n 18
2023-09-12 10:35:59,917: DEBUG - installing : node-v18.17.1
2023-09-12 10:36:13,500: DEBUG - mkdir : /opt/node_n/n/versions/node/18.17.1
2023-09-12 10:36:13,503: DEBUG - fetch : https://nodejs.org/dist/v18.17.1/node-v18.17.1-linux-x64.tar.xz
2023-09-12 10:39:46,977: DEBUG - curl: (18) transfer closed with 16060356 bytes remaining to read
2023-09-12 10:39:46,985: DEBUG - xz: (stdin): Unexpected end of input
2023-09-12 10:39:46,987: DEBUG - tar: Unexpected EOF in archive
2023-09-12 10:39:46,987: DEBUG - tar: Unexpected EOF in archive
2023-09-12 10:39:46,988: DEBUG - tar: Error is not recoverable: exiting now
2023-09-12 10:39:46,988: DEBUG -
2023-09-12 10:39:46,988: DEBUG - Error: failed to download archive for 18.17.1
```
[10:03:09] <orhtej2> > if I un-install umami, and re-install the latest version, then import the backup, would it still be on the latest version or on the backed up old version ?

you cannot restore backup when the app is already installed and restoring the backup (hopefully) restores exactly the backed up version
[10:03:28] <Guillaume Bouzige> > you cannot restore backup when the app is already installed and restoring the backup (hopefully) restores exactly the backed up version

yes that is what i expected
[10:03:41] <Guillaume Bouzige> so I am doomed to loose my umami conf and historical data
[10:03:47] <Guillaume Bouzige> great
[10:03:50] <orhtej2> no
[10:04:00] <orhtej2> just install new version, run migration manually
[10:04:04] <Guillaume Bouzige> how ?
[10:04:05] <orhtej2> and (fingers crossed) you're set
[10:09:00] <orhtej2> > how ?

enter shell, type `node --version`. If the output is `18.x.y` you're good

then

```sh
$ sudo -i
$ systemctl stop umami
$ cd /var/www/umami
$ sudo -u umami npx @umami/migrate-v1-v2@latest
$ systemctl restart umami
```
[10:09:27] <orhtej2> (so basically stop umami service, run migrations with `npx`, start service)
[10:09:43] <orhtej2> and I **reallly** hope you created a backup before tampering with the db
[10:11:06] <Guillaume Bouzige> i have some backup yes
[10:11:15] <Guillaume Bouzige> can i do those as root ?
[10:11:26] <Guillaume Bouzige> I see ok
[10:11:34] <Guillaume Bouzige> (i have read the commands now)
[10:11:35] <orhtej2> > can i do those as root ?

`sudo -i` makes interactive session as `root` ;)
[10:11:42] <Guillaume Bouzige> yep
[10:12:01] <orhtej2> remember to run migrations as `umami`
[10:12:35] <orhtej2> and you need to run these after updating to 2.x first but I assume you already know that
[10:13:37] <Guillaume Bouzige> I am in 1.33~ynh2
[10:13:49] <Guillaume Bouzige> so what updating to 2.x you refer to ?
[10:13:57] <Guillaume Bouzige> since the upgrade is stuck
[10:14:11] <orhtej2> > since the upgrade is stuck

the log you sent - just try again
[10:14:29] <orhtej2> if it fails with different issue - then we'll worry
[10:14:30] <Guillaume Bouzige> after running the migration script right ?
[10:14:40] <orhtej2> > after running the migration script right ?

no, upgrade to 2.x first
[10:14:53] <orhtej2> otherwise you'll have no migration scripts present in the first place ;)
[10:14:58] <Guillaume Bouzige> the upgrade is failing
[10:15:02] <Guillaume Bouzige> refer the logs
[10:15:10] <orhtej2> > the upgrade is failing

the log you sent indicates unrelated issue
[10:15:18] <orhtej2> which may go away if you just retry
[10:15:25] <Guillaume Bouzige> that is the issue that the upgrade encounter
[10:15:37] <Guillaume Bouzige> I have re-trying since april
[10:15:42] <Guillaume Bouzige> it doesnt
[10:15:49] <orhtej2> always with the same issue?
[10:16:21] <orhtej2> are you out of disk space or something? `df -h`
[10:16:45] <Guillaume Bouzige> nope no issue with disk spac
[10:16:47] <Guillaume Bouzige> e
[10:17:22] <Guillaume Bouzige> the migration script says db connection succesfull db v1 not detected
[10:17:30] <Guillaume Bouzige> seriously
[10:17:49] <Guillaume Bouzige> the upgrade is stuck and the only solution that seems to be around is to delete and re-install....
[10:18:20] <orhtej2> let me say again: the error log you pasted is in no way related to umami nor ynh
[10:18:38] <orhtej2> if this is the problem you're having peristently we can work on that
[10:18:50] <Guillaume Bouzige> the error is related to umami since it is generated by umami app upgrade
[10:19:04] <Guillaume Bouzige> and that is the issue
[10:20:17] <orhtej2> > the error is related to umami since it is generated by umami app upgrade

just for fun, can you try updating the app now and if it fails - paste the log?
[10:20:24] <Guillaume Bouzige> it get stuck when trying to update nodejs version
[10:20:55] <Guillaume Bouzige> my node version is 16.20
[10:26:17] <Guillaume Bouzige> very fun it failed same
[10:26:27] <Guillaume Bouzige> ah ah ah
[10:26:54] <Guillaume Bouzige> https://paste.yunohost.org/raw/kedehiyewe
[10:27:32] <Guillaume Bouzige> now it fails on the upgrade script...
[10:28:56] <Guillaume Bouzige> saying umami v1 detected...
[10:28:59] <Guillaume Bouzige> let see if I run the migrate script now if it says v2 or v1
[10:29:26] <Guillaume Bouzige> script says ''':/var/www/umami# sudo -u umami npx @umami/migrate-v1-v2@latest
Running v0.15.0
✓ DATABASE_URL is defined.
✓ Database connection successful.
✗ Database v1 tables have not been detected.
'''
[10:40:16] <orhtej2> > https://paste.yunohost.org/raw/kedehiyewe

Ok I'll think about manual upgrade mid-step here
[10:40:49] <orhtej2> It got to actual umami code this time around but likely migrations need to be run prior to build
[10:41:22] <Guillaume Bouzige> which seems to me very related to this error https://github.com/YunoHost-Apps/umami_ynh/issues/12
[10:48:05] <ChriChri> I'm able to manually get and renew my Let's encrypt certificates, but yuno would not renew automatically. I guess, because it says that the dns has a problem. But it hasn't - it is just different than expected, but obviously working. Is there an easy way to disable or modify some check that is done? Is my assumption that the failing check is stopping yuno from renewing the certificates _automatically_ correct?
[10:54:00] <ChriChri> > <@chrichri:librem.one> I'm able to manually get and renew my Let's encrypt certificates, but yuno would not renew automatically. I guess, because it says that the dns has a problem. But it hasn't - it is just different than expected, but obviously working. Is there an easy way to disable or modify some check that is done? Is my assumption that the failing check is stopping yuno from renewing the certificates _automatically_ correct?

BTW: It is possible to install a Let's encrypt certificate for a domain with my dns configuration without ignoring the tests. Only renewing isn't possible.
[11:05:44] <Aleks (he/him/il/lui)> hmmokay then I would check what the equivalent command from the cron job returns : `yunohost domain cert renew --email`
[11:05:55] <Aleks (he/him/il/lui)> (assuming there is indeed one cert that needs to be renewed)
[11:09:58] <ChriChri> > <@Alekswag:matrix.org> hmmokay then I would check what the equivalent command from the cron job returns : `yunohost domain cert renew --email`

at the moment: no - I've got to wait for the next two month (good to write this - just put a reminder in my calendar)
[11:16:18] <Guillaume Bouzige> so I am stuck with umami and no possibilities apart from loosing all historical data and conf
[11:16:28] <Guillaume Bouzige> pity
[13:10:12] <lejocelyn> https://github.com/YunoHost-Apps/overleaf_ynh/tree/master
[13:10:12] <lejocelyn> bonjour, dites, quand utilisateur d'Overleaf, je serais très content si l'app yunohost avait les mêmes fonctionnalités que celles affichées ici :
[13:10:37] <lejocelyn> j'ai essayé de contacter la personne qui avait packagé Overleaf
[13:10:45] <lejocelyn> mais je n'ai pas trouvé de courriel
[13:11:40] <lejocelyn> son pseudo sur Github est yalh76

[13:13:33] <lejocelyn> voilà ce que j'avais écrit il y a quelques temps : https://forum.yunohost.org/t/overleafs-features-currently-missing-or-not-functionning-in-yunohosts-package/21873
[13:54:52] <Tag> Pour le premier point, il suffirait de donner rajouter la permissions overleaf au groupe visitors depuis l'interface d'administration de YunoHost
[14:00:51] <lejocelyn> :)
[14:00:51] <lejocelyn> Tag: merci
[14:06:18] <lejocelyn> Tag: non, il semble que ça ne suffise pas. Ce qui est étrange, c'est que j'ai essayé d'avoir des comptes email que je possède par ailleurs
[14:06:39] <lejocelyn> mais je ne reçois pas de courriels de la part de Yunohost, peut être que le souci provient de là
[14:10:26] <lejocelyn> bon, je vérifie les DNS pour le serveur overleaf
[14:13:34] <lejocelyn> ça semble être bon au niveau des DNS
[14:13:40] <lejocelyn> mais...
[14:14:11] <ChriChri> If I look for information on how to access the postgresql server as 'admin' or 'root' - where would I have to look? I'm trying to look into a problem I have re-installing dendride...
[14:15:31] <Aleks (he/him/il/lui)> `su postgres` (from root) then something like `psql <your_database_name>`
[14:17:47] <ChriChri> ```
# su postgres
postgres@link-goe:/var/log/postgresql$ psql -l
Liste der Datenbanken
Name | Eigentümer | Kodierung | Sortierfolge | Zeichentyp | Zugriffsprivilegien
-----------+------------+-----------+--------------+-------------+-----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
```
[14:17:57] <ChriChri> There's not more?
[14:19:47] <Aleks (he/him/il/lui)> ¯\_(ツ)_/¯
[14:21:36] <ChriChri> Hm, installing dendrite anotherone shows:
```
Name | Eigentümer | Kodierung | Sortierfolge | Zeichentyp | Zugriffsprivilegien
-----------+------------+-----------+--------------+-------------+--------------------------
dendrite | dendrite | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/dendrite +
| | | | | dendrite=C*T*c*/dendrite
```
[15:46:16] <orhtej2> > script says ''':/var/www/umami# sudo -u umami npx @umami/migrate-v1-v2@latest
> Running v0.15.0
> ✓ DATABASE_URL is defined.
> ✓ Database connection successful.
> ✗ Database v1 tables have not been detected.
> '''

This is super confusing, it worked on my end:

```sh
:/var/www/umami__2# sudo -u umami__2 npx @umami/migrate-v1-v2@latest
Need to install the following packages:
@umami/migrate-v1-v2@0.15.0
Ok to proceed? (y) y
Running v0.15.0
✓ DATABASE_URL is defined.
✓ Database connection successful.
Preparing v1 tables for migration
✓ Dropped v1 database keys.
✓ Dropped v1 database indexes.
✓ Renamed v1 database tables.
✓ Database v1 tables ready for migration.
Database v2 tables not found.
Adding v2 tables...
✓ Ran sql file /db/postgresql/migrations/01_init/migration.sql.
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "umami__2", schema "public" at "localhost:5432"
Migration 01_init marked as applied.

✓ Database is ready for migration.
✓ Starting v2 data migration. Please do no cancel this process, it may take a while.
✓ Ran sql file /db/postgresql/data-migration-v2.sql.
✓ Data migration from V1 to V2 tables completed.
✔ Do you want to delete V1 database tables? (Y/N) … y
✓ Dropped v1 database tables.
✓ Migration successfully completed.
```
[19:32:19] <Claus> Wanted to try out Element X with my Yuno hosted Synapse instance an got redirected to a page telling me about compatibility issues: https://github.com/matrix-org/sliding-sync/blob/main/docs/Landing.md Has anybody tried to configure Synapse that way? Or are there any plans to preconfigure synapse accordingly in the future?
[22:00:35] <tituspijean> That seems definitely interesting, and will be interestinger (I'll... rewrite grammar rules if I need to) whenever it is considered stable. :)