-
Notifications
You must be signed in to change notification settings - Fork 414
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
Upgrading to Slack 2.0 outbound webhooks breaks Jenkins [replicated] #191
Comments
Re-opening since there's a report stating it's still not fixed. I'll have to follow up with my own testing tomorrow. |
@samrocketman Why is the webhook URL even configurable in #160, rather than (maybe) having a checkbox for enable/disable? Seems unnecessary, and I've never seen a plugin do this. |
@daniel-beck not sure, for the most part I've largely handed off this project to @kmadel as I don't do much development for this plugin. Even when I did maintain it I didn't actually develop. I only merged others' pull requests. I wasn't really involved in the merge of #160 but when things broke I did provide a workaround to disable it. I agree it should have an option to be disabled. Side note, I handed it off because I don't/didn't actually use the slack plugin and I figure if someone is actually using it they'll be able to better support it. |
I wasn't involved in the development of the feature but I was involved with the code review. I recommended that the URL be configurable so you could run it alongside other similar plugins without clashing, especially since it was originally listening on /webhook. A checkbox to enable/disable sounds like a good enhancement. It also works around another concern that I had, which is that it was enabled by default, even if you have no interest in the functionality and could consider it a security risk. |
@OwensCode any idea how I can disable this once installed since jenkins is crashed, a quick fix could be to give the process to deactivate it if that's the problem + deactivate it by default for next release |
@netbe There's a link to a script by @samrocketman at the top of this page, in the "Workaround (for Jenkins admins)" section. |
Is this still an issue @samrocketman? Do we have any more information from people still being impacted by it after the fix was released? I would like to take a look at fixing it, if there is something to fix. |
@OwensCode let me take a look this evening or weekend. I'll follow up and try to be detailed if I can reproduce. |
This was issue for me. Fresh installation of slack plugin on jenkins 2.1. And even though I set up the outgoing webhooks, the Global Tool Configuration crashed pointing to
The workaround worked and the page no longer crashes. |
I had Jenkins failing during startup with the same issues as above. My solution was the following:
CAUTION: This will wipe your old Slack configurations, but I prioritized having the Slack integration up and running and took the time to redo the integrations. |
My workaround to get Jenkins back is to move the jobs directory to "jobs.safe", restart jenkins, uninstall the Slack plugin, remove the generated empty jobs directory and move "jobs.safe" The side effect of this is that I've had to change my Perforce population option from "forced clean and sync" to "Auto cleanup". I reluctantly reinstalled the plugin yesterday (so the version was the latest as of July 18) because my coworkers really want the slack notifications again. However, someone must have restarted Jenkins in the middle of the night because I came in to another dead Jenkins server. So, it's staying off. Here's the latest stack trace: java.lang.NullPointerException |
@ElaineRichards see the workaround discussed in the description of this issue. |
Please promote the solution of @pkkummermo from 13th of July. This did work for me as well. Thanks @pkkummermo |
I updated the original post to reflect his solution as "Option 1". |
Does 2.2 have the same problems? On 2.1 I'm able to go into Jenkins, but I have to regularly restart it after getting the NullPointerException from the slack plugin. |
I have installed lastest slack notification plugins (version 2.2) also encountered this error. |
to workaround the issue, run the script on Jenkins script console
It will output something like |
This is still happening on Jenkins ver. 2.114 + Slack Notification Plugin ver. 2.3 |
This is still happening. Is this plugin abandoned? Is there another plugin I should use instead? |
Can confirm that this issue still seems to be occurring (Jenkins 2.32.2 and Slack Plugin 2.3). Lots of the following in the logs:
|
Closing in favour of merged fix, will be released soon |
This issue is going to be the center point for tracking the patching progress. This issue supersedes the following issues:
This issue was caused by the following merged change: #160
Workaround (for Jenkins admins)
There's two options for a workaround.
Option 1
See #191 (comment) which will remove all slack configurations and give an opportunity to reconfigure your Jenkins with the latest update of the Slack plugin.
Option 2
This will entirely disable outbound webhooks in the Slack plugin 2.0.
$JENKINS_HOME
and create ainit.groovy.d/
directory.$JENKINS_HOME/init.groovy.d
.It should be back to normal and you'll be able to configure things again. Slack outbound webhooks will always be disabled for the duration you have this script installed in
init.groovy.d/
.Problematic conditions
I was able to successfully reproduce the issue under the following conditions.
authenticated
group to be administrators with theAdminister
permission.How to reproduce (for developers to patch)
./slack_bootstrap.sh
on a Unix-like machine. This will:Jenkins
http://localhost:8080/
Jenkins testing.
http://localhost:8080/securityRealm/finishLogin
Matrix-based security
. Set the following settings:authenticated
group must have administer permissions.anonymous
group must not have any permissions.From this point, you should get a stack trace like in JENKINS-33556. Following the above steps reproduces the issue every time.
Additional bootstrap commands:
./scripts/provision_jenkins.sh restart
./gradlew clean
./slack_bootstrap.sh
The text was updated successfully, but these errors were encountered: