Can't start Mattermost with systemctl

Summary
Mattermost not starting with sudo systemctl start mattermost but works fine with sudo -u mattermost ./bin/mattermost

Running on Ubuntu 20.04.1 LTS, with postgres and nginx as a proxy.
Mattermost version 5.35.2

Steps to reproduce
I have installed Mattermost for a small non-profit project and it was working fine until today that I had to change the maximum number of users per team to 100. Since it did that I entered into the server and was trying to delete a team but mattermost was having issues connecting with postgres, if I fixed the issue with postgres and upgraded Mattermost to the latest version.
After I did the above steps Mattermost stopped working with systemctl, it only works if I call mattermost directly…

Expected behavior
It should normally work as a service and be able to auto start if I reboot the server.

Observed behavior
Here are some logs that I don’t understand why the server start and later it stops again.

{"level":"info","ts":1623268375.8652647,"caller":"app/server.go:245","msg":"Server is initializing...","go_version":"go1.15.5"}
{"level":"info","ts":1623268375.8653355,"caller":"app/web_hub.go:83","msg":"Starting websocket hubs","number_of_hubs":2}
{"level":"info","ts":1623268375.8654866,"caller":"bleveengine/bleve.go:182","msg":"EXPERIMENTAL: Starting Bleve"}
{"level":"info","ts":1623268375.8701863,"caller":"i18n/i18n.go:93","msg":"Loaded system translations","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}
{"level":"info","ts":1623268375.8738625,"caller":"sqlstore/store.go:282","msg":"Pinging SQL","database":"master"}
{"level":"info","ts":1623268375.8985918,"caller":"sqlstore/store.go:282","msg":"Pinging SQL","database":"migrations"}
{"level":"info","ts":1623268375.9881618,"caller":"app/license.go:68","msg":"License key from https://mattermost.com required to unlock enterprise features."}
{"level":"error","ts":1623268375.9920251,"caller":"app/server.go:512","msg":"Mail server connection test is failed","error":"SendEmailNotifications is not true","errorVerbose":"SendEmailNotifications is not true\ngithub.com/mattermost/mattermost-server/v5/shared/mail.TestConnection\n\tgithub.com/mattermost/mattermost-server/v5/shared/mail/mail.go:212\ngithub.com/mattermost/mattermost-server/v5/app.NewServer\n\tgithub.com/mattermost/mattermost-server/v5/app/server.go:511\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.runServer\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/server.go:77\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.serverCmdF\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/server.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:852\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.1.3/command.go:960\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:897\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.Run\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/root.go:14\nmain.main\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/main.go:31\nruntime.main\n\truntime/proc.go:204\nruntime.goexit\n\truntime/asm_amd64.s:1374"}
{"level":"info","ts":1623268375.9922478,"caller":"app/server.go:555","msg":"Current version is 5.35.0 (5.35.2/Wed Jun  2 07:57:23 UTC 2021/208cbac8e0fb459844ae01cd72c11dd7eda6b182/6559a532330b11751afd184c6b4e43a78c8db650)","current_version":"5.35.0","build_number":"5.35.2","build_date":"Wed Jun  2 07:57:23 UTC 2021","build_hash":"208cbac8e0fb459844ae01cd72c11dd7eda6b182","build_hash_enterprise":"6559a532330b11751afd184c6b4e43a78c8db650"}
{"level":"info","ts":1623268375.9922645,"caller":"app/server.go:564","msg":"Enterprise Build","enterprise_build":true}
{"level":"info","ts":1623268375.9922807,"caller":"app/server.go:570","msg":"Printing current working","directory":"/opt/mattermost"}
{"level":"info","ts":1623268375.99229,"caller":"app/server.go:571","msg":"Loaded config","source":"file:///opt/mattermost/config/config.json"}
{"level":"info","ts":1623268376.2943454,"caller":"app/server.go:1102","msg":"Starting Server..."}
{"level":"info","ts":1623268376.2947636,"caller":"app/server.go:1178","msg":"Server is listening on [::]:8065","address":"[::]:8065"}
{"level":"info","ts":1623268376.3051145,"caller":"jobs/workers.go:135","msg":"Starting workers"}
{"level":"info","ts":1623268376.312941,"caller":"app/license.go:68","msg":"License key from https://mattermost.com required to unlock enterprise features."}
{"level":"info","ts":1623268376.3430161,"caller":"jobs/schedulers.go:116","msg":"Starting schedulers."}
{"level":"info","ts":1623268381.0602334,"caller":"sqlstore/post_store.go:1976","msg":"Post.Message has size restrictions","max_characters":16383,"max_bytes":65535}
{"level":"warn","ts":1623268390.3906353,"caller":"api4/config.go:335","msg":"Unrecognized config permissions tag value.","tag_value":"sysconsole_write_*_read"}
{"level":"info","ts":1623268390.4172456,"caller":"mlog/log.go:233","msg":"Starting up plugins"}
{"level":"info","ts":1623268390.4173152,"caller":"app/plugin.go:233","msg":"Syncing plugins from the file store"}
{"level":"info","ts":1623268397.8962715,"caller":"app/server.go:911","msg":"Stopping Server..."}
{"level":"info","ts":1623268397.8963764,"caller":"app/web_hub.go:103","msg":"stopping websocket hub connections"}
{"level":"info","ts":1623268397.901213,"caller":"app/plugin.go:310","msg":"Shutting down plugins"}
{"level":"info","ts":1623268398.4066904,"caller":"bleveengine/bleve.go:214","msg":"Stopping Bleve"}
{"level":"info","ts":1623268398.4147446,"caller":"jobs/workers.go:339","msg":"Stopped workers"}
{"level":"info","ts":1623268398.4147983,"caller":"jobs/schedulers.go:187","msg":"Stopping schedulers."}
{"level":"info","ts":1623268398.414809,"caller":"jobs/schedulers.go:119","msg":"Schedulers stopped."}
{"level":"info","ts":1623268398.415017,"caller":"app/server.go:997","msg":"Server stopped"}

FYI on this @streamer45

Hey @emilushi

You mentioned at first that it works fine when you start it with sudo -u mattermost ./bin/mattermost. But from the logs you showed, it looks like the server is starting and then stopping right after. Is this the case with the systemctl start or the manual start?

If this is happening only with systemctl start, would you be able to set the log level to DEBUG and paste the output again?

Also, can you paste your init file here just for completeness?

Thanks!

Hello @agnivade,
Thanks for your replay.

Here is the detailed logs when I start directly from ./bin/mattermost

2021-06-10T09:00:17.092Z	info	app/server.go:245	Server is initializing...	{"go_version": "go1.15.5"}
2021-06-10T09:00:17.092Z	info	app/web_hub.go:83	Starting websocket hubs	{"number_of_hubs": 2}
2021-06-10T09:00:17.093Z	info	bleveengine/bleve.go:182	EXPERIMENTAL: Starting Bleve
2021-06-10T09:00:17.103Z	info	i18n/i18n.go:93	Loaded system translations	{"for locale": "en", "from locale": "/opt/mattermost/i18n/en.json"}
2021-06-10T09:00:17.118Z	info	sqlstore/store.go:282	Pinging SQL	{"database": "master"}
2021-06-10T09:00:17.122Z	debug	app/web_hub.go:388	Hub is starting	{"index": 0}
2021-06-10T09:00:17.122Z	debug	app/web_hub.go:388	Hub is starting	{"index": 1}
2021-06-10T09:00:17.152Z	info	sqlstore/store.go:282	Pinging SQL	{"database": "migrations"}
2021-06-10T09:00:17.228Z	debug	sqlstore/preference_store.go:42	Deleting any unused pre-release features
2021-06-10T09:00:17.233Z	debug	utils/license.go:83	We could not find the license key in the database or on disk at	{"filename": "/opt/mattermost/config/mattermost.mattermost-license"}
2021-06-10T09:00:17.234Z	info	app/license.go:68	License key from https://mattermost.com required to unlock enterprise features.
2021-06-10T09:00:17.239Z	error	app/server.go:512	Mail server connection test is failed	{"error": "SendEmailNotifications is not true", "errorVerbose": "SendEmailNotifications is not true\ngithub.com/mattermost/mattermost-server/v5/shared/mail.TestConnection\n\tgithub.com/mattermost/mattermost-server/v5/shared/mail/mail.go:212\ngithub.com/mattermost/mattermost-server/v5/app.NewServer\n\tgithub.com/mattermost/mattermost-server/v5/app/server.go:511\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.runServer\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/server.go:77\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.serverCmdF\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/server.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:852\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.1.3/command.go:960\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:897\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.Run\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/root.go:14\nmain.main\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/main.go:31\nruntime.main\n\truntime/proc.go:204\nruntime.goexit\n\truntime/asm_amd64.s:1374"}
2021-06-10T09:00:17.239Z	debug	filestore/localstore.go:78	Able to write files to local storage.
2021-06-10T09:00:17.240Z	info	app/server.go:555	Current version is 5.35.0 (5.35.2/Wed Jun  2 07:57:23 UTC 2021/208cbac8e0fb459844ae01cd72c11dd7eda6b182/6559a532330b11751afd184c6b4e43a78c8db650)	{"current_version": "5.35.0", "build_number": "5.35.2", "build_date": "Wed Jun  2 07:57:23 UTC 2021", "build_hash": "208cbac8e0fb459844ae01cd72c11dd7eda6b182", "build_hash_enterprise": "6559a532330b11751afd184c6b4e43a78c8db650"}
2021-06-10T09:00:17.240Z	info	app/server.go:564	Enterprise Build	{"enterprise_build": true}
2021-06-10T09:00:17.240Z	info	app/server.go:570	Printing current working	{"directory": "/opt/mattermost"}
2021-06-10T09:00:17.240Z	info	app/server.go:571	Loaded config	{"source": "file:///opt/mattermost/config/config.json"}
2021-06-10T09:00:17.263Z	debug	app/server.go:882	Advanced logging metrics enabled
2021-06-10T09:00:17.278Z	debug	api4/plugin.go:28	EXPERIMENTAL: Initializing plugin api
2021-06-10T09:00:17.280Z	debug	app/product_notices.go:351	Will fetch notices from	{"url": "https://notices.mattermost.com/", "skip_cache": false}
2021-06-10T09:00:17.285Z	debug	web/web.go:28	Initializing web routes
2021-06-10T09:00:17.286Z	debug	utils/subpath.go:84	Rewriting static assets	{"from_subpath": "/", "to_subpath": "/"}
2021-06-10T09:00:17.343Z	debug	web/static.go:29	Using client directory	{"clientDir": "/opt/mattermost/client"}
2021-06-10T09:00:17.352Z	info	app/server.go:1102	Starting Server...
2021-06-10T09:00:17.352Z	info	app/server.go:1178	Server is listening on [::]:8065	{"address": "[::]:8065"}
2021-06-10T09:00:17.353Z	debug	app/server.go:818	No license provided; Remote Cluster services disabled
2021-06-10T09:00:17.353Z	debug	app/enterprise.go:216	Loading SAML2 library
2021-06-10T09:00:17.364Z	debug	jobs/schedulers.go:41	Initialising schedulers.
2021-06-10T09:00:17.377Z	info	mlog/log.go:233	Starting up plugins
2021-06-10T09:00:17.377Z	info	app/plugin.go:233	Syncing plugins from the file store
2021-06-10T09:00:17.385Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-zoom-v1.5.0-linux-amd64.tar.gz"}
2021-06-10T09:00:17.394Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-antivirus-v0.1.2-linux-amd64.tar.gz"}
2021-06-10T09:00:17.421Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-channel-export-v0.2.2-linux-amd64.tar.gz"}
2021-06-10T09:00:17.434Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-custom-attributes-v1.3.0-linux-amd64.tar.gz"}
2021-06-10T09:00:17.455Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-github-v2.0.1-linux-amd64.tar.gz"}
2021-06-10T09:00:17.475Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-jenkins-v1.1.0-linux-amd64.tar.gz"}
2021-06-10T09:00:17.495Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-jira-v2.4.0-linux-amd64.tar.gz"}
2021-06-10T09:00:17.515Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-nps-v1.1.0-linux-amd64.tar.gz"}
2021-06-10T09:00:17.515Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-autolink-v1.2.2-linux-amd64.tar.gz"}
2021-06-10T09:00:17.533Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-aws-SNS-v1.2.0-linux-amd64.tar.gz"}
2021-06-10T09:00:17.533Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-gitlab-v1.3.0-linux-amd64.tar.gz"}
2021-06-10T09:00:17.533Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-incident-collaboration-v1.9.3-linux-amd64.tar.gz"}
2021-06-10T09:00:17.533Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-welcomebot-v1.2.0-linux-amd64.tar.gz"}
2021-06-10T09:00:21.016Z	info	jobs/workers.go:135	Starting workers
2021-06-10T09:00:21.017Z	debug	utils/license.go:83	We could not find the license key in the database or on disk at	{"filename": "/opt/mattermost/config/mattermost.mattermost-license"}
2021-06-10T09:00:21.029Z	debug	migrations/worker.go:44	Worker started	{"worker": "Migrations"}
2021-06-10T09:00:21.029Z	debug	scheduler/worker.go:36	Worker started	{"worker": "Plugins"}
2021-06-10T09:00:21.029Z	debug	indexer/indexing_job.go:96	Worker Started	{"workername": "BleveIndexer"}
2021-06-10T09:00:21.029Z	debug	expirynotify/worker.go:39	Worker started	{"worker": "ExpiryNotify"}
2021-06-10T09:00:21.030Z	debug	active_users/worker.go:52	Worker started	{"worker": "ActiveUsers"}
2021-06-10T09:00:21.030Z	debug	product_notices/worker.go:39	Worker started	{"worker": "ProductNotices"}
2021-06-10T09:00:21.030Z	debug	import_process/worker.go:58	Worker started	{"worker": "ImportProcess"}
2021-06-10T09:00:21.030Z	debug	import_delete/worker.go:54	Worker started	{"worker": "ImportDelete"}
2021-06-10T09:00:21.030Z	debug	export_process/worker.go:52	Worker started	{"worker": "ExportProcess"}
2021-06-10T09:00:21.030Z	debug	export_delete/worker.go:52	Worker started	{"worker": "ExportDelete"}
2021-06-10T09:00:21.030Z	debug	cloud/worker.go:56	Worker started	{"worker": "Cloud"}
2021-06-10T09:00:21.030Z	debug	resend_invitation_email/worker.go:38	Worker started	{"worker": "ResendInvitationEmailJob"}
2021-06-10T09:00:21.030Z	debug	jobs/jobs_watcher.go:38	Watcher Started
2021-06-10T09:00:21.030Z	info	jobs/schedulers.go:116	Starting schedulers.
2021-06-10T09:00:21.022Z	debug	sqlstore/session_store.go:283	Cleaning up session store.
2021-06-10T09:00:21.022Z	debug	sqlstore/tokens_store.go:70	Cleaning up token store.
2021-06-10T09:00:21.022Z	debug	sqlstore/command_webhook_store.go:106	Cleaning up command webhook store.
2021-06-10T09:00:21.082Z	info	app/license.go:68	License key from https://mattermost.com required to unlock enterprise features.
2021-06-10T09:00:21.082Z	debug	app/server.go:882	Advanced logging metrics enabled
2021-06-10T09:00:21.083Z	debug	app/server.go:1695	License cannot be found.
2021-06-10T09:00:21.087Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "MigrationsScheduler", "next_runtime": "2021-06-10 09:01:21.087656674 +0000 UTC m=+64.355022077"}
2021-06-10T09:00:21.093Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "PluginsScheduler", "next_runtime": "2021-06-11 09:00:21.0931005 +0000 UTC m=+86404.360465902"}
2021-06-10T09:00:21.107Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "ExpiryNotifyScheduler", "next_runtime": "2021-06-10 09:10:21.107368312 +0000 UTC m=+604.374733732"}
2021-06-10T09:00:21.113Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "ProductNoticesScheduler", "next_runtime": "2021-06-10 10:00:21.113269396 +0000 UTC m=+3604.380634854"}
2021-06-10T09:00:21.114Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "ImportDeleteScheduler", "next_runtime": "2021-06-11 09:00:21.114916004 +0000 UTC m=+86404.382281393"}
2021-06-10T09:00:21.116Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "ExportDeleteScheduler", "next_runtime": "2021-06-11 09:00:21.116029835 +0000 UTC m=+86404.383395222"}

