Mattermost unhealthy cant login

I installed Mattermost fresh (member server). I cant login after the succesfull setup and docker ps shows the container is “unhealthy” but there is nothing suspicious in the log files (for me).
I cant find any warning or what is wrong with mattermost.

I tried all kind of login credentials (a/Administrato with default pw + reinstalled with setting own password). Nothing seems to work.


edited: Found these msg in /var/log/mysql/error.log (inside container)


[Note] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
[Note] Aborted connection 4 to db: 'mattermost' user: 'mmuser' host: 'localhost' (Got an error reading communication packets)

Hi @crunch,

that sounds like the mysql database did not properly initialize at the first start of the container. Since you have not yet used it the easiest is to simply uninstall the app and remove its data directory (with the data directory still present it would just return to your current state the next time you install it).

If you want to attempt to repair the database the initialisation commands can be found at https://stash.z-hub.io/projects/K4U/repos/mattermost/browse/start.sh#10

Oh i reinstalled and removed the mattermost data folder several time it didnt help. Sorry i didnt mentionend it. I will try the manual initialisation later.

Crosspost: https://forum.mattermost.org/t/univention-mattermost-app-cant-login-after-install/10361

So i tried running all sql mentions but the server still wont start. And has the same error message in the mysql logs. I can login (mysql) with the mention mysql_user + mysql_user:pwd mentioned in start.sh.

(All inside docker container)

When I use sh start.sh he says

