We're Hiring!

Mattermost Discussion Forums

[Solved] Trouble connecting to new mattermost

Summary
I am trying to set up a new mattermost instance following this tutorial. I followed all the steps and mattermost seems to be running but but when i try to connect i get an error message.

Steps to reproduce
I am working on:
CentOS 8 using
mattermost 5.38.1
mySQL

I start mattermost using sudo systemctl start mattermost when i call sudo systemctl status mattermost i get:

mattermost.service - Mattermost
   Loaded: loaded (/etc/systemd/system/mattermost.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2021-08-30 11:51:45 CEST; 9s ago
 Main PID: 8671 (mattermost)
    Tasks: 8 (limit: 23693)
   Memory: 62.3M
   CGroup: /system.slice/mattermost.service
           └─8671 /opt/mattermost/bin/mattermost

Using curl http://localhost:8065, I get an html file with the error “We’re having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.”

Using a browser i get “ERR_CONNECTION_REFUSED”

Expected behavior
Being able to connect to mattermost so that i can configure the server.

Observed behavior
this is my log file:

{"level":"info","ts":1630318486.8221931,"caller":"app/server.go:269","msg":"Server is initializing...","go_version":"go1.16.6"}
{"level":"info","ts":1630318486.8223362,"caller":"app/web_hub.go:93","msg":"Starting websocket hubs","number_of_hubs":4}
{"level":"info","ts":1630318486.8231478,"caller":"i18n/i18n.go:93","msg":"Loaded system translations","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}
{"level":"info","ts":1630318486.8279533,"caller":"sqlstore/store.go:308","msg":"Pinging SQL","database":"master"}
{"level":"info","ts":1630318486.83072,"caller":"sqlstore/store.go:308","msg":"Pinging SQL","database":"migrations"}
{"level":"warn","ts":1630318487.017701,"caller":"sqlstore/store.go:1191","msg":"Could not create foreign key: Error 1826: Duplicate foreign key constraint name 'FK_RetentionPoliciesChannels_RetentionPolicies'"}
{"level":"warn","ts":1630318487.01879,"caller":"sqlstore/store.go:1191","msg":"Could not create foreign key: Error 1826: Duplicate foreign key constraint name 'FK_RetentionPoliciesTeams_RetentionPolicies'"}
{"level":"info","ts":1630318487.1690087,"caller":"app/license.go:88","msg":"License key from https://mattermost.com required to unlock enterprise features."}
{"level":"error","ts":1630318487.1813698,"caller":"app/server.go:526","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:525\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.runServer\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/server.go:74\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.serverCmdF\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/server.go:58\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:225\nruntime.goexit\n\truntime/asm_amd64.s:1371"}
{"level":"error","ts":1630318487.1817317,"caller":"app/server.go:530","msg":"SiteURL must be set. Some features will operate incorrectly if the SiteURL is not set. See documentation for details: http://about.mattermost.com/default-site-url"}
{"level":"info","ts":1630318487.182141,"caller":"app/server.go:569","msg":"Current version is 5.38.1 (5.38.1/Wed Aug 18 14:03:15 UTC 2021/f8b8371a44e53bfbfc5199086b03fefbf2b3a1de/61c01193f6dba830e99859412ddbffef44deae3c)","current_version":"5.38.1","build_number":"5.38.1","build_date":"Wed Aug 18 14:03:15 UTC 2021","build_hash":"f8b8371a44e53bfbfc5199086b03fefbf2b3a1de","build_hash_enterprise":"61c01193f6dba830e99859412ddbffef44deae3c"}
{"level":"info","ts":1630318487.1821854,"caller":"app/server.go:578","msg":"Enterprise Build","enterprise_build":true}
{"level":"info","ts":1630318487.1822608,"caller":"app/server.go:584","msg":"Printing current working","directory":"/opt/mattermost"}
{"level":"info","ts":1630318487.1822934,"caller":"app/server.go:585","msg":"Loaded config","source":"file:///opt/mattermost/config/config.json"}
{"level":"info","ts":1630318487.197847,"caller":"jobs/workers.go:135","msg":"Starting workers"}
{"level":"info","ts":1630318487.1984324,"caller":"jobs/schedulers.go:116","msg":"Starting schedulers."}
{"level":"info","ts":1630318487.2080464,"caller":"app/license.go:88","msg":"License key from https://mattermost.com required to unlock enterprise features."}
{"level":"error","ts":1630318487.2136478,"caller":"app/server.go:1525","msg":"Failed to send notifications to admin users.","error":"GetWarnMetricsBot: List of admins is empty., "}
{"level":"info","ts":1630318487.304906,"caller":"app/server.go:1177","msg":"Starting Server..."}
{"level":"info","ts":1630318487.3054087,"caller":"app/server.go:1253","msg":"Server is listening on [::]:8065","address":"[::]:8065"}
{"level":"info","ts":1630318487.3054838,"caller":"commands/server.go:129","msg":"Sending systemd READY notification."}
{"level":"info","ts":1630319090.8353589,"caller":"expirynotify/worker.go:85","msg":"Worker: Job is complete","worker":"ExpiryNotify","job_id":"cffkm8zhgpfxjcdmjn3zscx6eh"}

The problem seemed to be the firewall

1 Like