And here is the mattermost.service

[Unit]
Description=Mattermost
After=network.target
After=postgresql.service
BindsTo=postgresql.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

EnvironmentFile=/etc/mattermost/mmomni.mattermost.env

[Install]
WantedBy=postgresql.service

And this is the config.json

{
    "ServiceSettings": {
        "SiteURL": "https://connectit.me",
        "WebsocketURL": "",
        "LicenseFileLocation": "",
        "ListenAddress": ":8065",
        "ConnectionSecurity": "",
        "TLSCertFile": "",
        "TLSKeyFile": "",
        "TLSMinVer": "1.2",
        "TLSStrictTransport": false,
        "TLSStrictTransportMaxAge": 63072000,
        "TLSOverwriteCiphers": [],
        "UseLetsEncrypt": false,
        "LetsEncryptCertificateCacheFile": "./config/letsencrypt.cache",
        "Forward80To443": false,
        "TrustedProxyIPHeader": [],
        "ReadTimeout": 300,
        "WriteTimeout": 300,
        "IdleTimeout": 60,
        "MaximumLoginAttempts": 10,
        "GoroutineHealthThreshold": -1,
        "EnableOAuthServiceProvider": false,
        "EnableIncomingWebhooks": false,
        "EnableOutgoingWebhooks": false,
        "EnableCommands": true,
        "EnablePostUsernameOverride": false,
        "EnablePostIconOverride": false,
        "GoogleDeveloperKey": "",
        "EnableOnlyAdminIntegrations": true,
        "EnableLinkPreviews": true,
        "RestrictLinkPreviews": "",
        "EnableTesting": false,
        "EnableDeveloper": false,
        "EnableOpenTracing": false,
        "EnableSecurityFixAlert": true,
        "EnableInsecureOutgoingConnections": false,
        "AllowedUntrustedInternalConnections": "",
        "EnableMultifactorAuthentication": false,
        "EnforceMultifactorAuthentication": false,
        "EnableUserAccessTokens": false,
        "AllowCorsFrom": "",
        "CorsExposedHeaders": "",
        "CorsAllowCredentials": false,
        "CorsDebug": false,
        "AllowCookiesForSubdomains": false,
        "ExtendSessionLengthWithActivity": true,
        "SessionLengthWebInDays": 30,
        "SessionLengthMobileInDays": 30,
        "SessionLengthSSOInDays": 30,
        "SessionCacheInMinutes": 10,
        "SessionIdleTimeoutInMinutes": 43200,
        "WebsocketSecurePort": 443,
        "WebsocketPort": 80,
        "WebserverMode": "gzip",
        "EnableGifPicker": true,
        "GfycatApiKey": "2_KtH_W5",
        "GfycatApiSecret": "3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof",
        "EnableCustomEmoji": true,
        "EnableEmojiPicker": true,
        "RestrictCustomEmojiCreation": "all",
        "RestrictPostDelete": "all",
        "AllowEditPost": "always",
        "PostEditTimeLimit": -1,
        "TimeBetweenUserTypingUpdatesMilliseconds": 5000,
        "EnablePostSearch": true,
        "EnableFileSearch": true,
        "MinimumHashtagLength": 3,
        "EnableUserTypingMessages": true,
        "EnableChannelViewedMessages": true,
        "EnableUserStatuses": true,
        "ExperimentalEnableAuthenticationTransfer": true,
        "ClusterLogTimeoutMilliseconds": 2000,
        "CloseUnusedDirectMessages": false,
        "EnablePreviewFeatures": true,
        "EnableTutorial": true,
        "ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
        "ExperimentalGroupUnreadChannels": "disabled",
        "ExperimentalChannelOrganization": false,
        "ImageProxyType": "",
        "ImageProxyURL": "",
        "ImageProxyOptions": "",
        "EnableAPITeamDeletion": false,
        "EnableAPIUserDeletion": false,
        "ExperimentalEnableHardenedMode": false,
        "DisableLegacyMFA": true,
        "ExperimentalStrictCSRFEnforcement": false,
        "EnableEmailInvitations": false,
        "DisableBotsWhenOwnerIsDeactivated": true,
        "EnableBotAccountCreation": false,
        "EnableSVGs": false,
        "EnableLatex": false,
        "EnableAPIChannelDeletion": false,
        "EnableLocalMode": false,
        "LocalModeSocketLocation": "/var/tmp/mattermost_local.socket",
        "EnableAWSMetering": false,
        "SplitKey": "",
        "FeatureFlagSyncIntervalSeconds": 30,
        "DebugSplit": false,
        "ThreadAutoFollow": true,
        "CollapsedThreads": "disabled",
        "ManagedResourcePaths": "",
        "EnableLegacySidebar": false,
        "EnableReliableWebSockets": false
    },
    "TeamSettings": {
        "SiteName": "ConnectIT Communication App",
        "MaxUsersPerTeam": 500,
        "EnableTeamCreation": true,
        "EnableUserCreation": true,
        "EnableOpenServer": false,
        "EnableUserDeactivation": false,
        "RestrictCreationToDomains": "",
        "EnableCustomUserStatuses": true,
        "EnableCustomBrand": false,
        "CustomBrandText": "",
        "CustomDescriptionText": "",
        "RestrictDirectMessage": "any",
        "RestrictTeamInvite": "all",
        "RestrictPublicChannelManagement": "all",
        "RestrictPrivateChannelManagement": "all",
        "RestrictPublicChannelCreation": "all",
        "RestrictPrivateChannelCreation": "all",
        "RestrictPublicChannelDeletion": "all",
        "RestrictPrivateChannelDeletion": "all",
        "RestrictPrivateChannelManageMembers": "all",
        "EnableXToLeaveChannelsFromLHS": false,
        "UserStatusAwayTimeout": 300,
        "MaxChannelsPerTeam": 2000,
        "MaxNotificationsPerChannel": 1000000,
        "EnableConfirmNotificationsToChannel": false,
        "TeammateNameDisplay": "username",
        "ExperimentalViewArchivedChannels": true,
        "ExperimentalEnableAutomaticReplies": false,
        "ExperimentalHideTownSquareinLHS": false,
        "ExperimentalTownSquareIsReadOnly": false,
        "LockTeammateNameDisplay": false,
        "ExperimentalPrimaryTeam": "",
        "ExperimentalDefaultChannels": []
    },
    "ClientRequirements": {
        "AndroidLatestVersion": "",
        "AndroidMinVersion": "",
        "DesktopLatestVersion": "",
        "DesktopMinVersion": "",
        "IosLatestVersion": "",
        "IosMinVersion": ""
    },
    "SqlSettings": {
        "DriverName": "postgres",
        "DataSource": "postgres://mmuser:kLm173082@localhost/mattermost?sslmode=disable\u0026connect_timeout=10",
        "DataSourceReplicas": [],
        "DataSourceSearchReplicas": [],
        "MaxIdleConns": 20,
        "ConnMaxLifetimeMilliseconds": 3600000,
        "ConnMaxIdleTimeMilliseconds": 300000,
        "MaxOpenConns": 300,
        "Trace": false,
        "AtRestEncryptKey": "zam83kb3jyhs5jokkaksxtfnkp1kt85i",
        "QueryTimeout": 30,
        "DisableDatabaseSearch": false,
        "ReplicaLagSettings": []
    },
    "LogSettings": {
        "EnableConsole": true,
        "ConsoleLevel": "DEBUG",
        "ConsoleJson": false,
        "EnableFile": true,
        "FileLevel": "INFO",
        "FileJson": true,
        "FileLocation": "",
        "EnableWebhookDebugging": true,
        "EnableDiagnostics": true,
        "EnableSentry": true,
        "AdvancedLoggingConfig": ""
    },
    "ExperimentalAuditSettings": {
        "FileEnabled": false,
        "FileName": "",
        "FileMaxSizeMB": 100,
        "FileMaxAgeDays": 0,
        "FileMaxBackups": 0,
        "FileCompress": false,
        "FileMaxQueueSize": 1000,
        "AdvancedLoggingConfig": ""
    },
    "NotificationLogSettings": {
        "EnableConsole": true,
        "ConsoleLevel": "INFO",
        "ConsoleJson": true,
        "EnableFile": true,
        "FileLevel": "INFO",
        "FileJson": true,
        "FileLocation": "",
        "AdvancedLoggingConfig": ""
    },
    "PasswordSettings": {
        "MinimumLength": 10,
        "Lowercase": true,
        "Number": true,
        "Uppercase": true,
        "Symbol": true
    },
    "FileSettings": {
        "EnableFileAttachments": true,
        "EnableMobileUpload": true,
        "EnableMobileDownload": true,
        "MaxFileSize": 52428800,
        "DriverName": "local",
        "Directory": "./data/",
        "EnablePublicLink": false,
        "ExtractContent": false,
        "ArchiveRecursion": false,
        "PublicLinkSalt": "jqpk7bo3cs4adxbppr6hod95qpbtta87",
        "InitialFont": "nunito-bold.ttf",
        "AmazonS3AccessKeyId": "",
        "AmazonS3SecretAccessKey": "",
        "AmazonS3Bucket": "",
        "AmazonS3PathPrefix": "",
        "AmazonS3Region": "",
        "AmazonS3Endpoint": "s3.amazonaws.com",
        "AmazonS3SSL": false,
        "AmazonS3SignV2": false,
        "AmazonS3SSE": false,
        "AmazonS3Trace": false
    },
    "EmailSettings": {
        "EnableSignUpWithEmail": true,
        "EnableSignInWithEmail": true,
        "EnableSignInWithUsername": true,
        "SendEmailNotifications": false,
        "UseChannelInEmailNotifications": false,
        "RequireEmailVerification": false,
        "FeedbackName": "",
        "FeedbackEmail": "",
        "ReplyToAddress": "",
        "FeedbackOrganization": "",
        "EnableSMTPAuth": false,
        "SMTPUsername": "",
        "SMTPPassword": "",
        "SMTPServer": "localhost",
        "SMTPPort": "10025",
        "SMTPServerTimeout": 10,
        "ConnectionSecurity": "",
        "SendPushNotifications": true,
        "PushNotificationServer": "https://push-test.mattermost.com",
        "PushNotificationContents": "full",
        "PushNotificationBuffer": 1000,
        "EnableEmailBatching": false,
        "EmailBatchingBufferSize": 256,
        "EmailBatchingInterval": 30,
        "EnablePreviewModeBanner": false,
        "SkipServerCertificateVerification": false,
        "EmailNotificationContentsType": "full",
        "LoginButtonColor": "#0000",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#2389D7"
    },
    "RateLimitSettings": {
        "Enable": false,
        "PerSec": 10,
        "MaxBurst": 100,
        "MemoryStoreSize": 10000,
        "VaryByRemoteAddr": true,
        "VaryByUser": false,
        "VaryByHeader": ""
    },
    "PrivacySettings": {
        "ShowEmailAddress": true,
        "ShowFullName": true
    },
    "SupportSettings": {
        "TermsOfServiceLink": "https://about.mattermost.com/default-terms/",
        "PrivacyPolicyLink": "https://about.mattermost.com/default-privacy-policy/",
        "AboutLink": "https://about.mattermost.com/default-about/",
        "HelpLink": "https://about.mattermost.com/default-help/",
        "ReportAProblemLink": "https://about.mattermost.com/default-report-a-problem/",
        "SupportEmail": "feedback@mattermost.com",
        "CustomTermsOfServiceEnabled": false,
        "CustomTermsOfServiceReAcceptancePeriod": 365,
        "EnableAskCommunityLink": false
    },
    "AnnouncementSettings": {
        "EnableBanner": false,
        "BannerText": "",
        "BannerColor": "#f2a93b",
        "BannerTextColor": "#333333",
        "AllowBannerDismissal": true,
        "AdminNoticesEnabled": true,
        "UserNoticesEnabled": true,
        "NoticesURL": "https://notices.mattermost.com/",
        "NoticesFetchFrequency": 3600,
        "NoticesSkipCache": false
    },
    "ThemeSettings": {
        "EnableThemeSelection": true,
        "DefaultTheme": "default",
        "AllowCustomThemes": true,
        "AllowedThemes": []
    },
    "GitLabSettings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "",
        "AuthEndpoint": "",
        "TokenEndpoint": "",
        "UserApiEndpoint": "",
        "DiscoveryEndpoint": "",
        "ButtonText": "",
        "ButtonColor": ""
    },
    "GoogleSettings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "profile email",
        "AuthEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
        "TokenEndpoint": "https://www.googleapis.com/oauth2/v4/token",
        "UserApiEndpoint": "https://people.googleapis.com/v1/people/me?personFields=names,emailAddresses,nicknames,metadata",
        "DiscoveryEndpoint": "",
        "ButtonText": "",
        "ButtonColor": ""
    },
    "Office365Settings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "User.Read",
        "AuthEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
        "TokenEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
        "UserApiEndpoint": "https://graph.microsoft.com/v1.0/me",
        "DiscoveryEndpoint": "",
        "DirectoryId": ""
    },
    "OpenIdSettings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "profile openid email",
        "AuthEndpoint": "",
        "TokenEndpoint": "",
        "UserApiEndpoint": "",
        "DiscoveryEndpoint": "",
        "ButtonText": "",
        "ButtonColor": "#145DBF"
    },
    "LdapSettings": {
        "Enable": false,
        "EnableSync": false,
        "LdapServer": "",
        "LdapPort": 389,
        "ConnectionSecurity": "",
        "BaseDN": "",
        "BindUsername": "",
        "BindPassword": "",
        "UserFilter": "",
        "GroupFilter": "",
        "GuestFilter": "",
        "EnableAdminFilter": false,
        "AdminFilter": "",
        "GroupDisplayNameAttribute": "",
        "GroupIdAttribute": "",
        "FirstNameAttribute": "",
        "LastNameAttribute": "",
        "EmailAttribute": "",
        "UsernameAttribute": "",
        "NicknameAttribute": "",
        "IdAttribute": "",
        "PositionAttribute": "",
        "LoginIdAttribute": "",
        "PictureAttribute": "",
        "SyncIntervalMinutes": 60,
        "SkipCertificateVerification": false,
        "PublicCertificateFile": "",
        "PrivateKeyFile": "",
        "QueryTimeout": 60,
        "MaxPageSize": 0,
        "LoginFieldName": "",
        "LoginButtonColor": "#0000",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#2389D7",
        "Trace": false
    },
    "ComplianceSettings": {
        "Enable": false,
        "Directory": "./data/",
        "EnableDaily": false
    },
    "LocalizationSettings": {
        "DefaultServerLocale": "en",
        "DefaultClientLocale": "en",
        "AvailableLocales": "en"
    },
    "SamlSettings": {
        "Enable": false,
        "EnableSyncWithLdap": false,
        "EnableSyncWithLdapIncludeAuth": false,
        "IgnoreGuestsLdapSync": false,
        "Verify": true,
        "Encrypt": true,
        "SignRequest": false,
        "IdpUrl": "",
        "IdpDescriptorUrl": "",
        "IdpMetadataUrl": "",
        "ServiceProviderIdentifier": "",
        "AssertionConsumerServiceURL": "",
        "SignatureAlgorithm": "RSAwithSHA1",
        "CanonicalAlgorithm": "Canonical1.0",
        "ScopingIDPProviderId": "",
        "ScopingIDPName": "",
        "IdpCertificateFile": "",
        "PublicCertificateFile": "",
        "PrivateKeyFile": "",
        "IdAttribute": "",
        "GuestAttribute": "",
        "EnableAdminAttribute": false,
        "AdminAttribute": "",
        "FirstNameAttribute": "",
        "LastNameAttribute": "",
        "EmailAttribute": "",
        "UsernameAttribute": "",
        "NicknameAttribute": "",
        "LocaleAttribute": "",
        "PositionAttribute": "",
        "LoginButtonText": "SAML",
        "LoginButtonColor": "#34a28b",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#ffffff"
    },
    "NativeAppSettings": {
        "AppCustomURLSchemes": [
            "mmauth://",
            "mmauthbeta://"
        ],
        "AppDownloadLink": "https://mattermost.com/download/#mattermostApps",
        "AndroidAppDownloadLink": "https://about.mattermost.com/mattermost-android-app/",
        "IosAppDownloadLink": "https://about.mattermost.com/mattermost-ios-app/"
    },
    "ClusterSettings": {
        "Enable": false,
        "ClusterName": "",
        "OverrideHostname": "",
        "NetworkInterface": "",
        "BindAddress": "",
        "AdvertiseAddress": "",
        "UseIpAddress": true,
        "UseExperimentalGossip": false,
        "EnableGossipCompression": true,
        "EnableExperimentalGossipEncryption": false,
        "ReadOnlyConfig": true,
        "GossipPort": 8074,
        "StreamingPort": 8075,
        "MaxIdleConns": 100,
        "MaxIdleConnsPerHost": 128,
        "IdleConnTimeoutMilliseconds": 90000
    },
    "MetricsSettings": {
        "Enable": false,
        "BlockProfileRate": 0,
        "ListenAddress": ":8067"
    },
    "ExperimentalSettings": {
        "ClientSideCertEnable": false,
        "ClientSideCertCheck": "secondary",
        "EnableClickToReply": false,
        "LinkMetadataTimeoutMilliseconds": 5000,
        "RestrictSystemAdmin": false,
        "UseNewSAMLLibrary": false,
        "CloudUserLimit": 0,
        "CloudBilling": false,
        "EnableSharedChannels": false,
        "EnableRemoteClusterService": false
    },
    "AnalyticsSettings": {
        "MaxUsersForStatistics": 2500
    },
    "ElasticsearchSettings": {
        "ConnectionUrl": "http://localhost:9200",
        "Username": "elastic",
        "Password": "changeme",
        "EnableIndexing": false,
        "EnableSearching": false,
        "EnableAutocomplete": false,
        "Sniff": true,
        "PostIndexReplicas": 1,
        "PostIndexShards": 1,
        "ChannelIndexReplicas": 1,
        "ChannelIndexShards": 1,
        "UserIndexReplicas": 1,
        "UserIndexShards": 1,
        "AggregatePostsAfterDays": 365,
        "PostsAggregatorJobStartTime": "03:00",
        "IndexPrefix": "",
        "LiveIndexingBatchSize": 1,
        "BulkIndexingTimeWindowSeconds": 3600,
        "RequestTimeoutSeconds": 30,
        "SkipTLSVerification": false,
        "Trace": ""
    },
    "BleveSettings": {
        "IndexDir": "/var/opt/mattermost/bleveindexes",
        "EnableIndexing": true,
        "EnableSearching": false,
        "EnableAutocomplete": false,
        "BulkIndexingTimeWindowSeconds": 3600
    },
    "DataRetentionSettings": {
        "EnableMessageDeletion": false,
        "EnableFileDeletion": false,
        "MessageRetentionDays": 365,
        "FileRetentionDays": 365,
        "DeletionJobStartTime": "02:00"
    },
    "MessageExportSettings": {
        "EnableExport": false,
        "ExportFormat": "actiance",
        "DailyRunTime": "01:00",
        "ExportFromTimestamp": 0,
        "BatchSize": 10000,
        "DownloadExportResults": false,
        "GlobalRelaySettings": {
            "CustomerType": "A9",
            "SmtpUsername": "",
            "SmtpPassword": "",
            "EmailAddress": "",
            "SMTPServerTimeout": 1800
        }
    },
    "JobSettings": {
        "RunJobs": true,
        "RunScheduler": true
    },
    "PluginSettings": {
        "Enable": true,
        "EnableUploads": false,
        "AllowInsecureDownloadUrl": false,
        "EnableHealthCheck": true,
        "Directory": "./plugins",
        "ClientDirectory": "./client/plugins",
        "Plugins": {},
        "PluginStates": {
            "com.mattermost.nps": {
                "Enable": true
            },
            "com.mattermost.plugin-channel-export": {
                "Enable": true
            },
            "com.mattermost.plugin-incident-management": {
                "Enable": true
            }
        },
        "EnableMarketplace": false,
        "EnableRemoteMarketplace": false,
        "AutomaticPrepackagedPlugins": false,
        "RequirePluginSignature": false,
        "MarketplaceUrl": "https://api.integrations.mattermost.com",
        "SignaturePublicKeyFiles": []
    },
    "DisplaySettings": {
        "CustomUrlSchemes": [],
        "ExperimentalTimezone": true
    },
    "GuestAccountsSettings": {
        "Enable": false,
        "AllowEmailAccounts": true,
        "EnforceMultifactorAuthentication": false,
        "RestrictCreationToDomains": ""
    },
    "ImageProxySettings": {
        "Enable": false,
        "ImageProxyType": "local",
        "RemoteImageProxyURL": "",
        "RemoteImageProxyOptions": ""
    },
    "CloudSettings": {
        "CWSUrl": "https://customers.mattermost.com",
        "CWSAPIUrl": "https://portal.internal.prod.cloud.mattermost.com"
    },
    "ImportSettings": {
        "Directory": "./import",
        "RetentionDays": 30
    },
    "ExportSettings": {
        "Directory": "./export",
        "RetentionDays": 30
    }
}

