Fresh Install - SQL Error

Hi all,

I am installing Mattermost on a CentOs VPS which has Plesk. I am however installing Mattermost from the command line rather than via the Plesh shell.

I am following the instructions here - Installing Mattermost on RHEL 7 — Mattermost documentation

I have reached instruction 9, but on running the command

sudo -u mattermost ./bin/mattermost

I get the following:

{“level”:“info”,“ts”:1613060636.7064807,“caller”:“app/server.go:225”,“msg”:“Server is initializing…”}
{“level”:“info”,“ts”:1613060636.7065976,“caller”:“app/web_hub.go:83”,“msg”:“Starting websocket hubs”,“number_of_hubs”:12}
{“level”:“info”,“ts”:1613060636.7084298,“caller”:“utils/i18n.go:90”,“msg”:“Loaded system translations”,“for locale”:“en”,“from locale”:“/opt/mattermost/i18n/en.json”}
{“level”:“info”,“ts”:1613060636.7175372,“caller”:“sqlstore/supplier.go:246”,“msg”:“Pinging SQL”,“database”:“master”}
{“level”:“warn”,“ts”:1613060636.7308486,“caller”:“sqlstore/upgrade.go:137”,“msg”:“The database schema version and model versions do not match”,“schema_version”:“5.31.0”,“model_version”:“5.30.0”}
{“level”:“error”,“ts”:1613060636.7499022,“caller”:“sqlstore/supplier.go:981”,“msg”:“Failed to create index”,“table”:“Channels”,“index_name”:“idx_channel_search_txt”,“error”:“Error 1214: The used table type doesn’t support FULLTEXT indexes”}

I understand that this error in the final line is to do with the setup of the SQL table, but I’m not sure how to proceed.

I’m not a Linux expert but I know enough to do basic commands (and understand what I’m doing) so be gentle.

Thanks for any help.

Peter+

Hi, @peterould

The error that we are seeing here is most likely related to the storage engine tied to the Channels table. Can you please run the following command and share what you result are you getting?

SELECT table_name,engine FROM information_schema.tables WHERE table_schema = 'mattermost';

We are expected to see something that looks like this:

+------------------------+--------+
| table_name             | engine |
+------------------------+--------+
| Audits                 | InnoDB |
| Bots                   | InnoDB |
| ChannelMemberHistory   | InnoDB |
| ChannelMembers         | InnoDB |
| Channels               | InnoDB |
| ClusterDiscovery       | InnoDB |
| CommandWebhooks        | InnoDB |
| Commands               | InnoDB |
| Compliances            | InnoDB |
| Emoji                  | InnoDB |
| FileInfo               | InnoDB |
| GroupChannels          | InnoDB |
| GroupMembers           | InnoDB |
| GroupTeams             | InnoDB |
| IR_Incident            | InnoDB |
| IR_Playbook            | InnoDB |
| IR_PlaybookMember      | InnoDB |
| IR_StatusPosts         | InnoDB |
| IR_System              | InnoDB |
| IncomingWebhooks       | InnoDB |
| Jobs                   | InnoDB |
| Licenses               | InnoDB |
| LinkMetadata           | InnoDB |
| OAuthAccessData        | InnoDB |
| OAuthApps              | InnoDB |
| OAuthAuthData          | InnoDB |
| OutgoingWebhooks       | InnoDB |
| PluginKeyValueStore    | InnoDB |
| Posts                  | InnoDB |
| Preferences            | InnoDB |
| ProductNoticeViewState | InnoDB |
| PublicChannels         | InnoDB |
| Reactions              | InnoDB |
| Roles                  | InnoDB |
| Schemes                | InnoDB |
| Sessions               | InnoDB |
| SidebarCategories      | InnoDB |
| SidebarChannels        | InnoDB |
| Status                 | InnoDB |
| Systems                | InnoDB |
| TeamMembers            | InnoDB |
| Teams                  | InnoDB |
| TermsOfService         | InnoDB |
| ThreadMemberships      | InnoDB |
| Threads                | InnoDB |
| Tokens                 | InnoDB |
| UploadSessions         | InnoDB |
| UserAccessTokens       | InnoDB |
| UserGroups             | InnoDB |
| UserTermsOfService     | InnoDB |
| Users                  | InnoDB |
+------------------------+--------+
51 rows in set (0.00 sec)

If it is not InnoDB, we will have to change it to that and run Mattermost again after that.

Hi Ahmad,

Apologies for the delay.

Result as below (quite impressed I remembered how to get into MySQL from the command prompt!!!)

P+

—RESULTS-----

