Mattermost on Reclaim Cloud

Okay, I’ve pulled some levers, twiddled some buttons. What I’d like to do is set up Mattermost on a reclaim cloud. I have a stack with a load balancer, a docker container pulling the mattermost enterprise edition image, a postgres db, and a cache. Looking at the result, it looks like to me that that the bits and pieces aren’t communicating to one another:

"level":"info","ts":1591117101.4823346,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL","database":"master"}
{"level":"error","ts":1591117101.4844844,"caller":"sqlstore/supplier.go:236","msg":"Failed to ping DB","error":"dial tcp [::1]:3306: connect: connection refused","retrying in seconds":10}
{"level":"info","ts":1591117111.4846578,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL","database":"master"}
{"level":"error","ts":1591117111.4859684,"caller":"sqlstore/supplier.go:236","msg":"Failed to ping DB","error":"dial tcp [::1]:3306: connect: connection refused","retrying in seconds":10}
{"level":"info","ts":1591117121.4860845,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL","database":"master"}
{"level":"error","ts":1591117121.4875126,"caller":"sqlstore/supplier.go:232","msg":"Failed to ping DB, server will exit.","error":"dial tcp [::1]:3306: connect: connection refused"}

So I’m assuming there’s something I need to configure hiding in a config file somewhere. The mattermost documentation is pretty opaque; I found a note on jelastic suggesting that mattermost could be installed from the marketplace (How to run Mattermost on Layershift Jelastic PaaS!) but it’s not in reclaim cloud’s marketplace. Anywho, if there’s anyone out there trying to do the same, I’d be pleased to compare notes.

1 Like

So, this is pretty cool that you found Layershift has an installer. Because our platform supports being able to use installers that others built. I quickly searched to see if Layershift had a Github repo where they might store them and sure enough they do That means this URL should be able to be imported to begin the install

Unfortunately it looks like part of their manifest calls a separate URL for deployment that is not public Let me look at what a Docker deployment would look like and follow up as I think that should be easier than separate containers for Postgres and cache, the docker container should be able to do all of that in a single container.

Oh cool! Alright, I’ll sit tight. A little knowledge is a dangerous thing, and I’m quickly on my way to a smoking crater here.

Love that you’re diving in head first! Shifting methods a bit, utilizing the Docker install will likely be easier until we get an automated installer (which is definitely in the plans). It requires just a few commands via SSH. Here’s how to do that:

  1. In the Marketplace search Docker and you’ll find the Docker CE container. That is a container that has Docker and Docker Compose pre-installed on it. Fire it up.

  1. Looking at the Docker install instructions from Mattermost at Redirect we can immediately skip 1 and 2 since our container has that stuff pre-installed as well as git (their instructions focus on Ubuntu and our container will be Debian but commands will be the same other than apt-get which we won’t need). So we open an SSH connection to the container to run the rest of the commands. You can use the Web SSH area to run commands or you can use the SSH Gate feature to upload your public key to your account and connect remotely by SSH (if you plan to work with command line on your containers a lot I recommend getting a keypair setup).

  1. Once you’ve run docker-compose up -d the containers within your Docker container will be started and you can access the install by URL to complete setup.

so cool, thank you! I’ll report back in a moment…

and we’re up and running! Now to just figure out smtp etc to finish configuring things. Thanks!

  • update: looks like to unlock things like plugins you have to upgrade to the enterprise edition. Even with the enterprise trial key, plugin uploads are still locked for me. I can use wget to grab a plugin and put it in the right place, untar it, and mattermost will recognize it’s there, but still won’t install it. Perhaps with a full license, you’d get all that. Full licenses look pretty pricey, once you start imagining using with students over multiple classes. Hmmm!

  • update: I found that you have to unlock uploads for plugins in the config.json, yay! I screwed up the smtp email server before validating my own gdd email* and logged out. So now I’m really out.


1 Like

ok, for posterity - I turned off email verification via altering the config.json file, and got back in.

I can’t seem to configure the SMTP settings correctly for this thing to send out confirmation emails, password resets and so on. I’ve tried the various smtp server settings for email accounts I have access to, up to and including a new smtp only thing with sendgrid. The error I get is
Connection unsuccessful: Connection unsuccessful: SendMail: Failed to open TLS connection., tls: first record does not look like a TLS handshake

and I wonder if maybe it’s because I’m inside a docker container? or perhaps I need some kind of tls certificate, and I missed setting that up at the beginning?

-update; configured ‘from’ and ‘reply’ email settings in config.json (which I’d done previously, but did them over again, shrug) and now apparently it tests out correctly. However, password resets and verification emails still not going through.

-I followed a jelastic post on setting up ssl by adding a load balancer and then ‘let’s encrypt free ssl’ on the load balancer, and now my mattermost serves up on https, which has nothing to do with the email problem, but one less concern.

I see a thread at How to configure Email and TLS - General Questions - Mattermost Discussion Forums that offers a few options in config.js for turning TLS on or off. Maybe a place to start.

I swear to god all of this is eldritch magic to me. I have changed nothing in the last ten minutes. Testing the email settings with ‘TLS’ still gives me an error, but testing with ‘STARTLS’ gives me the green light - and test emails turn up in my mailbox. Now, password recovery: not yet.

just to say: it’s all up and running now! ended up using sendgrid for smtp. I’ve got jitsi plugin working, so far, so good!



Are you using the Mattermost CLI in your instance without issues? Kathleen is working with Mattermost as well, and getting basic Mattermost commands to run is not working, you have any luck with this?


Aside from futzing around with the config files I haven’t done anything with the CLI. I’m reading that thread, and, well, there be dragons…