Closed naturallaw777 closed 11 months ago
With NixOS unstable, I was able to further pinpoint the issue...
It will NOT build when the nginx option is set to true (which is it's default) OR if the caddy option is set to true.
If both are set to false, then it will build just fine. But obviously, that doesn't work because Jitsi needs to be served over the web.
Therefore, it seems something with connecting to the webserver feature in the module is preventing the whole Jitsi module from building.
Please post the entire build failure log. The 3 lines are not helpful.
Please post the entire build failure log. The 3 lines are not helpful.
Sure thing. This was the output from nixos-rebuilt switch
Hold on...
Here is the log after running nix log /nix/store/rnlhvsmxjsnsdzbhpva6ah4wyg3bmqcb-templated-jitsi-meet.drv
from terminal. Hopefully, this is what you are looking for.
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/rnlhvsmxjsnsdzbhpva6ah4wyg3bmqcb-templated-jitsi-meet.drv^*'
error: failed processing files:
FailedJobs(
"static/404.html": Permission denied (os error 13) at path "/build/static/.tmp4wVNXb"
)
@SuperSandro2000 is the log posted above helpful for you? Are you looking for a dmesg log as well?
Upon further testing it is a Caddy issue regarding the Caddy module option services.jitsi-meet.caddy.enable
I will include the maintainers in this ticket.
@emilylange @Br1ght0ne
This breakage is not a fault of services.caddy
itself, but rather how @happysalada originally implemented services.jitsi-meet.caddy.enable
two years ago in #140495.
I suspect it's due to the recent sd
bump from 0.7.6
to 1.0.0
(#266185), which got merged roughly 3 weeks ago.
But I haven't looked that closely.
Not sure how much input I can provide here.
The resulting Caddyfile
certainly provides lots of room for improvement.
I checked the changelog for sd but i couldnt see anything related.
@emilylange do you have suggestions for how to improve the caddyfile ?
I checked the changelog for sd but i couldnt see anything related.
1.0.0
started to return a proper non-zero exit code when a replacement fails.
See https://github.com/chmln/sd/pull/186
sd
@0.7.6
(successful, with errors):
Error processing static/404.html: Permission denied (os error 13) at path "/build/static/.tmpijC4qJ"
Error processing static/authError.html: Permission denied (os error 13) at path "/build/static/.tmpObojfU"
Error processing static/close.html: Permission denied (os error 13) at path "/build/static/.tmpWsC7vW"
Error processing static/close2.html: Permission denied (os error 13) at path "/build/static/.tmp6S3N7c"
Error processing static/dialInInfo.html: Permission denied (os error 13) at path "/build/static/.tmpL74SZO"
Error processing static/msredirect.html: Permission denied (os error 13) at path "/build/static/.tmp8W8OzG"
Error processing static/oauth.html: Permission denied (os error 13) at path "/build/static/.tmpvw1RWl"
Error processing static/offline.html: Permission denied (os error 13) at path "/build/static/.tmp2gm87h"
Error processing static/prejoin.html: Permission denied (os error 13) at path "/build/static/.tmpxSfBYm"
Error processing static/recommendedBrowsers.html: Permission denied (os error 13) at path "/build/static/.tmpZsJLX4"
Error processing static/settingsToolbarAdditionalContent.html: Permission denied (os error 13) at path "/build/static/.tmpIhx6cW"
Error processing static/welcomePageAdditionalCard.html: Permission denied (os error 13) at path "/build/static/.tmpTAWocS"
Error processing static/welcomePageAdditionalContent.html: Permission denied (os error 13) at path "/build/static/.tmp4kMnZh"
/nix/store/81f9ff2ghb6inq3xw65i6f6y5shv156i-templated-jitsi-meet
sd
@1.0.0
(hard-errors):
error: failed processing files:
FailedJobs(
"static/404.html": Permission denied (os error 13) at path "/build/static/.tmpRMzDXu"
)
Which leads me to believe this has been broken for a long time. It's just that no-one noticed, as it used to """silently""" error.
@emilylange do you have suggestions for how to improve the caddyfile ?
Given the Caddyfile currently is
handle /http-bind {
header Host ${cfg.hostName}
reverse_proxy 127.0.0.1:5280
}
handle /xmpp-websocket {
reverse_proxy 127.0.0.1:5280
}
handle {
templates
root * ${templatedJitsiMeet}
try_files {path} {path}
try_files {path} /index.html
file_server
}
header Host ${cfg.hostName}
This is passed by default and shouldn't be needed. See https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#defaults
And given /http-bind
and /xmpp-websocket
have the same upstream, they could get merged into a single block (but this is more of a nitpick). Or their handle
could be dropped entirely (and passed directly into reverse_proxy
).
So my initial
The resulting
Caddyfile
certainly provides lots of room for improvement.
isn't that fair and I should have phrased this differently. Sorry @happysalada.
diff --git a/nixos/modules/services/web-apps/jitsi-meet.nix b/nixos/modules/services/web-apps/jitsi-meet.nix
index c0f9d785eea2..0c0eb66e65b7 100644
--- a/nixos/modules/services/web-apps/jitsi-meet.nix
+++ b/nixos/modules/services/web-apps/jitsi-meet.nix
@@ -479,7 +479,7 @@ in
extraConfig =
let
templatedJitsiMeet = pkgs.runCommand "templated-jitsi-meet" { } ''
- cp -R ${pkgs.jitsi-meet}/* .
+ cp -R --no-preserve=all ${pkgs.jitsi-meet}/* .
for file in *.html **/*.html ; do
${pkgs.sd}/bin/sd '<!--#include virtual="(.*)" -->' '{{ include "$1" }}' $file
done
Adding --no-preserve=all
resolves the error.
Thank you everyone for the help! Yes, it seems it is a simple fix with the --no-preserve=all
? If so, how to merge this into the main jitsi-meet
module so jitsi-meet can build with the caddy option enabled?
Ahhh! You are the best!! Thanks so much!!
Steps To Reproduce
Steps to reproduce the behavior:
cd /etc/nixos/ && nix flake update && nixos-rebuild switch
Build log
Additional context
Add any other context about the problem here.
Notify maintainers
@Cleeyv @ryantm @camillemndn @SomeoneSerge @SuperSandro2000
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.