Hello @agnivade, thanks for your replay.
Please find below: log file after starting the server from ./bin/matermost/, the mattermost.service content and the config.json content.

  1. Log output:
2021-06-10T09:12:39.378Z	info	app/server.go:245	Server is initializing...	{"go_version": "go1.15.5"}
2021-06-10T09:12:39.379Z	info	app/web_hub.go:83	Starting websocket hubs	{"number_of_hubs": 2}
2021-06-10T09:12:39.379Z	info	bleveengine/bleve.go:182	EXPERIMENTAL: Starting Bleve
2021-06-10T09:12:39.388Z	info	i18n/i18n.go:93	Loaded system translations	{"for locale": "en", "from locale": "/opt/mattermost/i18n/en.json"}
2021-06-10T09:12:39.392Z	info	sqlstore/store.go:282	Pinging SQL	{"database": "master"}
2021-06-10T09:12:39.408Z	debug	app/web_hub.go:388	Hub is starting	{"index": 0}
2021-06-10T09:12:39.408Z	debug	app/web_hub.go:388	Hub is starting	{"index": 1}
2021-06-10T09:12:39.412Z	info	sqlstore/store.go:282	Pinging SQL	{"database": "migrations"}
2021-06-10T09:12:39.531Z	debug	sqlstore/preference_store.go:42	Deleting any unused pre-release features
2021-06-10T09:12:39.535Z	debug	utils/license.go:83	We could not find the license key in the database or on disk at	{"filename": "/opt/mattermost/config/mattermost.mattermost-license"}
2021-06-10T09:12:39.536Z	info	app/license.go:68	License key from https://mattermost.com required to unlock enterprise features.
2021-06-10T09:12:39.542Z	error	app/server.go:512	Mail server connection test is failed	{"error": "SendEmailNotifications is not true", "errorVerbose": "SendEmailNotifications is not true\ngithub.com/mattermost/mattermost-server/v5/shared/mail.TestConnection\n\tgithub.com/mattermost/mattermost-server/v5/shared/mail/mail.go:212\ngithub.com/mattermost/mattermost-server/v5/app.NewServer\n\tgithub.com/mattermost/mattermost-server/v5/app/server.go:511\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.runServer\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/server.go:77\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.serverCmdF\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/server.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:852\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.1.3/command.go:960\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:897\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.Run\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/root.go:14\nmain.main\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/main.go:31\nruntime.main\n\truntime/proc.go:204\nruntime.goexit\n\truntime/asm_amd64.s:1374"}
2021-06-10T09:12:39.543Z	debug	filestore/localstore.go:78	Able to write files to local storage.
2021-06-10T09:12:39.543Z	info	app/server.go:555	Current version is 5.35.0 (5.35.2/Wed Jun  2 07:57:23 UTC 2021/208cbac8e0fb459844ae01cd72c11dd7eda6b182/6559a532330b11751afd184c6b4e43a78c8db650)	{"current_version": "5.35.0", "build_number": "5.35.2", "build_date": "Wed Jun  2 07:57:23 UTC 2021", "build_hash": "208cbac8e0fb459844ae01cd72c11dd7eda6b182", "build_hash_enterprise": "6559a532330b11751afd184c6b4e43a78c8db650"}
2021-06-10T09:12:39.543Z	info	app/server.go:564	Enterprise Build	{"enterprise_build": true}
2021-06-10T09:12:39.543Z	info	app/server.go:570	Printing current working	{"directory": "/opt/mattermost"}
2021-06-10T09:12:39.544Z	info	app/server.go:571	Loaded config	{"source": "file:///opt/mattermost/config/config.json"}
2021-06-10T09:12:39.568Z	debug	app/server.go:882	Advanced logging metrics enabled
2021-06-10T09:12:39.586Z	debug	api4/plugin.go:28	EXPERIMENTAL: Initializing plugin api
2021-06-10T09:12:39.588Z	debug	web/web.go:28	Initializing web routes
2021-06-10T09:12:39.589Z	debug	utils/subpath.go:84	Rewriting static assets	{"from_subpath": "/", "to_subpath": "/"}
2021-06-10T09:12:39.592Z	debug	app/product_notices.go:351	Will fetch notices from	{"url": "https://notices.mattermost.com/", "skip_cache": false}
2021-06-10T09:12:39.612Z	debug	web/static.go:29	Using client directory	{"clientDir": "/opt/mattermost/client"}
2021-06-10T09:12:39.649Z	info	app/server.go:1102	Starting Server...
2021-06-10T09:12:39.650Z	info	app/server.go:1178	Server is listening on [::]:8065	{"address": "[::]:8065"}
2021-06-10T09:12:39.650Z	debug	app/server.go:818	No license provided; Remote Cluster services disabled
2021-06-10T09:12:39.650Z	debug	app/enterprise.go:216	Loading SAML2 library
2021-06-10T09:12:39.652Z	debug	jobs/schedulers.go:41	Initialising schedulers.
2021-06-10T09:12:39.659Z	info	mlog/log.go:233	Starting up plugins
2021-06-10T09:12:39.660Z	info	app/plugin.go:233	Syncing plugins from the file store
2021-06-10T09:12:39.666Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-welcomebot-v1.2.0-linux-amd64.tar.gz"}
2021-06-10T09:12:39.702Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-autolink-v1.2.2-linux-amd64.tar.gz"}
2021-06-10T09:12:39.722Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-aws-SNS-v1.2.0-linux-amd64.tar.gz"}
2021-06-10T09:12:39.726Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-github-v2.0.1-linux-amd64.tar.gz"}
2021-06-10T09:12:39.746Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-incident-collaboration-v1.9.3-linux-amd64.tar.gz"}
2021-06-10T09:12:39.765Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-jenkins-v1.1.0-linux-amd64.tar.gz"}
2021-06-10T09:12:39.775Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-jira-v2.4.0-linux-amd64.tar.gz"}
2021-06-10T09:12:39.791Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-zoom-v1.5.0-linux-amd64.tar.gz"}
2021-06-10T09:12:39.811Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-antivirus-v0.1.2-linux-amd64.tar.gz"}
2021-06-10T09:12:39.831Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-channel-export-v0.2.2-linux-amd64.tar.gz"}
2021-06-10T09:12:39.851Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-custom-attributes-v1.3.0-linux-amd64.tar.gz"}
2021-06-10T09:12:39.871Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-gitlab-v1.3.0-linux-amd64.tar.gz"}
2021-06-10T09:12:39.892Z	debug	app/plugin.go:870	Processing prepackaged plugin	{"path": "/opt/mattermost/prepackaged_plugins/mattermost-plugin-nps-v1.1.0-linux-amd64.tar.gz"}
2021-06-10T09:12:42.955Z	info	jobs/workers.go:135	Starting workers
2021-06-10T09:12:42.956Z	debug	utils/license.go:83	We could not find the license key in the database or on disk at	{"filename": "/opt/mattermost/config/mattermost.mattermost-license"}
2021-06-10T09:12:42.961Z	debug	sqlstore/session_store.go:283	Cleaning up session store.
2021-06-10T09:12:42.961Z	debug	sqlstore/tokens_store.go:70	Cleaning up token store.
2021-06-10T09:12:42.961Z	debug	sqlstore/command_webhook_store.go:106	Cleaning up command webhook store.
2021-06-10T09:12:42.969Z	debug	migrations/worker.go:44	Worker started	{"worker": "Migrations"}
2021-06-10T09:12:42.969Z	debug	scheduler/worker.go:36	Worker started	{"worker": "Plugins"}
2021-06-10T09:12:42.969Z	debug	indexer/indexing_job.go:96	Worker Started	{"workername": "BleveIndexer"}
2021-06-10T09:12:42.969Z	debug	expirynotify/worker.go:39	Worker started	{"worker": "ExpiryNotify"}
2021-06-10T09:12:42.969Z	debug	active_users/worker.go:52	Worker started	{"worker": "ActiveUsers"}
2021-06-10T09:12:42.969Z	debug	product_notices/worker.go:39	Worker started	{"worker": "ProductNotices"}
2021-06-10T09:12:42.969Z	debug	import_process/worker.go:58	Worker started	{"worker": "ImportProcess"}
2021-06-10T09:12:42.969Z	debug	import_delete/worker.go:54	Worker started	{"worker": "ImportDelete"}
2021-06-10T09:12:42.969Z	debug	export_process/worker.go:52	Worker started	{"worker": "ExportProcess"}
2021-06-10T09:12:42.969Z	debug	export_delete/worker.go:52	Worker started	{"worker": "ExportDelete"}
2021-06-10T09:12:42.969Z	debug	cloud/worker.go:56	Worker started	{"worker": "Cloud"}
2021-06-10T09:12:42.969Z	debug	resend_invitation_email/worker.go:38	Worker started	{"worker": "ResendInvitationEmailJob"}
2021-06-10T09:12:42.969Z	debug	jobs/jobs_watcher.go:38	Watcher Started
2021-06-10T09:12:42.970Z	info	jobs/schedulers.go:116	Starting schedulers.
2021-06-10T09:12:43.012Z	info	app/license.go:68	License key from https://mattermost.com required to unlock enterprise features.
2021-06-10T09:12:43.013Z	debug	app/server.go:882	Advanced logging metrics enabled
2021-06-10T09:12:43.013Z	debug	app/server.go:1695	License cannot be found.
2021-06-10T09:12:43.016Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "MigrationsScheduler", "next_runtime": "2021-06-10 09:13:43.016258173 +0000 UTC m=+63.949373924"}
2021-06-10T09:12:43.022Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "PluginsScheduler", "next_runtime": "2021-06-11 09:12:43.02213485 +0000 UTC m=+86403.955250670"}
2021-06-10T09:12:43.034Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "ExpiryNotifyScheduler", "next_runtime": "2021-06-10 09:22:43.034409761 +0000 UTC m=+603.967525511"}
2021-06-10T09:12:43.040Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "ProductNoticesScheduler", "next_runtime": "2021-06-10 10:12:43.040833022 +0000 UTC m=+3603.973948815"}
2021-06-10T09:12:43.042Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "ImportDeleteScheduler", "next_runtime": "2021-06-11 09:12:43.042127682 +0000 UTC m=+86403.975243428"}
2021-06-10T09:12:43.043Z	debug	jobs/schedulers.go:216	Next run time for scheduler	{"scheduler_name": "ExportDeleteScheduler", "next_runtime": "2021-06-11 09:12:43.043360301 +0000 UTC m=+86403.976476044"}
  1. mattermost.service content
