Mattermost, Inc.

[Solved] Invalid memory address Runtime error when trying to start Mattermost following Debian installation guide

I’ve followed the Debian installation guide to install Mattermost on a single VPS (1GB RAM, 30GB SSD), but I can’t get Mattermost to start.

http://docs.mattermost.com/install/prod-debian.html

I’m using Mattermost v3.1.0. When I get to the step to test the Mattermost server, it fails to run as follows:

root@mattermost:/opt/mattermost/bin# ./platform 
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: interface conversion: interface is runtime.errorString, not string
[signal 0xb code=0x1 addr=0x0 pc=0x776cb2]

goroutine 1 [running]:
panic(0xcd1aa0, 0xc820015a00)
	/usr/local/go/src/runtime/panic.go:481 +0x3e6
main.doLoadConfig.func1(0xc820149d48)
	/var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/mattermost.go:73 +0x6f
panic(0xccbec0, 0xc82000a0e0)
	/usr/local/go/src/runtime/panic.go:443 +0x4e9
github.com/mattermost/platform/utils.LoadConfig(0xc82012dad0, 0x22)
	/var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/utils/config.go:172 +0xd12
main.doLoadConfig(0xdce990, 0xb, 0x0, 0x0)
	/var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/mattermost.go:76 +0x6a
main.main()
	/var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/mattermost.go:84 +0x43

I’ve tried searching the web on the error message, but all the results I’ve found have slightly different errors – I’ve checked the formatting of my JSON file, testing the PostgreSQL credentials… not sure what the problem could be. Any help would be appreciated.

Here happens this error too, I’m not installing over git hub I’m follow the document in mattermost site.

I am having the same issue, but I have noticed that if I set

“SendEmailNotifications”: false,

from true, it works again. That is if you enabled email notifications
Chris

Thanks. I didn’t enable email notifications, SendEmailNotifications is already false in my config.json.

  1. Can you run your config.json through a json validator and paste back confirmation there’s not a typo?

  2. If your file is valid, check the semantics of the settings.

  3. There was a bug in error message output that we didn’t catch until we started seeing reports like this. So you get this cryptic then when the json isn’t valid. It’s fixed on master and will be in for the next release.

@eric could we have your help tracking that an invalid config.json file is included in the next test pass? Also, when we do the 3.1 post-mortem, could you remember to bring up looking through past user issues on the forum and making sure we have tests covering those issues?

The panic issue is coming from the addition of internationalization in 2.0, I think it’s a sequencing issue where it’s trying to find the error messages in the translation files and something’s happening the wrong sequence.

Thanks. The config.json file validates.

What do you mean by “the semantics of the settings?” Like, that the actual values provided within config.json are sound?

Yes, another possibility is a typo that still has valid JSON. Could you try backing up your current config.json then trying to run with the default config.json that comes with the tarball and see if it works?

Then you can add back your config.json settings and see if you can find a typo that’s causing the failure.

Btw, the intended effect is to output an error message that gives more info on what went wrong, but there’s a bug in 3.1 where that message isn’t coming out. Fixed for 3.2 already.

Ah, awesome, thanks.

Yes, there was an errant “i” in one of the variable names (a vim typo), and I also think I had to ensure that the salts and keys that I changed were the same length. Found these differences by doing a diff between my config.json and the default. The error described is now gone!

I imagine this will be much less painful when 3.2 is available. :slight_smile: Thanks!