# \[SOLVED\] Mattermost service automatically stops after some time

**URL:** <https://forum.mattermost.com/t/solved-mattermost-service-automatically-stops-after-some-time/4339>\
**Category:** Troubleshooting\
**Created:** [January 10, 2018, 2:11pm UTC](https://forum.mattermost.com/t/solved-mattermost-service-automatically-stops-after-some-time/4339 "2018-01-10T14:11:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pankaj](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/pankaj/32/1800_2.png) [@pankaj](https://forum.mattermost.com/u/pankaj)\
**Post date:** [January 10, 2018, 2:11pm UTC](https://forum.mattermost.com/t/solved-mattermost-service-automatically-stops-after-some-time/4339/1 "2018-01-10T14:11:50Z")

</div>

#### Summary

Mattermost instance automatically stops, and I am unable to access mattermost anymore.  
`sudo systemctl status mattermost.service`

`Active: failed (Result: exit-code) since Wed 2018-01-10 10:34:52 UTC; 8min ago`  
this is the error when I check mattermost service status

then I run this command to restart it  
`sudo systemctl restart mattermost`

#### Steps to reproduce

##### Mattermost Server version

Server OS Centos7

Version: 4.3.0  
Build Number: 4.3.1  
Build Date: Fri Oct 20 20:37:49 UTC 2017  
Build Hash: c8a67ac3c95b11b6a3045905cd4f875f8ffd0fe8  
Build Enterprise Ready: false  
DB Version: 4.3.0

* * *

I don’t understand how does it happened but it is happening continously, and after around 15-20 minutes it automatically goes down,

here is the screenshot of the error

> **[2018-01-10\_1613](https://app.screencast.com/8StaSdmxWDufU)**
>
> World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

when I restart mattermost service, it gets fixed for some time

#### Expected behavior

it should works fine without getting stopped

#### Observed behavior

service stops after sometime, it stops working

here is the error  
` [centos@ip-172-31-34-175 ~]$ sudo systemctl status -l mattermost.service ● mattermost.service - Mattermost Loaded: loaded (/etc/systemd/system/mattermost.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Wed 2018-01-10 10:34:52 UTC; 8min ago Process: 13956 ExecStart=/opt/mattermost/bin/platform (code=exited, status=2) Main PID: 13956 (code=exited, status=2)`

```
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal platform[13956]: /var/lib/jenkins/jobs/msr/jobs/d/jobs/team-release/workspace/src/github.com/mattermost/mattermost-server/vendor/github.com/spf13/cobra/command.go:729 +0x2fe
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal platform[13956]: github.com/mattermost/mattermost-server/vendor/github.com/spf13/cobra.(*Command).Execute(0x1879600, 0xc420000180, 0xf48d2f)
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal platform[13956]: /var/lib/jenkins/jobs/msr/jobs/d/jobs/team-release/workspace/src/github.com/mattermost/mattermost-server/vendor/github.com/spf13/cobra/command.go:688 +0x2b
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal platform[13956]: main.main()
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal platform[13956]: /var/lib/jenkins/jobs/msr/jobs/d/jobs/team-release/workspace/src/github.com/mattermost/mattermost-server/cmd/platform/mattermost.go:32 +0x2d
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal platform[13956]: goroutine 8 [syscall, 90692 minutes]:
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal platform[13956]: os/signal.signal_recv(0x706930)
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal systemd[1]: mattermost.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal systemd[1]: Unit mattermost.service entered failed state.
Jan 10 10:34:52 ip-172-31-34-175.us-east-2.compute.internal systemd[1]: mattermost.service failed.

```

---

<div class="post-metadata">

**Author:** ![lindy65](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lindy65/32/1811_2.png) [@lindy65](https://forum.mattermost.com/u/lindy65)\
**Post date:** [January 12, 2018, 8:45am UTC](https://forum.mattermost.com/t/solved-mattermost-service-automatically-stops-after-some-time/4339/2 "2018-01-12T08:45:38Z")

</div>

Hi @pankaj,

Thanks for your feedback,

We suggest upgrading to the [latest version](https://about.mattermost.com/download/) of Mattermost to see if the issue still reproduces for you.

You could also try checking your configuration according to [this documentation](https://docs.mattermost.com/install/install-rhel-71.html#installing-mattermost-on-rhel-7-1) and [this doc](https://docs.mattermost.com/developer/dev-setup-centos-7.html#installing-developer-components-on-centos-7) may be helpful as well.

---

<div class="post-metadata">

**Author:** ![pankaj](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/pankaj/32/1800_2.png) [@pankaj](https://forum.mattermost.com/u/pankaj)\
**Post date:** [January 16, 2018, 5:45am UTC](https://forum.mattermost.com/t/solved-mattermost-service-automatically-stops-after-some-time/4339/3 "2018-01-16T05:45:33Z")

</div>

Hi @lindy65,  
Thanks for giving your time on this.  
as you suggested me, I have upgraded my MM, its been 2 days and I am not seeing this issue anymore, I will surely report this issue if it arises again.  
Thanks for the help.

---

<div class="post-metadata">

**Author:** ![lindy65](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lindy65/32/1811_2.png) [@lindy65](https://forum.mattermost.com/u/lindy65)\
**Post date:** [January 16, 2018, 8:37am UTC](https://forum.mattermost.com/t/solved-mattermost-service-automatically-stops-after-some-time/4339/4 "2018-01-16T08:37:55Z")

</div>

@pankaj,

Great news 🙂 Please do let us know if you see the issue again.

---

<div class="post-metadata">

**Author:** ![pankaj](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/pankaj/32/1800_2.png) [@pankaj](https://forum.mattermost.com/u/pankaj)\
**Post date:** [March 14, 2018, 8:59am UTC](https://forum.mattermost.com/t/solved-mattermost-service-automatically-stops-after-some-time/4339/5 "2018-03-14T08:59:57Z")

</div>

@lindy65

again I am having same issue,

MM is going down again and again, I have to manually restart it, is there any technique by which I can debug this issue,

I am running MM 4.5.0

[![CloudApp](https://duaw26jehqd4r.cloudfront.net/items/171w2q1G2i2Z3D3E2X1v/Image%202018-03-14%20at%202.26.32%20PM.png "Image 2018-03-14 at 2.26.32 PM.png") ](https://cl.ly/0y423D0q382T)

---

<div class="post-metadata">

**Author:** ![lindy65](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lindy65/32/1811_2.png) [@lindy65](https://forum.mattermost.com/u/lindy65)\
**Post date:** [March 14, 2018, 9:13am UTC](https://forum.mattermost.com/t/solved-mattermost-service-automatically-stops-after-some-time/4339/6 "2018-03-14T09:13:18Z")

</div>

Hi @pankaj,

Sorry to hear you’re running into the same issue again.

We’d suggest upgrading to the [latest version](https://about.mattermost.com/download/) or you can wait until Friday, 16th when v4.8 releases.

If the issue is still happening after upgrade, we can ask our engineers to help troubleshoot.
