Reputation: 21
I am running a simple Jenkins with the following steps: - Git connection and source code checkout - Execute shell : echo $JENKINS_HOME - Update Jira : Progress issues by workflow action.
This build is successful as the steps are pretty simple, but somehow it keeps reporting the below error in between Execute Shell step and Update Jira step. I see this error even if I disable Update Jira step.
ERROR: Unable to notify JIRA: [401] Unauthorized
To resolve the issue, I have already uninstalled all the Jira plugins, and was still getting the error. I reinstalled all Jira plugins, specifically "Jira Plugin" and re-added the Site details. I am able to successfully connect to Jira, and update Jira step confirms the same.
15:45:19 Started by user 15:45:19 [WS-CLEANUP] Deleting project workspace... 15:45:19 Cloning the remote Git repository . . . 15:45:21 + echo /opt/jenkins/application-data 15:45:21 /opt/jenkins/application-data 15:45:21 [JIRA] Updating issues using workflow action To Do. 15:45:21 [JIRA] JQL: issue = ACD-127 15:45:33 [JIRA] Issue ACD-127 transitioned to "In Progress" due to action "To Do". 15:45:34 ERROR: Unable to notify JIRA: [401] Unauthorized 15:45:34 [WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done 15:45:34 Finished: SUCCESS
This error is seen in all the Jenkins builds, even the ones not making use of Jira plugin. I am not sure how do I fix it, as I am unable to identify the cause of the issue. Please help.
Upvotes: 2
Views: 1446
Reputation: 51
Ok this answer is coming a bit late, but I ran into a very similar error message and could not find much information on it. I solved my issue, and perhaps this is the same solution for this as well.
There are number of different integration plugins for Jenkins and Jira. I believe the specific error message you're seeing ("ERROR: Unable to notify JIRA: [401] Unauthorized") is from the "Jira Integration for Jenkins" plugin: https://docs.marvelution.org/jji/server/release-notes/jira-integration-for-jenkins
I believe this Jenkins plugin is displaying this error message, which is different than the plugin you are probably actually using, which is called the "JIRA plugin". The "Jira Integration for Jenkins" plugin tries to notify Jira about any builds that complete, which is why you're seeing the error message. There are couple of different ways to resolve this:
Upvotes: 1