Clean Install of Mattermost, close but no cigar!

So here is where we are at (The forum cut me off from talking to you yesterday, which is absolutely silly but if it gives the admins warm fuzzies to be “big and bad” on the internet ore power to em)

If we install mattermost like you said we will end up with a fully working installation (sans the notifications which is honestly a CRIPPLING feature removal, who uses messaging without notifications?) however when we install Iredmail it wipes out mattermost. Were thinking this is because of port conflicts.

We ordered a new IP for this server and are thinking if we can install mattermost and then move its IP to the “other one” it will use a different port stack and “shouldnt” conflict with the mailserver setup, as long as they both have their IP separated ,

That leads me to taking a look at this .conf file, I noticed there are two and I have never altered a default IP, so your guidance is still needed. Also do we “nuke” this server, or can we come back from this by altering the IP that MM uses?

Also I need to think long term if we cannot use Notifications without the enterprise upsell, what are we really doing here, we cannot expect our team to just sit in front of their devices 24/7, I am fully willing to learn or hire a gig worker to do the “Custom app” route, and compile them, if you think I can do that, but otherwise then that we would have to use another app/system to notify everyone they have a message in the other system

thoughts on all this, and appreciation for you spending the time!

Do you remember what the exact error message was? I’m not a forum admin here, but I can find one to look at this issue and increase the thresholds then for a better user experience.

What exactly is not working with the notifications? They should work just fine. What notifications do you mean? Push Notifications?

Could you please be a bit more specific on that? What does “wipes out” mean in technical details? What error messages are you seeing? What’s the exact behaviour? The Mattermost application server is very likely not affected by whatever iredmail does, it most likely just stops the nginx proxy or starts a different application on port 443 or the like, so it would be interesting to see what exactly is the problem here then. Does iredmail also use an nginx webserver?

Mattermost’s nginx configuration uses name based virtual hosting as you can see in the config file, so if you access the server using the server_name specified in the configuration file, you will end up on the Mattermost instance and this should not interfere with other nginx vhosts (if there are any).

Do you remember what the exact error message was? I’m not a forum admin here, but I can find one to look at this issue and increase the thresholds then for a better user experience.

The error said something silly about waiting 15 hours to reply, had some stupid comment about “my enthusiasm”, I know its a defense against spam, but yeah it can really put a damper on people trying to get REAL help! If you could check on it that would be great, a lot of the time its just default settings.

What exactly is not working with the notifications? They should work just fine. What notifications do you mean? Push Notifications?

Best I can say is yes, they mentioned something about push notifications for Apple and Android not working, so if someone messages them, they wont get notified, seemed to have something to do with the “Secret key” in the app itself, I did not explore it yet since my primary concern was to get the server running first.

Could you please be a bit more specific on that? What does “wipes out” mean in technical details? What error messages are you seeing? What’s the exact behaviour? The Mattermost application server is very likely not affected by whatever iredmail does, it most likely just stops the nginx proxy or starts a different application on port 443 or the like, so it would be interesting to see what exactly is the problem here then. Does iredmail also use an nginx webserver?

Mattermost’s nginx configuration uses name based virtual hosting as you can see in the config file, so if you access the server using the server_name specified in the configuration file, you will end up on the Mattermost instance and this should not interfere with other nginx vhosts (if there are any).
[/quote]

Basically when we install BOTH on the same IP, we get “bad gateway” when trying to load iredmail, and we also noticed that it bounces to the mattermost URL prior to that, so we thought if we bought two IPS we could have both running. Also yes NGINX is used by BOTH mattermost AND Iredmail,

as of now 14:27 6-15-23 we DO have iredmail successfully operating, I need to find a way to BIND Iredmail to ONE IP and BIND Mattermost to another, if i install Mattermost prior to doing that it will wipe both out again. Im standing by for any more guidance you may be able to give, I am trying to bone up on BIND, my goal would be this

Query

http://mattermost.whynotgus.info (PORT 80, 8065 443) resolve to THIS IP and PORT

http://mail.whynotgus.com (PORT 80) resolve to THIS OTHER IP and PORT

I hope that makes sense, the server does indeed have two IPS as referenced in this screenshot

