Single-server, CentOS 7 initial setup -- Won't launch as service

I’ll start off by saying that I’m a Windows / Storage admin. I’ve just been put on this project as a bit of a learning project, so my linux experience is very limited.

I’ve configured a single CentOS 7 server and have been following the RHEL 7 guide to the T.

I’ve gotten to Step 8 on Setup Mattermost Server.

It starts just fine if I run ./platform, but creating the service does not seem to work. How can I debug that service creation? Does RHEL and CentOS 7 differ in the aspect of services?

I get no errors when I type ‘service mattermost restart’, but I cannot connect to port 8065 unless I manually run ./platform.

Any help would be appreciated. I swear I’m a quick learner =)

Perhaps its this: in /etc/systemd/system/mattermost.service,
you have to define the correct directories that you’ve installed mattermost to. Also check for the User to be existing and having permissions to start the binaries

CentOS 7 is systemd-based. Try typing the following:

systemctl start mattermost
systemctl status matermost
1 Like

Thank you, this put me onto the right track. I think it’s the user that has been configured to run the service that’s causing the issue.

[root@localhost bin]# su mattermost
bash-4.2$ ./platform
FileLogWriter("/opt/mattermost/logs/mattermost.log"): open /opt/mattermost/logs/mattermost.log: permission denied
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x5ec0fc]

goroutine 1 [running]:
/go/src/ +0x4ec, 0x22)
/go/src/ +0x5f5
/go/src/ +0x43

goroutine 17 [syscall, locked to thread]:
/usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 5 [syscall]:
/usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 7 [chan receive]:, 0x7fb8401ab1e8, 0xc820024010)
/go/src/ +0x80
created by
/go/src/ +0x6e

This fixed it:

[root@localhost mattermost]# cd …/logs/
[root@localhost logs]# chown -R mattermost:mattermost mattermost.log
[root@localhost logs]# chmod -R g+w mattermost.log