Can't create initial user in new 7.7.0 install

Summary
Can’t create initial user in new install

Steps to reproduce
I installed 7.7.0 according to the instructions, everything went very smoothly. I start it up and go to the front end and I get the usual login prompt, not the initial user creation page.

Expected behavior
I expected to be able to create my initial admin user, but I can’t do that. I can only log in with my non-existent users.

Observed behavior

If I go into the database, I can see 6 users already created, but these seem like automation users, not anything I’d use to log in:

mysql> select FirstName from Users;
+--------------------+
| FirstName          |
+--------------------+
| Channel Export Bot |
| Mattermost Apps    |
| Feedbackbot        |
| Boards             |
| Calls              |
| Playbooks          |
+--------------------+
6 rows in set (0.01 sec)

using mmctl doesn’t work since I don’t have an initial user to use to authenticate with. So I’m a little stuck. Any ideas? Things I can try? Thanks!

1 Like

Here’s the contents of my mattermost.log file:

{"timestamp":"2023-01-18 02:07:35.007 Z","level":"info","msg":"Server is initializing...","caller":"platform/service.go:165","go_version":"go1.18.1"}
{"timestamp":"2023-01-18 02:07:35.009 Z","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:238","database":"master"}
{"timestamp":"2023-01-18 02:07:35.034 Z","level":"info","msg":"Pinging SQL","caller":"sqlstore/store.go:238","database":"master"}
{"timestamp":"2023-01-18 02:07:35.049 Z","level":"error","msg":"License key from https://mattermost.com required to unlock enterprise features.","caller":"platform/license.go:106","error":"resource: License id: "}
{"timestamp":"2023-01-18 02:07:35.052 Z","level":"error","msg":"License key from https://mattermost.com required to unlock enterprise features.","caller":"platform/license.go:106","error":"resource: License id: "}
{"timestamp":"2023-01-18 02:07:35.052 Z","level":"info","msg":"Starting websocket hubs","caller":"platform/web_hub.go:95","number_of_hubs":4}
{"timestamp":"2023-01-18 02:07:35.053 Z","level":"info","msg":"Loaded system translations","caller":"i18n/i18n.go:93","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}
{"timestamp":"2023-01-18 02:07:35.073 Z","level":"error","msg":"SiteURL must be set. Some features will operate incorrectly if the SiteURL is not set. See documentation for details: https://docs.mattermost.com/configure/configuration-settings.html#site-url","caller":"app/server.go:386"}
{"timestamp":"2023-01-18 02:07:35.073 Z","level":"info","msg":"Current version is 7.7.0 (7.7.0/Fri Jan 13 22:54:40 UTC 2023/ea08d47f6051f480153f9035e3b255b937ee5229/3c6659e32ae7fe80ecd4b3b77fc575c636245c14)","caller":"app/server.go:395","current_version":"7.7.0","build_number":"7.7.0","build_date":"Fri Jan 13 22:54:40 UTC 2023","build_hash":"ea08d47f6051f480153f9035e3b255b937ee5229","build_hash_enterprise":"3c6659e32ae7fe80ecd4b3b77fc575c636245c14"}
{"timestamp":"2023-01-18 02:07:35.073 Z","level":"info","msg":"Enterprise Build","caller":"app/server.go:404","enterprise_build":true}
{"timestamp":"2023-01-18 02:07:35.073 Z","level":"info","msg":"Printing current working","caller":"app/server.go:410","directory":"/opt/mattermost"}
{"timestamp":"2023-01-18 02:07:35.073 Z","level":"info","msg":"Loaded config","caller":"app/server.go:411","source":"file:///opt/mattermost/config/config.json"}
{"timestamp":"2023-01-18 02:07:35.076 Z","level":"info","msg":"Starting workers","caller":"jobs/workers.go:48"}
{"timestamp":"2023-01-18 02:07:35.077 Z","level":"info","msg":"Starting schedulers.","caller":"jobs/schedulers.go:47"}
{"timestamp":"2023-01-18 02:07:35.088 Z","level":"error","msg":"License key from https://mattermost.com required to unlock enterprise features.","caller":"platform/license.go:106","error":"resource: License id: "}
{"timestamp":"2023-01-18 02:07:35.125 Z","level":"info","msg":"Starting up plugins","caller":"app/plugin.go:213"}
{"timestamp":"2023-01-18 02:07:35.125 Z","level":"info","msg":"Syncing plugins from the file store","caller":"app/plugin.go:294"}
{"timestamp":"2023-01-18 02:07:37.427 Z","level":"warn","msg":"plugin configured with a nil SecureConfig","caller":"plugin/hclog_adapter.go:72","plugin_id":"com.mattermost.plugin-channel-export"}
{"timestamp":"2023-01-18 02:07:37.455 Z","level":"warn","msg":"plugin configured with a nil SecureConfig","caller":"plugin/hclog_adapter.go:72","plugin_id":"com.mattermost.nps"}
{"timestamp":"2023-01-18 02:07:37.718 Z","level":"warn","msg":"plugin configured with a nil SecureConfig","caller":"plugin/hclog_adapter.go:72","plugin_id":"com.mattermost.apps"}
{"timestamp":"2023-01-18 02:07:37.744 Z","level":"info","msg":"Ensuring Feedbackbot exists","caller":"app/plugin_api.go:973","plugin_id":"com.mattermost.nps"}
{"timestamp":"2023-01-18 02:07:37.960 Z","level":"warn","msg":"plugin configured with a nil SecureConfig","caller":"plugin/hclog_adapter.go:72","plugin_id":"com.mattermost.calls"}
{"timestamp":"2023-01-18 02:07:38.004 Z","level":"warn","msg":"plugin configured with a nil SecureConfig","caller":"plugin/hclog_adapter.go:72","plugin_id":"playbooks"}
{"timestamp":"2023-01-18 02:07:38.021 Z","level":"info","msg":"failed to configure","caller":"app/plugin_api.go:973","plugin_id":"com.mattermost.apps","error":"plugin requires Mattermost Site URL to be set"}
{"timestamp":"2023-01-18 02:07:38.023 Z","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"com.mattermost.apps","wrapped_extras":"pathplugins/com.mattermost.apps/server/dist/plugin-linux-amd64pid7324"}
{"timestamp":"2023-01-18 02:07:38.027 Z","level":"error","msg":"Failed to install prepackaged plugin","caller":"app/plugin.go:967","path":"/opt/mattermost/prepackaged_plugins/mattermost-plugin-apps-v1.1.0-linux-amd64.tar.gz","error":"Failed to install extracted prepackaged plugin /opt/mattermost/prepackaged_plugins/mattermost-plugin-apps-v1.1.0-linux-amd64.tar.gz: installExtractedPlugin: Unable to restart plugin on upgrade., failed to load initial configuration: plugin requires Mattermost Site URL to be set"}
{"timestamp":"2023-01-18 02:07:38.116 Z","level":"info","msg":"got public IP address","caller":"app/plugin_api.go:973","plugin_id":"com.mattermost.calls","origin":"main.(*logger).Info log.go:90","addr":"xx.xxx.xxx.xx"}
{"timestamp":"2023-01-18 02:07:38.117 Z","level":"info","msg":"rtc: server is listening on udp 8443","caller":"app/plugin_api.go:973","plugin_id":"com.mattermost.calls","origin":"main.(*logger).Info log.go:90"}
{"timestamp":"2023-01-18 02:07:38.117 Z","level":"info","msg":"rtc: server is listening on udp 8443","caller":"app/plugin_api.go:973","plugin_id":"com.mattermost.calls","origin":"main.(*logger).Info log.go:90"}
{"timestamp":"2023-01-18 02:07:38.119 Z","level":"warn","msg":"plugin configured with a nil SecureConfig","caller":"plugin/hclog_adapter.go:72","plugin_id":"focalboard"}
{"timestamp":"2023-01-18 02:07:38.152 Z","level":"info","msg":"registered collection and topic type","caller":"app/collection.go:33","plugin_id":"playbooks","collection_type":"run","topic_type":"status"}
{"timestamp":"2023-01-18 02:07:38.153 Z","level":"info","msg":"registered collection and topic type","caller":"app/collection.go:33","plugin_id":"playbooks","collection_type":"run","topic_type":"task"}
{"timestamp":"2023-01-18 02:07:38.198 Z","level":"info","msg":"connectDatabase","caller":"app/plugin_api.go:973","plugin_id":"focalboard","dbType":"mysql"}
{"timestamp":"2023-01-18 02:07:38.207 Z","level":"info","msg":"{\"level\":\"info\",\"msg\":\"Pinging SQL\",\"fields\":{\"database\":\"master\"}}\n","caller":"io/io.go:428","plugin_id":"focalboard","source":"plugin_stderr"}
{"timestamp":"2023-01-18 02:07:38.295 Z","level":"info","msg":"Initialized notification backend","caller":"app/plugin_api.go:973","plugin_id":"focalboard","name":"notifyMentions"}
{"timestamp":"2023-01-18 02:07:38.296 Z","level":"info","msg":"Initialized notification backend","caller":"app/plugin_api.go:973","plugin_id":"focalboard","name":"notifySubscriptions"}
{"timestamp":"2023-01-18 02:07:38.297 Z","level":"info","msg":"Initialized notification backend","caller":"app/plugin_api.go:973","plugin_id":"focalboard","name":"notifyLogger"}
{"timestamp":"2023-01-18 02:07:38.306 Z","level":"info","msg":"FocalBoard Server","caller":"app/plugin_api.go:973","plugin_id":"focalboard","version":"7.7.0","edition":"plugin","build_number":"3856523067","build_date":"\"Fri Jan  6 15:51:58 UTC 2023\"","build_hash":"938e7f1c82c7af00115248e284f302c28557f040"}
{"timestamp":"2023-01-18 02:07:38.306 Z","level":"info","msg":"Server.Start","caller":"app/plugin_api.go:973","plugin_id":"focalboard"}
{"timestamp":"2023-01-18 02:07:38.315 Z","level":"info","msg":"Boards product successfully started.","caller":"app/plugin_api.go:973","plugin_id":"focalboard"}
{"timestamp":"2023-01-18 02:07:38.323 Z","level":"warn","msg":"plugin configured with a nil SecureConfig","caller":"plugin/hclog_adapter.go:72","plugin_id":"com.mattermost.apps"}
{"timestamp":"2023-01-18 02:07:38.382 Z","level":"info","msg":"failed to configure","caller":"app/plugin_api.go:973","plugin_id":"com.mattermost.apps","error":"plugin requires Mattermost Site URL to be set"}
{"timestamp":"2023-01-18 02:07:38.384 Z","level":"info","msg":"plugin process exited","caller":"plugin/hclog_adapter.go:61","plugin_id":"com.mattermost.apps","wrapped_extras":"pathplugins/com.mattermost.apps/server/dist/plugin-linux-amd64pid7356"}
{"timestamp":"2023-01-18 02:07:38.384 Z","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:166","plugin_id":"com.mattermost.apps","error":"failed to load initial configuration: plugin requires Mattermost Site URL to be set"}
{"timestamp":"2023-01-18 02:07:38.388 Z","level":"info","msg":"Starting Server...","caller":"app/server.go:878"}
{"timestamp":"2023-01-18 02:07:38.388 Z","level":"info","msg":"Server is listening on [::]:8065","caller":"app/server.go:950","address":"[::]:8065"}
{"timestamp":"2023-01-18 02:07:38.388 Z","level":"info","msg":"Sending systemd READY notification.","caller":"commands/server.go:130"}

Looks like everything failing is due to incomplete configuration, which, obviously, I can’t do.

System is Rocky 9.1, updated, selinux/firewalld both on and off don’t make a difference.

Hi briand and welcome to the Mattermost forums!

This is unfortunately a known issue with 7.7.0 which got detected and fixed yesterday.directly after the release and has since then also been added to the known issues for this release.

The ticket for that is [MM-49706] - Mattermost and the fix already has been prepared:

For now the only workaround for you is to enable the so-called local mode of the server in order to create the admin account via the CLI. To do this, set the value of EnableLocalMode in your server’s config.json file to true, then restart the server and afterwards, you can use the following command to create your system admin account:

mmctl --local user create --email your@email.com --username yourusername --password yourpassword --system-admin
3 Likes

Brilliant! Thanks so much. I don’t know how I couldn’t find this option.

No worries, I’m still trying to vote for this feature being enabled per default :slight_smile:
So you’re up and running?

Yes, that was the missing piece. All good now! Thanks again so much for the help. Hopefully this can help someone else also.

Awesome - thanks for the confirmation.

We have also provided a bug fix for this now in v7.7.1 dot release.

1 Like

Hi,
I use the Mattermost omnibus installation which currently ships version 7.7.0 so I’m still facing this issue. I wanted to try your workaround and checked, that local mode is enabled in the mmomni.yml file. But I got the error that in order to use mmctl --local I have to be login in as the mattermost user (which is also reflected in the mmctl decumentation). Since I used the apt omnibus package, I cannot login as the mattermost user because it was automatically created by omnibus and I couldn’t find default password information online. Do you have an idea what I can try next?
Thanks

We also have a ticket open to update Omnibus to 7.7.1 version.

1 Like

Hi @proxycon ,

you need to be either logged in as mattermost user, or as root, since the socket belongs to the mattermost user. If you’re logged in with your own useraccount, you should be able to either su - or sudo -s into a root shell and from there on, you can then run mmctl --local ....

Let me know if that works.