` 3: set: Illegal option -o pipefail

So i set it commented

=> Update Mattermost plugin directory
=> Start MySQL
 * Starting MySQL database server mysqld                                                                                                                                                                                              [ OK ]
=> Start Mattermost
{"level":"info","ts":1599136973.4878664,"caller":"utils/i18n.go:83","msg":"Loaded system translations","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}
{"level":"info","ts":1599136973.4881277,"caller":"app/server_app_adapters.go:58","msg":"Server is initializing..."}
{"level":"info","ts":1599136973.4921403,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL","database":"master"}
{"level":"error","ts":1599136973.5979664,"caller":"app/server_app_adapters.go:135","msg":"Mail server connection test is failed: Could not connect to SMTP server, check SMTP server settings."}
{"level":"info","ts":1599136973.5992372,"caller":"app/license.go:37","msg":"License key from https://mattermost.com required to unlock enterprise features."}
{"level":"info","ts":1599136973.6063316,"caller":"mlog/log.go:167","msg":"Starting up plugins"}
{"level":"info","ts":1599136973.6064925,"caller":"app/plugin.go:202","msg":"Syncing plugins from the file store"}
{"level":"warn","ts":1599136973.608341,"caller":"app/plugin.go:222","msg":"Skipping sync for unmanaged plugin","plugin_id":"notifymatters"}
{"level":"info","ts":1599136973.6092618,"caller":"app/server.go:252","msg":"Current version is 5.22.0 (5.22.1/Thu Apr 23 14:55:48 UTC 2020/d0d6e33a11c5e69afc415707b23b241f101f56d6/94b0dfd3fa8ca3c8c939f4cd623bb848cf41c4bb)","current_version":"5.22.0","build_number":"5.22.1","build_date":"Thu Apr 23 14:55:48 UTC 2020","build_hash":"d0d6e33a11c5e69afc415707b23b241f101f56d6","build_hash_enterprise":"94b0dfd3fa8ca3c8c939f4cd623bb848cf41c4bb"}
{"level":"info","ts":1599136973.6093342,"caller":"app/server.go:261","msg":"Enterprise Build","enterprise_build":true}
{"level":"info","ts":1599136973.6093998,"caller":"app/server.go:267","msg":"Printing current working","directory":"/opt/mattermost"}
{"level":"info","ts":1599136973.6094425,"caller":"app/server.go:268","msg":"Loaded config","source":"file:///etc/mattermost/config.json"}
{"level":"info","ts":1599136973.6285844,"caller":"sqlstore/post_store.go:1518","msg":"Post.Message has size restrictions","max_characters":16383,"max_bytes":65535}
{"level":"info","ts":1599136973.6676123,"caller":"app/license.go:37","msg":"License key from https://mattermost.com required to unlock enterprise features."}
Version: 5.22.0
Build Number: 5.22.1
Build Date: Thu Apr 23 14:55:48 UTC 2020
Build Hash: d0d6e33a11c5e69afc415707b23b241f101f56d6
Build Enterprise Ready: true
DB Version: 5.22.0
{"level":"info","ts":1599136973.9074752,"caller":"utils/i18n.go:83","msg":"Loaded system translations","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}
{"level":"info","ts":1599136973.907768,"caller":"app/server_app_adapters.go:58","msg":"Server is initializing..."}
{"level":"info","ts":1599136973.91178,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL","database":"master"}
{"level":"error","ts":1599136973.9762099,"caller":"app/server_app_adapters.go:135","msg":"Mail server connection test is failed: Could not connect to SMTP server, check SMTP server settings."}
{"level":"info","ts":1599136973.977529,"caller":"app/license.go:37","msg":"License key from https://mattermost.com required to unlock enterprise features."}
{"level":"info","ts":1599136973.9834602,"caller":"mlog/log.go:167","msg":"Starting up plugins"}
{"level":"info","ts":1599136973.9835346,"caller":"app/plugin.go:202","msg":"Syncing plugins from the file store"}
{"level":"warn","ts":1599136973.9849706,"caller":"app/plugin.go:222","msg":"Skipping sync for unmanaged plugin","plugin_id":"notifymatters"}
{"level":"info","ts":1599136973.9855845,"caller":"app/server.go:252","msg":"Current version is 5.22.0 (5.22.1/Thu Apr 23 14:55:48 UTC 2020/d0d6e33a11c5e69afc415707b23b241f101f56d6/94b0dfd3fa8ca3c8c939f4cd623bb848cf41c4bb)","current_version":"5.22.0","build_number":"5.22.1","build_date":"Thu Apr 23 14:55:48 UTC 2020","build_hash":"d0d6e33a11c5e69afc415707b23b241f101f56d6","build_hash_enterprise":"94b0dfd3fa8ca3c8c939f4cd623bb848cf41c4bb"}
{"level":"info","ts":1599136973.9856477,"caller":"app/server.go:261","msg":"Enterprise Build","enterprise_build":true}
{"level":"info","ts":1599136973.9856913,"caller":"app/server.go:267","msg":"Printing current working","directory":"/opt/mattermost"}
{"level":"info","ts":1599136973.9857202,"caller":"app/server.go:268","msg":"Loaded config","source":"file:///etc/mattermost/config.json"}
{"level":"info","ts":1599136973.9987128,"caller":"sqlstore/post_store.go:1518","msg":"Post.Message has size restrictions","max_characters":16383,"max_bytes":65535}
{"level":"info","ts":1599136974.053859,"caller":"jobs/workers.go:68","msg":"Starting workers"}
{"level":"info","ts":1599136974.0544631,"caller":"jobs/schedulers.go:74","msg":"Starting schedulers."}
{"level":"info","ts":1599136974.065554,"caller":"app/web_hub.go:75","msg":"Starting websocket hubs","number_of_hubs":32}
{"level":"info","ts":1599136974.0992122,"caller":"app/server.go:506","msg":"Starting Server..."}
{"level":"error","ts":1599136974.0995114,"caller":"commands/server.go:81","msg":"listen tcp :8065: bind: address already in use"}
{"level":"info","ts":1599136974.0995543,"caller":"app/server.go:399","msg":"Stopping Server..."}
{"level":"info","ts":1599136974.099577,"caller":"app/web_hub.go:130","msg":"stopping websocket hub connections"}
{"level":"info","ts":1599136974.100627,"caller":"app/plugin.go:279","msg":"Shutting down plugins"}
{"level":"info","ts":1599136984.715638,"caller":"jobs/workers.go:184","msg":"Stopped workers"}
{"level":"info","ts":1599136984.7158954,"caller":"jobs/schedulers.go:145","msg":"Stopping schedulers."}
{"level":"info","ts":1599136984.7159712,"caller":"jobs/schedulers.go:77","msg":"Schedulers stopped."}
{"level":"info","ts":1599136984.7164176,"caller":"app/server.go:450","msg":"Server stopped"}
Error: listen tcp :8065: bind: address already in use

I think this is normal (8065 is the docker port?)

Removing and reinstalling doesnt solve the problem either.

So I removed /var/lib/mysql/init to rerun the setuo routine.

---- docker logs

=> Preparing MySQL
[i] Setting up new power user credentials.
 * Starting MySQL database server mysqld
   ...done.
[i] Setting root new password.
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[i] Setting root remote password.
mysql: [Warning] Using a password on the command line interface can be insecure.
[i] Creating datebase: mattermost
mysql: [Warning] Using a password on the command line interface can be insecure.
[i] Create new User: mmuser with password THISISMYMMDBPASSWORD for new database mattermost.
mysql: [Warning] Using a password on the command line interface can be insecure.
[i] Setting end,have fun.
=> Update Mattermost plugin directory
=> Start MySQL
 * Starting MySQL database server mysqld
   ...done.
=> Start Mattermost
{"level":"info","ts":1599192939.574143,"caller":"utils/i18n.go:83","msg":"Loaded system translations","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}
{"level":"info","ts":1599192939.574395,"caller":"app/server_app_adapters.go:58","msg":"Server is initializing..."}
{"level":"info","ts":1599192939.5780022,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL","database":"master"}
{"level":"error","ts":1599192939.664379,"caller":"app/server_app_adapters.go:135","msg":"Mail server connection test is failed: Could not connect to SMTP server, check SMTP server settings."}
{"level":"info","ts":1599192939.6661084,"caller":"app/license.go:37","msg":"License key from https://mattermost.com required to unlock enterprise features."}
{"level":"info","ts":1599192939.6726105,"caller":"mlog/log.go:167","msg":"Starting up plugins"}
{"level":"info","ts":1599192939.672719,"caller":"app/plugin.go:202","msg":"Syncing plugins from the file store"}
{"level":"warn","ts":1599192939.6742623,"caller":"app/plugin.go:222","msg":"Skipping sync for unmanaged plugin","plugin_id":"notifymatters"}
{"level":"info","ts":1599192939.674963,"caller":"app/server.go:252","msg":"Current version is 5.22.0 (5.22.1/Thu Apr 23 14:55:48 UTC 2020/d0d6e33a11c5e69afc415707b23b241f101f56d6/94b0dfd3fa8ca3c8c939f4cd623bb848cf41c4bb)","current_version":"5.22.0","build_number":"5.22.1","build_date":"Thu Apr 23 14:55:48 UTC 2020","build_hash":"d0d6e33a11c5e69afc415707b23b241f101f56d6","build_hash_enterprise":"94b0dfd3fa8ca3c8c939f4cd623bb848cf41c4bb"}
{"level":"info","ts":1599192939.6749992,"caller":"app/server.go:261","msg":"Enterprise Build","enterprise_build":true}
{"level":"info","ts":1599192939.6750336,"caller":"app/server.go:267","msg":"Printing current working","directory":"/opt/mattermost"}
{"level":"info","ts":1599192939.675052,"caller":"app/server.go:268","msg":"Loaded config","source":"file:///etc/mattermost/config.json"}
{"level":"info","ts":1599192939.688615,"caller":"sqlstore/post_store.go:1518","msg":"Post.Message has size restrictions","max_characters":16383,"max_bytes":65535}
{"level":"info","ts":1599192939.737027,"caller":"app/license.go:37","msg":"License key from https://mattermost.com required to unlock enterprise features."}
Version: 5.22.0
Build Number: 5.22.1
Build Date: Thu Apr 23 14:55:48 UTC 2020
Build Hash: d0d6e33a11c5e69afc415707b23b241f101f56d6
Build Enterprise Ready: true
DB Version: 5.22.0
{"level":"info","ts":1599192939.9930642,"caller":"utils/i18n.go:83","msg":"Loaded system translations","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}
{"level":"info","ts":1599192939.993328,"caller":"app/server_app_adapters.go:58","msg":"Server is initializing..."}
{"level":"info","ts":1599192939.9971843,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL","database":"master"}
{"level":"error","ts":1599192940.0788362,"caller":"app/server_app_adapters.go:135","msg":"Mail server connection test is failed: Could not connect to SMTP server, check SMTP server settings."}
{"level":"info","ts":1599192940.0800707,"caller":"app/license.go:37","msg":"License key from https://mattermost.com required to unlock enterprise features."}
{"level":"info","ts":1599192940.0849807,"caller":"mlog/log.go:167","msg":"Starting up plugins"}
{"level":"info","ts":1599192940.0850632,"caller":"app/plugin.go:202","msg":"Syncing plugins from the file store"}
{"level":"warn","ts":1599192940.0864406,"caller":"app/plugin.go:222","msg":"Skipping sync for unmanaged plugin","plugin_id":"notifymatters"}
{"level":"info","ts":1599192940.0870109,"caller":"app/server.go:252","msg":"Current version is 5.22.0 (5.22.1/Thu Apr 23 14:55:48 UTC 2020/d0d6e33a11c5e69afc415707b23b241f101f56d6/94b0dfd3fa8ca3c8c939f4cd623bb848cf41c4bb)","current_version":"5.22.0","build_number":"5.22.1","build_date":"Thu Apr 23 14:55:48 UTC 2020","build_hash":"d0d6e33a11c5e69afc415707b23b241f101f56d6","build_hash_enterprise":"94b0dfd3fa8ca3c8c939f4cd623bb848cf41c4bb"}
{"level":"info","ts":1599192940.087047,"caller":"app/server.go:261","msg":"Enterprise Build","enterprise_build":true}
{"level":"info","ts":1599192940.0870788,"caller":"app/server.go:267","msg":"Printing current working","directory":"/opt/mattermost"}
{"level":"info","ts":1599192940.0870981,"caller":"app/server.go:268","msg":"Loaded config","source":"file:///etc/mattermost/config.json"}
{"level":"info","ts":1599192940.1001952,"caller":"sqlstore/post_store.go:1518","msg":"Post.Message has size restrictions","max_characters":16383,"max_bytes":65535}
{"level":"info","ts":1599192940.1374774,"caller":"jobs/workers.go:68","msg":"Starting workers"}
{"level":"info","ts":1599192940.137744,"caller":"jobs/schedulers.go:74","msg":"Starting schedulers."}
{"level":"info","ts":1599192940.1482193,"caller":"app/web_hub.go:75","msg":"Starting websocket hubs","number_of_hubs":32}
{"level":"info","ts":1599192940.1854599,"caller":"app/server.go:506","msg":"Starting Server..."}
{"level":"info","ts":1599192940.1858282,"caller":"app/server.go:575","msg":"Server is listening on [::]:8065","address":"[::]:8065"}

There is no error Message but I cant login. The mysql/error (first post) still appears.

Im wondering why there is no line of code with the default Administration User (administrator PW: mattermost). Inside the start script. He doesnt exist inside the mysql Database either so maybe just the login user wont be createt? Could this be the Problem?


Edit:
If i create a User with univention-app shell mattermost mattermost-platform user create --email user@example.com --username userexample --password ExamplePassword
Im able to login with the created user. So maybe there is the Administrator Account missing? Do u know where and how he gets created und setup?

So i fexied it now… Will creating the user from the commandline I needed to use a save password (8chars, 1 capital,…) and not a simple one.

So i uninstalled the app und changed the default password “mattermost” to something acceptable. Now I can login without a problem. Could it be that he doesnt like the default password “mattermost” anymore or maybe he greps my system-wide password policy?

1 Like
Mastodon