I'm happily working with Mattermost 3.5.0 (Build Hash: 3f19ccf1b1a6efdcc990cf8a0270ec4ffc0c6e22, Build Date: Tue Nov 15 18:55:53 UTC 2016), which is bundled with the most recent GitLab Omnibus (8.14.1). I've never used the CLI before, so I don't know if it worked in older releases.
Whenever I run the CLI with the
-config option, I get the following error (it doesn't matter if i sudo or not):
$ sudo -u mattermost /opt/gitlab/embedded/bin/mattermost -config=/var/opt/gitlab/mattermost/config.json -version
[2016/12/01 14:00:57 CET] [EROR] Failed to load system translations for 'en' attempting to fall back to 'en'
panic: Failed to load system translations for 'en'
goroutine 1 [running]:
github.com/mattermost/platform/utils.InitTranslations(0xc4204b55f0, 0xc4204b5600, 0xc4204b5610)
If I run the command without the path to the config file it complains, obviously, it can't find the config file, but at least it doesn't panic:
$ sudo -u mattermost /opt/gitlab/embedded/bin/mattermost -version
[14:02:45 CET 2016/12/01] [EROR] (main.main:107) Unable to load mattermost configuration file: utils.config.load_config.opening.panic
I don't know how Mattermost searches for its translation files, but in my understanding the files are there (again, it doesn't matter if I change the owner of the files):
$ ls -alh /opt/gitlab/embedded/service/mattermost/i18n
drwxr-xr-x 2 root root 4.0K Nov 28 19:45 .
drwxrwxr-x 7 root root 4.0K Nov 28 19:45 ..
-rw-r--r-- 1 root root 187K Nov 28 17:22 de.json
-rw-r--r-- 1 root root 174K Nov 28 17:22 en.json
-rw-r--r-- 1 root root 190K Nov 28 17:22 es.json
-rw-r--r-- 1 root root 193K Nov 28 17:22 fr.json
-rw-r--r-- 1 root root 207K Nov 28 17:22 ja.json
-rw-r--r-- 1 root root 184K Nov 28 17:22 ko.json
-rw-r--r-- 1 root root 184K Nov 28 17:22 nl.json
-rw-r--r-- 1 root root 185K Nov 28 17:22 pt-BR.json
-rw-r--r-- 1 root root 236K Nov 28 17:22 ru.json
-rw-r--r-- 1 root root 166K Nov 28 17:22 zh_CN.json
-rw-r--r-- 1 root root 168K Nov 28 17:22 zh_TW.json
I've looked at the following issues, but they relate to much older versions of Mattermost and none of them brought up a solution that worked in this case:
Steps to reproduce
- install most recent GitLab Omnibus (8.14.1) on Ubuntu 14.04.5 LTS
- fire the CLI with the path to the config file:
sudo -u mattermost /opt/gitlab/embedded/bin/mattermost -config=/var/opt/gitlab/mattermost/config.json -help
EDIT: I forgot to mention, there are no log entries to this error. But just a few moments ago I've found a workaround in forum.mattermost.org/t/solved-how-to-authenticate-bots-using-the-api/2405/2