Closed TILvids closed 1 year ago
It's because you have to keep it intact. A way to change the configuration properly is to create a config/local.yaml
(https://github.com/node-config/node-config/wiki/Configuration-Files#file-load-order).
I propose a PR in order to specify it in the README file.
Appreciate it! That makes sense, but I definitely am not sure how I'd know that (other than just general awareness?) so I think adding a note in the README is a good idea. Thanks!
You're right. The PR is open BTW :)
Oh shoot, did you want me to leave this issue open until that PR is merged?
As you like, keeping it closed is fine as long as the issue is kept track somehow.
👍
One more question: I added a local.yaml file to the config folder (copied from production.yaml), and it led to a "Bad Gateway" on the server. As soon as I deleted it, the server worked again. Any tips for what might be doing that, or where I can make myself more knowledgeable about what's happening and how to get local.yaml talking properly to production.yaml?
Thanks!
Check the logs as you restart the server: journalctl -f -u peertube
, wait for the server to be restarted and paste here the relevant error if any.
Also ensure the owner / group and rights are the same (option -p
of the cp
command).
@fflorent I don't know if this is going to get you anything useful, but...
-- Journal begins at Tue 2022-08-09 22:03:14 CDT. -- Nov 03 17:36:55 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:36:55.608 info: 38.242.251.94 - - [03/Nov/2022:22:36:55 +0000] "POST /inbox HTTP/1.0" 204 - "-" "PeerTube/4.3.0 (+https://tilvids.com)" Nov 03 17:37:13 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:37:13.282 info: Receiving inbox requests for 1 activities by https://tilvids.com/accounts/peertube. Nov 03 17:37:13 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:37:13.285 info: 38.242.251.94 - - [03/Nov/2022:22:37:13 +0000] "POST /inbox HTTP/1.0" 204 - "-" "PeerTube/4.3.0 (+https://tilvids.com)" Nov 03 17:37:46 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:37:46.176 info: Receiving inbox requests for 1 activities by https://tilvids.com/accounts/peertube. Nov 03 17:37:46 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:37:46.179 info: 38.242.251.94 - - [03/Nov/2022:22:37:46 +0000] "POST /inbox HTTP/1.0" 204 - "-" "PeerTube/4.3.0 (+https://tilvids.com)" Nov 03 17:38:25 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:38:25.874 info: Receiving inbox requests for 1 activities by https://tilvids.com/accounts/peertube. Nov 03 17:38:25 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:38:25.877 info: 38.242.251.94 - - [03/Nov/2022:22:38:25 +0000] "POST /inbox HTTP/1.0" 204 - "-" "PeerTube/4.3.0 (+https://tilvids.com)" Nov 03 17:38:50 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:38:50.959 info: Cleaning video viewers. Nov 03 17:38:58 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:38:58.398 info: Receiving inbox requests for 1 activities by https://tilvids.com/accounts/peertube. Nov 03 17:38:58 cdn01.tilvids.com peertube[1380]: [cdn01.tilvids.com:443] 2022-11-03 17:38:58.401 info: 38.242.251.94 - - [03/Nov/2022:22:38:58 +0000] "POST /inbox HTTP/1.0" 204 - "-" "PeerTube/4.3.0 (+https://tilvids.com)" Connection to cdn01.tilvids.com closed by remote host.
Let me know what more to get you.
Actually, I ran it again after restarting (and getting the 502 Bad Gateway) and get this error, which looks more promising...
Nov 03 17:42:39 cdn01.tilvids.com peertube[1673]: "error": { Nov 03 17:42:39 cdn01.tilvids.com peertube[1673]: "stack": "Error: Videos redundancy should be an array (you must uncomment lines containing - too)\n at checkLocalRedundancyConfig (/var/www/peertube/dist/server/initializers/checker-after-init.js:124:15)\n at checkConfig (/var/www/peertube/dist/server/initializers/checker-after-init.js:39:5)\n at Object.<anonymous> (/var/www/peertube/dist/server.js:38:38)\n at Module._compile (node:internal/modules/cjs/loader:1155:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)\n at Module.load (node:internal/modules/cjs/loader:1033:32)\n at Function.Module._load (node:internal/modules/cjs/loader:868:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)\n at node:internal/main/run_main_module:22:47", Nov 03 17:42:39 cdn01.tilvids.com peertube[1673]: "message": "Videos redundancy should be an array (you must uncomment lines containing - too)"
I thought I uncommented the redundancy part correctly but...maybe not?
Ok well...I looked at the error message about the lines containing - too and found out the config does indeed have a line above each redundancy rule with a - in it. I uncommented that and now the site comes back online. Progress!
Now I have to see if the production.yaml actually reflects the redundancy I want...
Well, the site is back online, but the production.yaml still reflects the default state with no redundancy brought over from the local.yaml after restart. :(
Any ideas?
Actually...it looks like it's pulling videos in now! Not sure what ended up doing it, just playing around with the ownership/permissions/structure of that local.yaml file.
Appreciate the point in the right direction!
I've been trying for a while now to change my production.yaml settings, but it looks like it's just overwriting them with default, which makes it so I can't change redundancy settings. Is this a bug, or am I editing them incorrectly?