NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.39k stars 13.61k forks source link

Mattermost service does not work or is not well-explained #89194

Closed nh2 closed 9 months ago

nh2 commented 4 years ago

I don't quite get how to use the Mattermost service.

With

  services.mattermost = {
    enable = true;
  };

on 20.03 I get a Register button for the first user but after I register, it shows:

image

Is there some further config one is expected to make?


I also tried mutableConfig = true; but it doesn't seem to change anything.

Another thing I notice is various errors in the logs:

May 29 22:49:46 nixos systemd[1]: Started Mattermost chat service.
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.8760746,"caller":"utils/i18n.go:42","msg":"Loaded system translations for 'en' from '/var/lib/mattermost/i18n/en.json'
"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.8801184,"caller":"app/server.go:177","msg":"Server is initializing..."}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.8824806,"caller":"sqlstore/supplier.go:261","msg":"Pinging SQL master database"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.930019,"caller":"app/server_app_adapters.go:124","msg":"Able to write files to local storage."}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.930804,"caller":"app/plugin.go:130","msg":"Starting up plugins"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"error","ts":1590792586.9308493,"caller":"app/server_app_adapters.go:139","msg":"Failed to start up plugins","error":"mkdir ./client/plugins:
 read-only file system"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9309814,"caller":"commands/server.go:64","msg":"Current version is 5.9.0 (nixpkgs-5.9.0///)"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9309955,"caller":"commands/server.go:64","msg":"Enterprise Enabled: "}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9310067,"caller":"commands/server.go:64","msg":"Current working directory is /var/lib/mattermost"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9310586,"caller":"commands/server.go:64","msg":"Loaded config file from /var/lib/mattermost/config/config.json"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9403346,"caller":"sqlstore/post_store.go:1296","msg":"Post.Message supports at most 16383 characters (65535 bytes)"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.940849,"caller":"app/plugin.go:130","msg":"Starting up plugins"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"error","ts":1590792586.940925,"caller":"app/server_app_adapters.go:142","msg":"Failed to start up plugins","error":"mkdir ./client/plugins: 
read-only file system"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9805486,"caller":"app/plugin.go:130","msg":"Starting up plugins"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"error","ts":1590792586.9806156,"caller":"app/server_app_adapters.go:142","msg":"Failed to start up plugins","error":"mkdir ./client/plugins:
 read-only file system"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9812331,"caller":"jobs/server.go:41","msg":"Starting workers"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9812863,"caller":"commands/server.go:75","msg":"Starting Server..."}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9814923,"caller":"commands/server.go:75","msg":"Server is listening on [::]:8065"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9902241,"caller":"wsapi/api.go:25","msg":"Starting 4 websocket hubs"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"error","ts":1590792586.990563,"caller":"web/web.go:39","msg":"Failed to update assets subpath from config","error":"failed to update root.ht
ml with subpath /: open /nix/store/3nm67rswap0509bmgx5pxv6licmm40jg-mattermost-webapp-5.9.0/client/root.html: read-only file system","errorVerbose":"open /nix/store/3nm67rswap0509bmgx5pxv6li
cmm40jg-mattermost-webapp-5.9.0/client/root.html: read-only file system\nfailed to update root.html with subpath /\ngithub.com/mattermost/mattermost-server/utils.UpdateAssetsSubpath\n\t/buil
d/go/src/github.com/mattermost/mattermost-server/utils/subpath.go:117\ngithub.com/mattermost/mattermost-server/utils.UpdateAssetsSubpathFromConfig\n\t/build/go/src/github.com/mattermost/matt
ermost-server/utils/subpath.go:156\ngithub.com/mattermost/mattermost-server/web.(*Web).InitStatic\n\t/build/go/src/github.com/mattermost/mattermost-server/web/static.go:26\ngithub.com/matter
most/mattermost-server/web.New\n\t/build/go/src/github.com/mattermost/mattermost-server/web/web.go:39\ngithub.com/mattermost/mattermost-server/cmd/mattermost/commands.runServer\n\t/build/go/
src/github.com/mattermost/mattermost-server/cmd/mattermost/commands/server.go:83\ngithub.com/mattermost/mattermost-server/cmd/mattermost/commands.serverCmdF\n\t/build/go/src/github.com/matte
rmost/mattermost-server/cmd/mattermost/commands/server.go:50\ngithub.com/mattermost/mattermost-server/vendor/github.com/spf13/cobra.(*Command).execute\n\t/build/go/src/github.com/mattermost/
mattermost-server/vendor/github.com/spf13/cobra/command.go:762\ngithub.com/mattermost/mattermost-server/vendor/github.com/spf13/cobra.(*Command).ExecuteC\n\t/build/go/src/github.com/mattermo
st/mattermost-server/vendor/github.com/spf13/cobra/command.go:852\ngithub.com/mattermost/mattermost-server/vendor/github.com/spf13/cobra.(*Command).Execute\n\t/build/go/src/github.com/matter
most/mattermost-server/vendor/github.com/spf13/cobra/command.go:800\ngithub.com/mattermost/mattermost-server/cmd/mattermost/commands.Run\n\t/build/go/src/github.com/mattermost/mattermost-ser
ver/cmd/mattermost/commands/root.go:14\nmain.main\n\t/build/go/src/github.com/mattermost/mattermost-server/cmd/mattermost/main.go:30\nruntime.main\n\t/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeee
eee-go-1.14.1/share/go/src/runtime/proc.go:203\nruntime.goexit\n\t/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.14.1/share/go/src/runtime/asm_amd64.s:1373"}
May 29 22:49:46 nixos mattermost[8148]: {"level":"info","ts":1590792586.9923725,"caller":"sync/once.go:66","msg":"Starting schedulers."}
May 29 22:50:16 nixos mattermost[8148]: {"level":"info","ts":1590792616.9141743,"caller":"scheduler/worker.go:50","msg":"Worker: Job is complete","worker":"Plugins","job_id":"a4efzos6y38bxpi
y9ef75bixbr"}
May 29 22:50:17 nixos mattermost[8148]: {"level":"error","ts":1590792617.1688743,"caller":"web/context.go:52","msg":"Plugins have been disabled. Please check your logs for details.","path":"
/api/v4/plugins/webapp","request_id":"7ag4qw5uapfkmrz93q688eea5r","ip_addr":"127.0.0.1","user_id":"hzu4k1hmypy53ku44posudjd8o","method":"GET","err_where":"GetActivePluginManifests","http_cod
e":501,"err_details":""}
May 29 22:50:17 nixos mattermost[8148]: {"level":"error","ts":1590792617.3029966,"caller":"web/handlers.go:151","msg":"websocket connect err: websocket: the client is not using the websocket
 protocol: 'upgrade' token not found in 'Connection' header"}
May 29 22:50:17 nixos mattermost[8148]: {"level":"error","ts":1590792617.3031204,"caller":"web/context.go:52","msg":"Failed to upgrade websocket connection","path":"/api/v4/websocket","request_id":"aq937autrjdax8t7f8qjaxdrua","ip_addr":"127.0.0.1","user_id":"hzu4k1hmypy53ku44posudjd8o","method":"GET","err_where":"connect","http_code":500,"err_details":""}
May 29 22:50:17 nixos mattermost[8148]: {"level":"info","ts":1590792617.3031762,"caller":"web/handlers.go:183","msg":"http: superfluous response.WriteHeader call from github.com/mattermost/mattermost-server/web.Handler.ServeHTTP (handlers.go:183)","source":"httpserver"}
May 29 22:50:20 nixos mattermost[8148]: {"level":"error","ts":1590792620.509334,"caller":"web/handlers.go:151","msg":"websocket connect err: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header"}

Lots of read-only file system in there, should it be that way?


CC @fpletz @ryantm @jslight90 who I suspect might be Mattermost service users.

nh2 commented 4 years ago

OK, I think the Mattermost version in NixOS 20.03 (Mattermost 5.9) is simply broken.

I propose that we merge the 5.20; the risk of upgrading within a release seems OK given that new installs don't work at all (I guess at best upgrades do work)?

nh2 commented 4 years ago

Cherry-picking #69125, which upgrades to 5.15 still exhibits the same problem

Hmm, I seem to be wrong with that version, it does seem to work for me: After logout and re-login (or full refresh via Shift+Ctrl+R in Firefox?), the Create a team link appears.

wucke13 commented 4 years ago

Instead of having the link, there is also another possibility: Exchange s/select/create/ in the URL should bring you to the dialog where you can create the first team.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

patka-123 commented 9 months ago

Hello @nh2 :wave:

When reading the comments in this thread it seems to me that this issue has been resolved. If so, would you be able to close this issue?

(I'm going through issues marked as stale to see what can be resolved. If this is still an issue then don't mind me).

nh2 commented 9 months ago

I'm not using Mattermost currently, so closing.

@patka-123 Thank you for triage work!