SOLVED - No system_admin - Can't access system console

Hi

I installed mattermost.
I had a working solution I would say.

After some issues with Nginx, which works more or less now, I wanted to start and play around with mattermost.

But now my only user (called “admin”) can’t access the system console anymore.

I had a single Team and a single user on the entire system.

I tried based on the trouble shooting manual:

sudo ./platform -assign_role -team_name=“FIRST-Team” -email="admin@axample.com" -role=“system_admin”

This doesn’t work

Error: unknown shorthand flag: ‘a’ in -assign_role

What to do?

I removed “admin” from the initial Team and now I can’t do anything anymore with the mattermost installation.

This mattermost is not working for me yet :wink:

I hope I will get there :wink:

Can someone help me here?

And if I try this command from the manual (

I get:

user@cloud$ sudo ./platform roles system_admin admin
user@cloud$ Using config file at /opt/mattermost/config/config.json
user@cloud$ Loaded system translations for ‘en’ from ‘/opt/mattermost/i18n/en.json’
user@cloud$ Server is initializing…
user@cloud$ Pinging SQL master database
user@cloud$ License key from https://mattermost.com required to unlock enterprise features.

I am only running the community version. I am wondering how I can get a system_admin defined :wink:

This problem is solved.

The issue was that I had a Websocket 403 issue.

I had to change the config.json for AllowCorsFrom to “*”.

Quote:

ovizii
I think @bradhowes is absolutely right. I had mm 3.6.2 running and had set
“AllowCorsFrom”: “mydomain.tld”,
and things were working fine.

After an upgrade to mm 4.0.3 I started getting websocket errors which seemed weird so after a couple of hours tinkering with the nginx reverse proxy I simply change above setting to:
“AllowCorsFrom”: “*”,
and everything works again.

So I am not sure if this is a security issue or something like that, but it solves the Websocket 403 issue.

Since the Websocket connection works fine, my user can access the system console again and actually is a system_admin.

So this item is closed.

Chris