I am following the Hello, World plugin tutorial here: https://developers.mattermost.com/integrate/plugins/components/server/hello-world/.
I have mattermost installed on my local machine by following: Redirect
Here is my mattermost and db version:
Mattermost Version: 5.1.0
Database Schema Version: 5.1.0
Database: mysql
Here is my docker installation’s OS and arch.
root@4bdee6a90b82:/mm/mattermost/plugins# uname -a
Linux 4bdee6a90b82 4.9.87-linuxkit-aufs #1 SMP Wed Mar 14 15:12:16 UTC 2018 x86_64 GNU/Linux
These are the tutorial steps I followed for building the executable plugin:
➜ my-plugin$ GOOS=linux GOARCH=amd64 go build -o plugin plugin.go
➜ my-plugin$ ls
plugin plugin.go plugin.yaml
➜ my-plugin$ file plugin
plugin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped
➜ my-plugin$ cat plugin.yaml
id: com.mattermost.server-hello-world
name: Server "Hello, world!"
backend:
executable: plugin
I uploaded the plugin on http://localhost:8065/admin_console/plugins/management
.
I clicked Activate
, which shows This plugin is starting.
After a while, it shows This plugin failed to start. Check your system logs for errors.
The logs show this:
{"level":"error","ts":1533035791.792267,"caller":"app/plugin.go:158","msg":"Plugin failed to activate","plugin_id":"com.mattermost.server-hello-world","err":"unable to start plugin: com.mattermost.server-hello-world: timed out waiting for plugin"}
How do I debug this?
Some headway that I was able to make:
I downloaded a certain “meme” plugin from GitHub - mattermost/mattermost-plugin-memes: Add culture to your Mattermost with memes 🔌. That works.
So I checked both the plugin executables:
root@4bdee6a90b82:/mm/mattermost/plugins# file memes/plugin.exe
memes/plugin.exe: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped
root@4bdee6a90b82:/mm/mattermost/plugins# file com.mattermost.server-hello-world/plugin
com.mattermost.server-hello-world/plugin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
Could this difference be the cause? If yes, what options do I need to pass in order to the same executable as with the meme plugin.exe?
Thanks in advance for your help!