We're Hiring!

Mattermost, Inc.

Error: failed to load configuration: failed to create store: unable to load on store creation: parsing error at line 145, character 4: invalid character '"' after object key:value pair

Hello! And sorry for a noob question but I can’t find the answer here or on Google.

I followed the installation steps on Ubuntu 18.04 with mysql but in this step

sudo -u mattermost ./bin/mattermost

I am not able to start the Mattermost server even I checked for many times db user, pass, and alt the steps…

This is the error.

root@slack:/opt/mattermost# sudo -u mattermost ./bin/mattermost
Error: failed to load configuration: failed to create store: unable to load on store creation: parsing error at line 145, character 4: invalid character ‘"’ after object key:value pair

My config is
root@slack:/opt/mattermost# cat /opt/mattermost/config/config.json | grep -A11 “SqlSettings”
“SqlSettings”: {
“DriverName”: “mysql”,
“DataSource”: “mmuser:Stapanu%006@tcp(localhost:3306)/mattermost?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s”,
“DataSourceReplicas”: ,
“DataSourceSearchReplicas”: ,
“MaxIdleConns”: 20,
“ConnMaxLifetimeMilliseconds”: 3600000,
“MaxOpenConns”: 300,
“Trace”: false,
“AtRestEncryptKey”: “”,
“QueryTimeout”: 30,
“DisableDatabaseSearch”: false

Your help will be so much appreciated!
Thank you!

Hello! I’m noticing here

that there is no comma after “false” which, depending on what comes after that line, could be the issue.

Hello, @alexgorun

Based on the output of the SqlSettings you shared and the error that you are getting, there is an issue with the missing character.

With reference to the screen shot that I have below, line 145 refers to the one above the SqlSettings:

Which in turn looks like this.

    "ClientRequirements": {
        "AndroidLatestVersion": "",
        "AndroidMinVersion": "",
        "DesktopLatestVersion": "",
        "DesktopMinVersion": "",
        "IosLatestVersion": "",
        "IosMinVersion": ""
    },
    "SqlSettings": {
        "DriverName": "mysql",
        "DataSource": "XXXXXXXXXX:XXXXXXXXXX@tcp(XXXXXXXXXX)/mattermost?charset=utf8mb4,$
        "DataSourceReplicas": [],
        "DataSourceSearchReplicas": [],
        "MaxIdleConns": 20,
        "ConnMaxLifetimeMilliseconds": 3600000,
        "MaxOpenConns": 300,
        "Trace": false,
        "AtRestEncryptKey": "XXXXXXXXXX",
        "QueryTimeout": 30,
        "DisableDatabaseSearch": false
    },

Can you please double check on the curly braces and commas if you are missing any?

1 Like