We're Hiring!

Mattermost Discussion Forums

Help setting up - Can't run config file

Hello, I am trying to get my Mattermost running. I have encountered many syntax-based errors with MySQL along the way, but I’m now on the .config step and I’m completely stuck. I am getting the following:

root@name:/opt/mattermost# sudo -u mattermost ./bin/mattermost
Error: failed to load configuration: failed to create store: unable to load on store creation: invalid config: Config.IsValid: model.config.is_valid.file_driver.app_error, 
Usage:
  mattermost [flags]
  mattermost [command]

Available Commands:
  db          Commands related to the database
  export      Export data from Mattermost
  help        Help about any command
  import      Import data.
  jobserver   Start the Mattermost job server
  server      Run the Mattermost server
  version     Display version information

Flags:
  -c, --config string   Configuration file to use.
  -h, --help            help for mattermost

Use "mattermost [command] --help" for more information about a command.

And here is some of my .config:

“SqlSettings”: {
“DriverName”: “mysql”,
“DataSource”: “user:<Password!>@tcp(:3306)/mattermost?charset=utf8mb4,utf8&writeTimeout=30s”,
“DataSourceSearchReplicas”: ,

Please help, thank you.

UPDATE: I have been toying with this for HOURS. I think I finally found something, but I’m having more, different errors now.
Following this (How To Set Up Mattermost on Ubuntu 18.04 | DigitalOcean) guide led me through a very slightly different route than the mattermost guide, by making me create a systemd service. Now, I don’t know what this could have to do with my .config, but I noticed that within the systemd steps I have to edit my 2nd After=, Requires=, and WantedBy=. These originally had postgres instead of MySQL in the related fields.

I’ve now switched those over to mysql.service as instructed, but I’m having new errors (and I’m not sure if the .config problem is actually even fixed…):

root@-s-1vcpu-2gb-nyc1-01:~# sudo systemctl daemon-reload
root@-s-1vcpu-2gb-nyc1-01:~# sudo systemctl status mattermost
● mattermost.service - Mattermost
   Loaded: loaded (/lib/systemd/system/mattermost.service; disabled; vendor preset: enabled
   Active: inactive (dead)

Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:8: 
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:9: 
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:10:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:11:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:12:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:13:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:14:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:15:
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: mattermost.service: Service lacks both Exe
Nov 13 13:39:51 -s-1vcpu-2gb-nyc1-01 systemd[1]: /lib/systemd/system/mattermost.service:1: 

Please let me know any ideas, thanks!

How about posting the content of your mattermost.service file?