[Unit]
Description=Mattermost
After=network.target
After=postgresql.service
BindsTo=postgresql.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

EnvironmentFile=/etc/mattermost/mmomni.mattermost.env

[Install]
WantedBy=postgresql.service
  1. config.json content
{
    "ServiceSettings": {
        "SiteURL": "https://connectit.me",
        "WebsocketURL": "",
        "LicenseFileLocation": "",
        "ListenAddress": ":8065",
        "ConnectionSecurity": "",
        "TLSCertFile": "",
        "TLSKeyFile": "",
        "TLSMinVer": "1.2",
        "TLSStrictTransport": false,
        "TLSStrictTransportMaxAge": 63072000,
        "TLSOverwriteCiphers": [],
        "UseLetsEncrypt": false,
        "LetsEncryptCertificateCacheFile": "./config/letsencrypt.cache",
        "Forward80To443": false,
        "TrustedProxyIPHeader": [],
        "ReadTimeout": 300,
        "WriteTimeout": 300,
        "IdleTimeout": 60,
        "MaximumLoginAttempts": 10,
        "GoroutineHealthThreshold": -1,
        "EnableOAuthServiceProvider": false,
        "EnableIncomingWebhooks": false,
        "EnableOutgoingWebhooks": false,
        "EnableCommands": true,
        "EnablePostUsernameOverride": false,
        "EnablePostIconOverride": false,
        "GoogleDeveloperKey": "",
        "EnableOnlyAdminIntegrations": true,
        "EnableLinkPreviews": true,
        "RestrictLinkPreviews": "",
        "EnableTesting": false,
        "EnableDeveloper": false,
        "EnableOpenTracing": false,
        "EnableSecurityFixAlert": true,
        "EnableInsecureOutgoingConnections": false,
        "AllowedUntrustedInternalConnections": "",
        "EnableMultifactorAuthentication": false,
        "EnforceMultifactorAuthentication": false,
        "EnableUserAccessTokens": false,
        "AllowCorsFrom": "",
        "CorsExposedHeaders": "",
        "CorsAllowCredentials": false,
        "CorsDebug": false,
        "AllowCookiesForSubdomains": false,
        "ExtendSessionLengthWithActivity": true,
        "SessionLengthWebInDays": 30,
        "SessionLengthMobileInDays": 30,
        "SessionLengthSSOInDays": 30,
        "SessionCacheInMinutes": 10,
        "SessionIdleTimeoutInMinutes": 43200,
        "WebsocketSecurePort": 443,
        "WebsocketPort": 80,
        "WebserverMode": "gzip",
        "EnableGifPicker": true,
        "GfycatApiKey": "2_KtH_W5",
        "GfycatApiSecret": "3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof",
        "EnableCustomEmoji": true,
        "EnableEmojiPicker": true,
        "RestrictCustomEmojiCreation": "all",
        "RestrictPostDelete": "all",
        "AllowEditPost": "always",
        "PostEditTimeLimit": -1,
        "TimeBetweenUserTypingUpdatesMilliseconds": 5000,
        "EnablePostSearch": true,
        "EnableFileSearch": true,
        "MinimumHashtagLength": 3,
        "EnableUserTypingMessages": true,
        "EnableChannelViewedMessages": true,
        "EnableUserStatuses": true,
        "ExperimentalEnableAuthenticationTransfer": true,
        "ClusterLogTimeoutMilliseconds": 2000,
        "CloseUnusedDirectMessages": false,
        "EnablePreviewFeatures": true,
        "EnableTutorial": true,
        "ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
        "ExperimentalGroupUnreadChannels": "disabled",
        "ExperimentalChannelOrganization": false,
        "ImageProxyType": "",
        "ImageProxyURL": "",
        "ImageProxyOptions": "",
        "EnableAPITeamDeletion": false,
        "EnableAPIUserDeletion": false,
        "ExperimentalEnableHardenedMode": false,
        "DisableLegacyMFA": true,
        "ExperimentalStrictCSRFEnforcement": false,
        "EnableEmailInvitations": false,
        "DisableBotsWhenOwnerIsDeactivated": true,
        "EnableBotAccountCreation": false,
        "EnableSVGs": false,
        "EnableLatex": false,
        "EnableAPIChannelDeletion": false,
        "EnableLocalMode": false,
        "LocalModeSocketLocation": "/var/tmp/mattermost_local.socket",
        "EnableAWSMetering": false,
        "SplitKey": "",
        "FeatureFlagSyncIntervalSeconds": 30,
        "DebugSplit": false,
        "ThreadAutoFollow": true,
        "CollapsedThreads": "disabled",
        "ManagedResourcePaths": "",
        "EnableLegacySidebar": false,
        "EnableReliableWebSockets": false
    },
    "TeamSettings": {
        "SiteName": "ConnectIT Communication App",
        "MaxUsersPerTeam": 500,
        "EnableTeamCreation": true,
        "EnableUserCreation": true,
        "EnableOpenServer": false,
        "EnableUserDeactivation": false,
        "RestrictCreationToDomains": "",
        "EnableCustomUserStatuses": true,
        "EnableCustomBrand": false,
        "CustomBrandText": "",
        "CustomDescriptionText": "",
        "RestrictDirectMessage": "any",
        "RestrictTeamInvite": "all",
        "RestrictPublicChannelManagement": "all",
        "RestrictPrivateChannelManagement": "all",
        "RestrictPublicChannelCreation": "all",
        "RestrictPrivateChannelCreation": "all",
        "RestrictPublicChannelDeletion": "all",
        "RestrictPrivateChannelDeletion": "all",
        "RestrictPrivateChannelManageMembers": "all",
        "EnableXToLeaveChannelsFromLHS": false,
        "UserStatusAwayTimeout": 300,
        "MaxChannelsPerTeam": 2000,
        "MaxNotificationsPerChannel": 1000000,
        "EnableConfirmNotificationsToChannel": false,
        "TeammateNameDisplay": "username",
        "ExperimentalViewArchivedChannels": true,
        "ExperimentalEnableAutomaticReplies": false,
        "ExperimentalHideTownSquareinLHS": false,
        "ExperimentalTownSquareIsReadOnly": false,
        "LockTeammateNameDisplay": false,
        "ExperimentalPrimaryTeam": "",
        "ExperimentalDefaultChannels": []
    },
    "ClientRequirements": {
        "AndroidLatestVersion": "",
        "AndroidMinVersion": "",
        "DesktopLatestVersion": "",
        "DesktopMinVersion": "",
        "IosLatestVersion": "",
        "IosMinVersion": ""
    },
    "SqlSettings": {
        "DriverName": "postgres",
        "DataSource": "postgres://mmuser:kLm173082@localhost/mattermost?sslmode=disable\u0026connect_timeout=10",
        "DataSourceReplicas": [],
        "DataSourceSearchReplicas": [],
        "MaxIdleConns": 20,
        "ConnMaxLifetimeMilliseconds": 3600000,
        "ConnMaxIdleTimeMilliseconds": 300000,
        "MaxOpenConns": 300,
        "Trace": false,
        "AtRestEncryptKey": "zam83kb3jyhs5jokkaksxtfnkp1kt85i",
        "QueryTimeout": 30,
        "DisableDatabaseSearch": false,
        "ReplicaLagSettings": []
    },
    "LogSettings": {
        "EnableConsole": true,
        "ConsoleLevel": "DEBUG",
        "ConsoleJson": false,
        "EnableFile": true,
        "FileLevel": "INFO",
        "FileJson": true,
        "FileLocation": "",
        "EnableWebhookDebugging": true,
        "EnableDiagnostics": true,
        "EnableSentry": true,
        "AdvancedLoggingConfig": ""
    },
    "ExperimentalAuditSettings": {
        "FileEnabled": false,
        "FileName": "",
        "FileMaxSizeMB": 100,
        "FileMaxAgeDays": 0,
        "FileMaxBackups": 0,
        "FileCompress": false,
        "FileMaxQueueSize": 1000,
        "AdvancedLoggingConfig": ""
    },
    "NotificationLogSettings": {
        "EnableConsole": true,
        "ConsoleLevel": "INFO",
        "ConsoleJson": true,
        "EnableFile": true,
        "FileLevel": "INFO",
        "FileJson": true,
        "FileLocation": "",
        "AdvancedLoggingConfig": ""
    },
    "PasswordSettings": {
        "MinimumLength": 10,
        "Lowercase": true,
        "Number": true,
        "Uppercase": true,
        "Symbol": true
    },
    "FileSettings": {
        "EnableFileAttachments": true,
        "EnableMobileUpload": true,
        "EnableMobileDownload": true,
        "MaxFileSize": 52428800,
        "DriverName": "local",
        "Directory": "./data/",
        "EnablePublicLink": false,
        "ExtractContent": false,
        "ArchiveRecursion": false,
        "PublicLinkSalt": "jqpk7bo3cs4adxbppr6hod95qpbtta87",
        "InitialFont": "nunito-bold.ttf",
        "AmazonS3AccessKeyId": "",
        "AmazonS3SecretAccessKey": "",
        "AmazonS3Bucket": "",
        "AmazonS3PathPrefix": "",
        "AmazonS3Region": "",
        "AmazonS3Endpoint": "s3.amazonaws.com",
        "AmazonS3SSL": false,
        "AmazonS3SignV2": false,
        "AmazonS3SSE": false,
        "AmazonS3Trace": false
    },
    "EmailSettings": {
        "EnableSignUpWithEmail": true,
        "EnableSignInWithEmail": true,
        "EnableSignInWithUsername": true,
        "SendEmailNotifications": false,
        "UseChannelInEmailNotifications": false,
        "RequireEmailVerification": false,
        "FeedbackName": "",
        "FeedbackEmail": "",
        "ReplyToAddress": "",
        "FeedbackOrganization": "",
        "EnableSMTPAuth": false,
        "SMTPUsername": "",
        "SMTPPassword": "",
        "SMTPServer": "localhost",
        "SMTPPort": "10025",
        "SMTPServerTimeout": 10,
        "ConnectionSecurity": "",
        "SendPushNotifications": true,
        "PushNotificationServer": "https://push-test.mattermost.com",
        "PushNotificationContents": "full",
        "PushNotificationBuffer": 1000,
        "EnableEmailBatching": false,
        "EmailBatchingBufferSize": 256,
        "EmailBatchingInterval": 30,
        "EnablePreviewModeBanner": false,
        "SkipServerCertificateVerification": false,
        "EmailNotificationContentsType": "full",
        "LoginButtonColor": "#0000",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#2389D7"
    },
    "RateLimitSettings": {
        "Enable": false,
        "PerSec": 10,
        "MaxBurst": 100,
        "MemoryStoreSize": 10000,
        "VaryByRemoteAddr": true,
        "VaryByUser": false,
        "VaryByHeader": ""
    },
    "PrivacySettings": {
        "ShowEmailAddress": true,
        "ShowFullName": true
    },
    "SupportSettings": {
        "TermsOfServiceLink": "https://about.mattermost.com/default-terms/",
        "PrivacyPolicyLink": "https://about.mattermost.com/default-privacy-policy/",
        "AboutLink": "https://about.mattermost.com/default-about/",
        "HelpLink": "https://about.mattermost.com/default-help/",
        "ReportAProblemLink": "https://about.mattermost.com/default-report-a-problem/",
        "SupportEmail": "feedback@mattermost.com",
        "CustomTermsOfServiceEnabled": false,
        "CustomTermsOfServiceReAcceptancePeriod": 365,
        "EnableAskCommunityLink": false
    },
    "AnnouncementSettings": {
        "EnableBanner": false,
        "BannerText": "",
        "BannerColor": "#f2a93b",
        "BannerTextColor": "#333333",
        "AllowBannerDismissal": true,
        "AdminNoticesEnabled": true,
        "UserNoticesEnabled": true,
        "NoticesURL": "https://notices.mattermost.com/",
        "NoticesFetchFrequency": 3600,
        "NoticesSkipCache": false
    },
    "ThemeSettings": {
        "EnableThemeSelection": true,
        "DefaultTheme": "default",
        "AllowCustomThemes": true,
        "AllowedThemes": []
    },
    "GitLabSettings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "",
        "AuthEndpoint": "",
        "TokenEndpoint": "",
        "UserApiEndpoint": "",
        "DiscoveryEndpoint": "",
        "ButtonText": "",
        "ButtonColor": ""
    },
    "GoogleSettings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "profile email",
        "AuthEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
        "TokenEndpoint": "https://www.googleapis.com/oauth2/v4/token",
        "UserApiEndpoint": "https://people.googleapis.com/v1/people/me?personFields=names,emailAddresses,nicknames,metadata",
        "DiscoveryEndpoint": "",
        "ButtonText": "",
        "ButtonColor": ""
    },
    "Office365Settings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "User.Read",
        "AuthEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
        "TokenEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
        "UserApiEndpoint": "https://graph.microsoft.com/v1.0/me",
        "DiscoveryEndpoint": "",
        "DirectoryId": ""
    },
    "OpenIdSettings": {
        "Enable": false,
        "Secret": "",
        "Id": "",
        "Scope": "profile openid email",
        "AuthEndpoint": "",
        "TokenEndpoint": "",
        "UserApiEndpoint": "",
        "DiscoveryEndpoint": "",
        "ButtonText": "",
        "ButtonColor": "#145DBF"
    },
    "LdapSettings": {
        "Enable": false,
        "EnableSync": false,
        "LdapServer": "",
        "LdapPort": 389,
        "ConnectionSecurity": "",
        "BaseDN": "",
        "BindUsername": "",
        "BindPassword": "",
        "UserFilter": "",
        "GroupFilter": "",
        "GuestFilter": "",
        "EnableAdminFilter": false,
        "AdminFilter": "",
        "GroupDisplayNameAttribute": "",
        "GroupIdAttribute": "",
        "FirstNameAttribute": "",
        "LastNameAttribute": "",
        "EmailAttribute": "",
        "UsernameAttribute": "",
        "NicknameAttribute": "",
        "IdAttribute": "",
        "PositionAttribute": "",
        "LoginIdAttribute": "",
        "PictureAttribute": "",
        "SyncIntervalMinutes": 60,
        "SkipCertificateVerification": false,
        "PublicCertificateFile": "",
        "PrivateKeyFile": "",
        "QueryTimeout": 60,
        "MaxPageSize": 0,
        "LoginFieldName": "",
        "LoginButtonColor": "#0000",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#2389D7",
        "Trace": false
    },
    "ComplianceSettings": {
        "Enable": false,
        "Directory": "./data/",
        "EnableDaily": false
    },
    "LocalizationSettings": {
        "DefaultServerLocale": "en",
        "DefaultClientLocale": "en",
        "AvailableLocales": "en"
    },
    "SamlSettings": {
        "Enable": false,
        "EnableSyncWithLdap": false,
        "EnableSyncWithLdapIncludeAuth": false,
        "IgnoreGuestsLdapSync": false,
        "Verify": true,
        "Encrypt": true,
        "SignRequest": false,
        "IdpUrl": "",
        "IdpDescriptorUrl": "",
        "IdpMetadataUrl": "",
        "ServiceProviderIdentifier": "",
        "AssertionConsumerServiceURL": "",
        "SignatureAlgorithm": "RSAwithSHA1",
        "CanonicalAlgorithm": "Canonical1.0",
        "ScopingIDPProviderId": "",
        "ScopingIDPName": "",
        "IdpCertificateFile": "",
        "PublicCertificateFile": "",
        "PrivateKeyFile": "",
        "IdAttribute": "",
        "GuestAttribute": "",
        "EnableAdminAttribute": false,
        "AdminAttribute": "",
        "FirstNameAttribute": "",
        "LastNameAttribute": "",
        "EmailAttribute": "",
        "UsernameAttribute": "",
        "NicknameAttribute": "",
        "LocaleAttribute": "",
        "PositionAttribute": "",
        "LoginButtonText": "SAML",
        "LoginButtonColor": "#34a28b",
        "LoginButtonBorderColor": "#2389D7",
        "LoginButtonTextColor": "#ffffff"
    },
    "NativeAppSettings": {
        "AppCustomURLSchemes": [
            "mmauth://",
            "mmauthbeta://"
        ],
        "AppDownloadLink": "https://mattermost.com/download/#mattermostApps",
        "AndroidAppDownloadLink": "https://about.mattermost.com/mattermost-android-app/",
        "IosAppDownloadLink": "https://about.mattermost.com/mattermost-ios-app/"
    },
    "ClusterSettings": {
        "Enable": false,
        "ClusterName": "",
        "OverrideHostname": "",
        "NetworkInterface": "",
        "BindAddress": "",
        "AdvertiseAddress": "",
        "UseIpAddress": true,
        "UseExperimentalGossip": false,
        "EnableGossipCompression": true,
        "EnableExperimentalGossipEncryption": false,
        "ReadOnlyConfig": true,
        "GossipPort": 8074,
        "StreamingPort": 8075,
        "MaxIdleConns": 100,
        "MaxIdleConnsPerHost": 128,
        "IdleConnTimeoutMilliseconds": 90000
    },
    "MetricsSettings": {
        "Enable": false,
        "BlockProfileRate": 0,
        "ListenAddress": ":8067"
    },
    "ExperimentalSettings": {
        "ClientSideCertEnable": false,
        "ClientSideCertCheck": "secondary",
        "EnableClickToReply": false,
        "LinkMetadataTimeoutMilliseconds": 5000,
        "RestrictSystemAdmin": false,
        "UseNewSAMLLibrary": false,
        "CloudUserLimit": 0,
        "CloudBilling": false,
        "EnableSharedChannels": false,
        "EnableRemoteClusterService": false
    },
    "AnalyticsSettings": {
        "MaxUsersForStatistics": 2500
    },
    "ElasticsearchSettings": {
        "ConnectionUrl": "http://localhost:9200",
        "Username": "elastic",
        "Password": "changeme",
        "EnableIndexing": false,
        "EnableSearching": false,
        "EnableAutocomplete": false,
        "Sniff": true,
        "PostIndexReplicas": 1,
        "PostIndexShards": 1,
        "ChannelIndexReplicas": 1,
        "ChannelIndexShards": 1,
        "UserIndexReplicas": 1,
        "UserIndexShards": 1,
        "AggregatePostsAfterDays": 365,
        "PostsAggregatorJobStartTime": "03:00",
        "IndexPrefix": "",
        "LiveIndexingBatchSize": 1,
        "BulkIndexingTimeWindowSeconds": 3600,
        "RequestTimeoutSeconds": 30,
        "SkipTLSVerification": false,
        "Trace": ""
    },
    "BleveSettings": {
        "IndexDir": "/var/opt/mattermost/bleveindexes",
        "EnableIndexing": true,
        "EnableSearching": false,
        "EnableAutocomplete": false,
        "BulkIndexingTimeWindowSeconds": 3600
    },
    "DataRetentionSettings": {
        "EnableMessageDeletion": false,
        "EnableFileDeletion": false,
        "MessageRetentionDays": 365,
        "FileRetentionDays": 365,
        "DeletionJobStartTime": "02:00"
    },
    "MessageExportSettings": {
        "EnableExport": false,
        "ExportFormat": "actiance",
        "DailyRunTime": "01:00",
        "ExportFromTimestamp": 0,
        "BatchSize": 10000,
        "DownloadExportResults": false,
        "GlobalRelaySettings": {
            "CustomerType": "A9",
            "SmtpUsername": "",
            "SmtpPassword": "",
            "EmailAddress": "",
            "SMTPServerTimeout": 1800
        }
    },
    "JobSettings": {
        "RunJobs": true,
        "RunScheduler": true
    },
    "PluginSettings": {
        "Enable": true,
        "EnableUploads": false,
        "AllowInsecureDownloadUrl": false,
        "EnableHealthCheck": true,
        "Directory": "./plugins",
        "ClientDirectory": "./client/plugins",
        "Plugins": {},
        "PluginStates": {
            "com.mattermost.nps": {
                "Enable": true
            },
            "com.mattermost.plugin-channel-export": {
                "Enable": true
            },
            "com.mattermost.plugin-incident-management": {
                "Enable": true
            }
        },
        "EnableMarketplace": false,
        "EnableRemoteMarketplace": false,
        "AutomaticPrepackagedPlugins": false,
        "RequirePluginSignature": false,
        "MarketplaceUrl": "https://api.integrations.mattermost.com",
        "SignaturePublicKeyFiles": []
    },
    "DisplaySettings": {
        "CustomUrlSchemes": [],
        "ExperimentalTimezone": true
    },
    "GuestAccountsSettings": {
        "Enable": false,
        "AllowEmailAccounts": true,
        "EnforceMultifactorAuthentication": false,
        "RestrictCreationToDomains": ""
    },
    "ImageProxySettings": {
        "Enable": false,
        "ImageProxyType": "local",
        "RemoteImageProxyURL": "",
        "RemoteImageProxyOptions": ""
    },
    "CloudSettings": {
        "CWSUrl": "https://customers.mattermost.com",
        "CWSAPIUrl": "https://portal.internal.prod.cloud.mattermost.com"
    },
    "ImportSettings": {
        "Directory": "./import",
        "RetentionDays": 30
    },
    "ExportSettings": {
        "Directory": "./export",
        "RetentionDays": 30
    }
}