MariaDB [(none)]> SELECT table_name,engine FROM information_schema.tables WHERE table_schema = ‘mattermost’;
±-----------------------±-------+
| table_name | engine |
±-----------------------±-------+
| Audits | InnoDB |
| Bots | InnoDB |
| ChannelMemberHistory | InnoDB |
| ChannelMembers | InnoDB |
| Channels | InnoDB |
| ClusterDiscovery | InnoDB |
| CommandWebhooks | InnoDB |
| Commands | InnoDB |
| Compliances | InnoDB |
| Emoji | InnoDB |
| FileInfo | InnoDB |
| GroupChannels | InnoDB |
| GroupMembers | InnoDB |
| GroupTeams | InnoDB |
| IncomingWebhooks | InnoDB |
| Jobs | InnoDB |
| Licenses | InnoDB |
| LinkMetadata | InnoDB |
| OAuthAccessData | InnoDB |
| OAuthApps | InnoDB |
| OAuthAuthData | InnoDB |
| OutgoingWebhooks | InnoDB |
| PluginKeyValueStore | InnoDB |
| Posts | InnoDB |
| Preferences | InnoDB |
| ProductNoticeViewState | InnoDB |
| PublicChannels | InnoDB |
| Reactions | InnoDB |
| Roles | InnoDB |
| Schemes | InnoDB |
| Sessions | InnoDB |
| SidebarCategories | InnoDB |
| SidebarChannels | InnoDB |
| Status | InnoDB |
| Systems | InnoDB |
| TeamMembers | InnoDB |
| Teams | InnoDB |
| TermsOfService | InnoDB |
| ThreadMemberships | InnoDB |
| Threads | InnoDB |
| Tokens | InnoDB |
| UploadSessions | InnoDB |
| UserAccessTokens | InnoDB |
| UserGroups | InnoDB |
| UserTermsOfService | InnoDB |
| Users | InnoDB |
±-----------------------±-------+
46 rows in set (0.00 sec)

Hi Peter,

It looks like you are using MariaDB, which we haven’t done a lot of testing with. But it should work nevertheless.

The current issue seems to be that the table type does not support FULLTEXT indexes, and from the documentation, it seems like FULLTEXT index support for InnoDB tables was added in 10.0.5. What is the MariaDB version that you are using?

1 Like

Looks like it’s only 5.5.68 - it’s the version installed with Plesk

Give me a few mins - I’ve found instructions how to update the version.

OK - I’ve successfully updated the MariaDB version to 10.5.8. Will try again with the Mattermost install and let you know here.

Seems to be working now!!!

2 Likes

OK…

Thanks for all the help so far. Mattermost is completely installed. Now the next problems.

The VPS I want to use MM on is running Plesk and using Lets Encrypt for SSL/TSL certificates. How exactly do I setup Mattermost to run with this? I seem to be going around in circles with using https or http, either with the raw IP address or on a domain.

I want me 10 yo son to be able to use this server to chat to his friends. He doesn’t have a phone, so using the client on his iPad would allow him to safely chat to his friends.

All help gratefully received.

1 Like

Great to hear that!

Re: SSL certs, we have some documentation on it, that you might find helpful;
https://docs.mattermost.com/administration/config-settings.html?highlight=ssl%20tls#web-server
https://docs.mattermost.com/install/config-tls-mattermost.html

1 Like

Making progress slowly - next problem is that port 443 is already being used by some Plesk processes.

I run sudo lsof -i:443 and get:

nginx 1896 root 19u IPv4 34635 0t0 TCP domain:https (LISTEN)
nginx 1901 nginx 19u IPv4 34635 0t0 TCP domain:https (LISTEN)
nginx 1901 nginx 26u IPv4 41081 0t0 TCP domain:https->20.235.198.146.dyn.plus.net:51453 (ESTABLISHED)
nginx 1901 nginx 28u IPv4 44603 0t0 TCP domain:https->crawl-66-249-66-88.googlebot.com:45791 (ESTABLISHED)

I’ve replace my URL with domain to get round the early poster URL restrictions

Is this because I’ve got nginx running on the domain?

If you have nginx running as your main server that handles web traffic, then you would need to proxy the traffic from nginx to Mattermost.

So, nginx keeps running on 443. Mattermost runs on 8065. What you would need to do is setup nginx to do a proxy_pass to Mattermost. See here for an example: Configuring NGINX as a proxy for Mattermost Server — Mattermost 5.32 documentation

If you already have an existing domain, you would need to create a new one that will handle only Mattermost traffic, and edit the nginx config appropriately to handle traffic from that domain.

There are lots of example on the internet that will show you how to setup nginx to handle multiple domain names.

Hopefully that helps!

1 Like

What you would want to do here is use a virtualhost, which allows you to host multiple domains/subdomains from a single IP address, listening on the same port. You can do this by following the guide that @ahmaddanial provided in the previous reply in this thread. The virtual host is defined in the line (copied from the example) server_name mattermost.example.com; where mattermost.example.com is the name of your domain.