no, mattermost doesn't use any port, it just dies in initialization:
look into your mattermost logs and post the stack trace here.
Some of the init code is really wacky. I had the same problem after I putmattermost['email_connection_security'] = "TLS"
in my gitlab.rb
my mattermost got belly up in the same way as yours. I tracked it down to the email initialization panicing out. It works now with:mattermost['email_smtp_port'] = 587
mattermost['email_connection_security'] = "STARTTLS"
If you don't find the stack trace, just go back to your last stable config.rb
and then change it only line by line so you can see which line is causing trouble.