I have replayed twice but Akismet keeps hiding my replay.

Hi, @emilushi

I compared the standard content of the mattermost.service with yours and the significant difference that I can see here is this:

EnvironmentFile=/etc/mattermost/mmomni.mattermost.env

Can I please confirm if the issue persists if you just use the standard mattermost.service below?

[Unit]
Description=Mattermost
After=network.target
After=postgresql.service
BindsTo=postgresql.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=postgresql.service

Since you mentioned that sudo -u mattermost ./bin/mattermost works, let us look at this avenue first.

I was able to solve the problem.

The problem was here:
Error: failed to load configuration: failed to initialize: failed to create Configurations table: pq: password authentication failed for user "mmuser"

I had to go under: /etc/postgresql/{version}/main/pg_hba.conf and change:
host all all 127.0.0.1/32 md5 and
host all all ::1/128 md5 from md5 to trust.

In the documentation it says change peer and ident to trust and not md5

Thanks to @agnivade for his help.

1 Like

Now the most interesting part about this is: why was it working perfectly when using sudo -u mattermost ./bin/mattermost

Hi @emilushi which documentation suggests changing the network to trust?

I’m having the exact same symptoms trying to set up a new server, but my existing server works fine with md5. I was under the impression that setting to trust weakens security to an unacceptable level…

Installing PostgreSQL Database Server

These helped me assess the risk, thanks!

2 Likes