YunoHost-Apps / peertube_ynh

Federated (ActivityPub) video streaming platform using P2P for YunoHost
https://joinpeertube.org/fr/
GNU Affero General Public License v3.0
87 stars 27 forks source link

Upgrading from 4.3.1 to 5.1.0 fails #376

Closed TILvids closed 6 months ago

TILvids commented 1 year ago

I'm updating our secondary server from 4.3.1 to 5.1.0. Previously, I tried updating to 5.0.1 and the update failed, so I had to revert; it appears to have failed in the same way again. Here are the last messages I see in the admin interface:

Upgrading systemd configuration... Starting a systemd service... (this may take some time)

Eventually, this fails and results in the error:

Error: "504" Gateway Timeout Action: "PUT" /yunohost/api/apps/peertube/upgrade

What do I need to do to get more clear error logs to post here so we can figure out what's up? Thanks!

TILvids commented 1 year ago

Here's the log it came back with:

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

fflorent commented 1 year ago

Looking at the error

2023-04-01 12:46:33,427: DEBUG - Apr 01 11:16:13 systemd[1]: Started PeerTube daemon.
2023-04-01 12:46:33,427: DEBUG - Apr 01 11:16:14 peertube[11420]: /var/www/peertube/node_modules/config/lib/config.js:179
2023-04-01 12:46:33,427: DEBUG - Apr 01 11:16:14 peertube[11420]:     throw new Error('\''Configuration property "'\'' + property + '\''" is not defined'\'');
2023-04-01 12:46:33,427: DEBUG - Apr 01 11:16:14 peertube[11420]:     ^
2023-04-01 12:46:33,427: DEBUG - Apr 01 11:16:14 peertube[11420]: Error: Configuration property "object_storage.upload_acl.public" is not defined
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at Config.get (/var/www/peertube/node_modules/config/lib/config.js:179:11)
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at Object.<anonymous> (/var/www/peertube/dist/server/initializers/config.js:117:28)
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at Module._compile (node:internal/modules/cjs/loader:1165:14)
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at Module.load (node:internal/modules/cjs/loader:1043:32)
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at Function.Module._load (node:internal/modules/cjs/loader:878:12)
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at Module.require (node:internal/modules/cjs/loader:1067:19)
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at require (node:internal/modules/cjs/helpers:103:18)
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at Object.<anonymous> (/var/www/peertube/dist/server/helpers/logger.js:12:18)
2023-04-01 12:46:33,428: DEBUG - Apr 01 11:16:14 peertube[11420]:     at Module._compile (node:internal/modules/cjs/loader:1165:14)

Did you create a custom configuration file (local.yaml or so) in /var/www/peertube/config/?

fflorent commented 1 year ago

you're probably facing an issue related to the breaking changes of version 5:

https://github.com/Chocobozzz/PeerTube/blob/develop/CHANGELOG.md#important-notes-2

https://github.com/Chocobozzz/PeerTube/blob/v5.0.0/config/production.yaml.example#L153

TILvids commented 1 year ago

Yeah, I had to create a custom config (I forget what I named it, production.yaml or something) in order to set up the rules for redundancy.

Are these the breaking changes that I'll need to manually address before updating?

Configuration changes (config/production.yaml):

You must update your nginx configuration:

fflorent commented 1 year ago

Yeah, the changes related to the configuration changes must have produced the error.

Do you have any file named /var/www/peertube/config/local.yaml (or local.yml, local.json, ...)? Can you share its content here? (ensure to beforehand redact the values of the passwords, salts, ...)

TILvids commented 1 year ago

It definitely seems like there is a problem getting YNH to update past 5.x for some users. I still haven't been able to update our instance because of it.

yalh76 commented 11 months ago

Here's the log it came back with:

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

Your error is :

2023-04-01 12:46:33,421: DEBUG - Apr 01 11:16:11 peertube[11383]: Error: Configuration property "object_storage.upload_acl.public" is not defined

So it's like if there is some configuration missing in your production.yaml file

here are the lines:

https://github.com/YunoHost-Apps/peertube_ynh/blob/fbf90aa8845edfb8bc1f75e335ea706203fe77e7/conf/production.yaml#L154-L159

alexAubin commented 6 months ago

(any update on this or should we close the issue ?)

ericgaspar commented 6 months ago

Closing with #414