Mattermost, Inc.

Mattermost Init Script

Summary

I am trying to create an init script based on the one described in the Production Install docs. I have Centos 6.8. I have seen other help requests about the issues I am having but I have not seen anything that works.

When I run the script I get:

panic: Failed to load system translations for ‘en’

I verified my configuration file with https://jsonformatter.curiousconcept.com/ .

Steps to reproduce

The code I am using for the init script is as follows:

#!/bin/sh
start on runlevel [2345]
stop on runlevel [016]
#respawn
exec /home/site/chat.site.com/mattermost/bin/platform -config=/home/site/chat.site.com/mattermost/config/config.json

I have tried many more internations of this code based on reading these forums and other Linux formus.

Expected behavior

When running this I want platform script to run. Once it is working it should run on system boot.

Observed behavior

Currently, when it runs it produces the following output.

[root@site init.d]# sh mattermost.conf
    start: Unknown job: on
    stop: Unknown job: on
    panic: Failed to load system translations for 'en'

    goroutine 1 [running]:
    panic(0xbd2b00, 0xc820010b70)
    	/usr/local/go/src/runtime/panic.go:481 +0x3e6
    github.com/mattermost/platform/utils.GetTranslationsBySystemLocale(0xd37400)
    	/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/utils/i18n.go:50 +0x2fd
    github.com/mattermost/platform/utils.InitTranslations(0xc82029d770, 0xc82029d790, 0xc82029d7a0)
    	/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/utils/i18n.go:27 +0x3e
    main.main()
    	/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/mattermost.go:102 +0x247

Any help with getting this to work correctly is greatly appreciated.

Thanks,
Steve

Hi @stevekessler,

Which version of Mattermost are you running? It looks like you’re missing the translation file for English. Can you look in your Mattermost directory and see if there is a file under i18n/en.json? If it’s missing then that’s the issue.