we use the gitlab omnibus package and want to use mattermost. We set up mattermost and gitlab on same host with two different DNS-Names. Both running on HTTPS.
After a short test with some developers we try to clean up and delete some empty teams called “test” or “Admin”.
If I try to delete the teams with
sudo -u mattermost ./mattermost -config=/var/opt/gitlab/mattermost/config.json team delete Admin
here you see command and Error out put
sudo -u mattermost ./mattermost -config=/var/opt/gitlab/mattermost/config.json team delete Admin
Have you performed a database backup? (YES/NO):
YES
Are you sure you want to delete the teams specified? All data will be permanently deleted? (YES/NO):
YES
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x416488]
goroutine 1 [running]:
panic(0xbde860, 0xc4200100c0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
main.getTeamFromTeamArg(0x7ffc3f3918e4, 0x5, 0x1)
/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/cmd/platform/teamargs.go:21 +0x28
main.getTeamsFromTeamArgs(0xc4200cd3c0, 0x1, 0x2, 0x3, 0x1, 0x0)
/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/cmd/platform/teamargs.go:13 +0xa2
main.deleteTeamsCmdF(0x106b700, 0xc4200cd3c0, 0x1, 0x2, 0x0, 0x0)
/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/cmd/platform/team.go:187 +0xdf
github.com/mattermost/platform/vendor/github.com/spf13/cobra.(*Command).execute(0x106b700, 0xc4200cd1a0, 0x2, 0x2, 0x106b700, 0xc4200cd1a0)
/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/vendor/github.com/spf13/cobra/command.go:632 +0x23e
github.com/mattermost/platform/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4200986c0, 0x0, 0x0, 0x0)
/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/vendor/github.com/spf13/cobra/command.go:722 +0x367
github.com/mattermost/platform/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4200986c0, 0xc42010ea40, 0xb)
/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/vendor/github.com/spf13/cobra/command.go:681 +0x2b
main.main()
/var/lib/jenkins/jobs/msr/jobs/platform-release/workspace/src/github.com/mattermost/platform/cmd/platform/mattermost.go:50 +0x49f
I got the same error when calling other command like team add Admin username
My organization is running GitLab Community 9.0 using the integrated Mattermost and have the same problem (not being able to delete teams using the cli).
I was creating nested groups in GL 9.0 and there is a checkbox to automatically create an associated Mattermost team. I’d like to delete these teams.
The mattermost cli that comes bundled with GitLab Community Edition is in the following directory, not in the /var/opt/gitlab/mattermost/bin directory:
/opt/gitlab/embedded/bin
So, I cd to the /opt/gitlab/embedded/bin directory.
I don’t think I have an Admin team so I’ll use the team wtas which is one of the ones I need to delete.
sudo su mattermost ./mattermost team delete wtas -c /var/opt/gitlab/mattermost/config.json
Yes, that was merely a sample command based on what was early written, glad you adjusted to your needs.
And does it get deleted afterward despite the errors?
also if you could confirm the permissions at /var/opt/gitlab/mattermost/config.json with ls -la /var/opt/gitlab/mattermost/config.json that would be helpful.
what version of mattermost is GL9 installing for you? guess I ran out of ideas, the permissions look OK, the config.json~ was probably a left over copy from some command
perhaps you might want to try re-installing the latest binary version instead… I know you’re using GL for the simplicity but its an option.
I just want to mention that we have the same issues here. We are also running the same mattermost version on a gitlab installation and would like to use the CLI.
problem still exists for me, was on 3.7 and just upgraded to 3.9.
Some commands still seem to work, but all of them i’ve tried except the help command give the panic: runtime error: invalide memory address or nil pointer dereference message and a stacktrace