Mattermost, Inc.

Jira plugin not working after upgrading to 5.14


After upgrading to 5.14, Jira plugin does not start anymore.
It used to be working with the previous mattermost installation (5.11).
I have followed as usual the plugin guide but I don’t find anymore where to “select the username that this plugin is attached to”. (I could set it in mattermost 5.11 but not anymore in 5.14 since there is not the field anymore)

Steps to reproduce

Mattermost 5.14 docker version
Jira server

Expected behavior

webhook working

Observed behavior

Manually editing the file config.json adding the line “username”: “actualusername” (taken from the config.json of the 5.11 previous working instance) does not work (mattermost container get stuck on starting)

@rubius, can you share any logs from the plugin? (look for "plugin_id": "jira").

The Jira plugin was upgraded to use a bot account, and is no longer manually attached to a user. It’s possible something is failing in the migration to this new approach that perhaps the logs will surface.

Hi jesse,

thanks for your reply.

Here’s a piece of the log. I hope I’ve posted it correctly :slightly_smiling_face:

{"level":"error","ts":1566322000.5553951,"caller":"mlog/log.go:173","msg":"Unable to activate plugin","plugin_id":"jira","error":"unable to start plugin: jira: couldn't set profile image: SetProfileImage: Couldn't upload profile image, ","errorVerbose":"couldn't set profile image: SetProfileImage: Couldn't upload profile image, \nunable to start plugin: jira\*Environment).Activate\n\t/go/src/\*App).SyncPluginsActiveState\n\t/go/src/\*App).InitPlugins.func2\n\t/go/src/\*emitter).invokeConfigListeners.func1\n\t/go/src/\nsync.(*Map).Range\n\t/usr/local/go/src/sync/map.go:333\*emitter).invokeConfigListeners\n\t/go/src/\*commonStore).set\n\t/go/src/\*FileStore).Set\n\t/go/src/\*App).SaveConfig\n\t/go/src/\*App).EnablePlugin\n\t/go/src/\\n\t/go/src/\\n\t/go/src/\\n\t/go/src/\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\*Router).ServeHTTP\n\t/go/src/\*RateLimiter).RateLimitHandler.func1\n\t/go/src/\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:1995\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2774\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1878\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1337"}

Thanks, @rubius! Very unusual that SetProfileImage is the part that’s failing.

Do you have any additional logs around that (won’t necessarily be tagged with "plugin_id": "jira") from the server indicating any failures with the file store?

Hi @rubius,

I’ve had the same problem, I’ve traced it down to file permissions:

  1. get id of jira user account (which was created from the plugin and will be used as ):
    bin/mattermost user search jira
  2. look where user files are stored in config.json (outside of the container?):
    FileSettings - Directory (i.e. “/data/mattermost”)
  3. verify that the profile image is accessable to the user where mattermost is running with:
    ls -laR /data/mattermost/users/<jira-user-id>
    ps -fp $(pgrep mattermost)
  4. change file permissions to match the mattermost user:
    chown -R <mattermost-user>: /data/mattermost/users/<jira-user-id>
  5. re-enable the plugin