Thanks, I brought this up with the forum admins and the settings are being reviewed.

As I said, this works just fine, it might be necessary to check the notification settings on the mobile app and try to disable and re-enable them completely for the app to reregister to the push notification service. They won’t get notifications when they’re online on a different device by default, so if this is what they expect, they can change the settings on their mobile device to always get push notifications even though the server detects them as being online on a different device.
For push notifications to work the Mattermost server also needs to be able to connect outbound to the configured TPNS, check the settings for the URL configured on your end and try to curl it from the server command line. Then there’s also a notifications.log file in the Mattermost server directory which might contain relevant information for the sent notifications.

The two different IPs are not necessary, nginx supports a feature called “name-based virtual hosting”, that means it can distinguish which application to load depending on the hostname send to access it. So even if you only have one IP address, you can access both applications on the same IP and nginx will route requests to the Mattermost backend if the hostname in the HTTP request header is set to mattermost.whynotgus.info and to iredmail if the host header is set to mail.whynotgus.com.

In order to debug that, I’d need to see your current full nginx configuration, especially the files /etc/nginx/nginx.conf as well as all the configured sites (might be in a conf.d subdirectory or sites-enabled - can you share them with me so I can have a look at the current setup?
Also please post the output of lsof -i so I can see what applications are running on what ports.

ok apparently were over here now, I tried messaging you on Mattermost chat, but I am guessing the notifications dont work over there either (which btw was what i was referring to!)

to update:

wngmattermost

1 hour ago

So yeah I looked at what you said about name based virtual, it seems to be for websites, which i guess could work for the web interfaces

1 for mattermost
2 for iredmail

I guess if the applications both wanted port 80, which they probably already use, that would cause the confliction

As for your request to look into the log I have sent you credentials to the server, You can do what you want on it and look at what you want much easier, keep in mind mattermost IS NOT setup on it since the last “nuke” (erasing) as i did not want to deal with the confliction

Mattermost will be installed at mattermost.whynotgus.info, and the iRedMail is at mail.whynotgus.com, the iRedMail is active and functioning at this time.

Anyway check your messages, your in the Sudo file so you should have no issues. Even if the server gets messed up we can always nuke it again!

Mattermost Omnibus installs the nginx vhost to /etc/nginx/conf.d/mattermost.conf and iredmail uses /etc/nginx/sites-enabled. In the global /etc/nginx/nginx.conf file for iredmail, only the sites-enabled path is configured, so the Mattermost configuration does not get loaded into nginx.
To permanently fix this and not tinker with the Omnibus configuration, I’ve created a symlink in /etc/nginx/sites-enabled/mattermost.conf pointing to /etc/nginx/conf.d/mattermost.conf, that way the Omnibus setup can change the file and the nginx will read it from the other location. Problem 1 solved.

The next problem was that Mattermost’s nginx configuration comes with the following setting:

ssl_session_cache shared:SSL:50m;

And this results in the following error message:

nginx: [emerg] the size 52428800 of shared memory zone "SSL" conflicts with already declared size 10485760 in /etc/nginx/sites-enabled/mattermost.conf:27

Everyone seems to use the name SSL nowadays although it’s an abitrary name and having conflicting values (ireadmail comes with a value of 10m in the file /etc/nginx/templates/ssl.tmpl does not work, so you can either rename one of the two or remove one of the two, whatever sounds better.

I’m not sure if iredmail will ever touch the config file again during upgrades, but I’m sure Mattermost will and therefore I’ve now changed the name of the iredmail config to IRMSSL.

wow i just saw ALL of this, i appreciate the help, Ill take some time to digest it, i left you this message on the MM server

well as always i appreciate the help, i did use mmctl to edit the config and then i did a write out an saved it, i also checked by running the mmomni to reconfigure and restart, nothing seems to have changed, i reloaded both the app and the mobile app, i did not see the name changes or the banner i built so i am not sure where it is writing the config, if you figure it out go ahead and jsut implement it, i cant stay up any longer, as of right now the server name for the mattermost instance should be Why Not Gus Mattermost Server Apple Pie , but as youll see its not aplying, thanks for any help!

Ill check back here in the morning