Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to get a Jira client for : no access token some time after mattermost server was (re-)started #1000

Closed
arminus opened this issue Nov 20, 2023 · 7 comments
Milestone

Comments

@arminus
Copy link

arminus commented Nov 20, 2023

I presently have jira 4.0.0 plugin installed in a self-hosted 9.0.0 mattermost, configured for self-hosted Jira 8 instance. This worked flawlessly for some weeks now, today I noticed that no more notifications where being sent with the following error in the server log:

ERR app/plugin_api.go:980 > timestamp=2023-11-20 12:47:47.993 +01:00 msg=PostNotifications: error while getting jiraClient, err: failed to get a Jira client for : no access token, please use /jira connect plugin_id=jira

When I restart the mattermost container, all is fine for about an hour or so, i.e. notifications work, then at some point I get the same error and nothing is being sent. My Jira instance is working fine all along and there are no connectivity issues between the mattermost server and the jira server.

@mickmister
Copy link
Contributor

Hi @arminus, thanks for reporting this issue. You've also provided all the related versions of software you're using. Thanks for this. Are you able to verify the exact version of Jira Server you're using?

Also just so I understand the issue, you are not re-connecting your account in the whole process. You are instead just restarting the Mattermost server and seeing the functionality work correctly for about an hour.

@Kshitij-Katiyar @raghavaggarwal2308 FYI on this new issue regarding Jira Server, so this is not related to the OAuth feature.

@arminus
Copy link
Author

arminus commented Nov 20, 2023

Our inhouse Jira is 8.5.4 - I'm fully aware that this is quite old, but until recently, this was not an issue, the Jira plugin (always 4.0.0) had worked flawlessly for weeks.

And no, I'm not reconnecting, I'm just restarting the mattermost server.

So the obvious question is what changed. Nothing on the Jira side, not the Jira plugin and neither mattermost itself which is in 9.0.0 since at least a month.

What's also strange is the error message failed to get a Jira client for : ... looks like there's something missing after the for? Is that some clue?

@arminus
Copy link
Author

arminus commented Nov 21, 2023

Update from my side: This does not see to be an issue of elapsed time and kind of seems to come and go. The mattermost container ran overnight, everything was ok until about, 14:00, then I observed one single error at 14:11:23 but this time, it "straightened itself out on its own", i.e. I didn't restart but still got notifications after 14:11:23. Very strange...

I also cannot say if that error at 14:11:23 was caused by an actual notification being triggered by Jira, or if this is only some "background" thing after all...

@arminus
Copy link
Author

arminus commented Nov 21, 2023

Ok, this seems to be an error which actually does not affect the sending of notifications, they apparently appear from time to time, but notifications still seem to get sent.

I think I was wrongly missing notifications yesterday which were actually updates to subtasks - which are not supported.

@mickmister
Copy link
Contributor

@arminus The "no access token" part of the error seems to be unrelated to subtasks though. Indeed, the fact that subtasks are unsupported is expected. Are you thinking these two issues are related?

@arminus
Copy link
Author

arminus commented Nov 22, 2023

@mickmister no, these issues are not connected. When first reporting this, I thought I had missed notifications, but that was maybe not the case, since at that point maybe only subtasks where modified. Also at that point, /jira subscribe list returned an error (which I didn't save :-/) and a restart seemed to have fixed everything.

All along all involved systems ran without config changes other than maybe OS updates.

Meanwhile, it is clear though, that the error I reported does not seem to prevent notifications being sent. A bunch of them where logged yesterday, but today notifications still arrive and /jira subscribe list does work.

@ayusht2810
Copy link
Contributor

Closing the issue as the feature and notifications seem to be working fine according to the comment #1000 (comment).

@raghavaggarwal2308 raghavaggarwal2308 added this to the v4.2.0 milestone Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

4 participants