Slack notifications have stopped working

Issue #28 resolved
Dale Miller created an issue

We have a server where the slack notifications stopped working. It seemed to occur when we upgraded to a version after 1.5.6 that included the variable functionality that looks like it has been rolled back. We have since upgraded to the latest version which rolls back those changes but that has not helped fix anything and we are seeing the following error in the logs when I turn on debugging for your plugin. I snooped the network interface and it is not even attempting to send the slack messages out. We have another server that is working without issues but it was upgraded from an older version to the latest and never had a version installed that included the variable changes. The error mentioned variables so I am wondering if a restart of the server might fix it? Can you provide any guidance? I have looked at the source code but without knowing the internals of bamboo I am not sure how to proceed.

2017-09-07 15:25:45,186 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-9] [AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.bamboo.event.ChainCompletedEvent[source=com.atlassian.bamboo.chains.ChainExecutionManagerImpl@4a4f6dcc] plan=XOQTRUNK-FIN] from the invoker [LegacyListenerInvoker{eventListener=com.atlassian.bamboo.notification.chain.ChainCompletedNotificationListener@5bf59ef0}] java.lang.IllegalStateException: No variable context in current thread. Cannot substitute variables at com.atlassian.bamboo.variable.CustomVariableContextImpl.safeGetCurrentSubstitutor(CustomVariableContextImpl.java:216) at com.atlassian.bamboo.variable.CustomVariableContextImpl.substituteString(CustomVariableContextImpl.java:101) at sun.reflect.GeneratedMethodAccessor2553.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy375.substituteString(Unknown Source) at sun.reflect.GeneratedMethodAccessor2553.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy375.substituteString(Unknown Source) at com.atlassian.bamboo.slack.SlackNotificationTransport.<init>(SlackNotificationTransport.java:74) at com.atlassian.bamboo.slack.SlackNotificationRecipient.getTransports(SlackNotificationRecipient.java:172) at com.atlassian.bamboo.notification.NotificationDispatcherImpl.dispatchNotifications(NotificationDispatcherImpl.java:44) at com.atlassian.bamboo.notification.chain.ChainCompletedNotificationListener.handleEvent(ChainCompletedNotificationListener.java:81) at sun.reflect.GeneratedMethodAccessor1585.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.orm.hibernate5.support.OpenSessionInterceptor.invoke(OpenSessionInterceptor.java:93) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy1310.handleEvent(Unknown Source) at sun.reflect.GeneratedMethodAccessor1585.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.orm.hibernate5.support.OpenSessionInterceptor.invoke(OpenSessionInterceptor.java:84) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy1311.handleEvent(Unknown Source) at com.atlassian.event.legacy.LegacyListenerHandler$LegacyListenerInvoker.invoke(LegacyListenerHandler.java:55) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:47) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41) at java.lang.Thread.run(Thread.java:745)

Comments (4)

  1. Mathieu MARACHE
    • changed status to open

    I'm personally having the same issue than your first server, I've rolled back the change that impacted some other user as you have correctly understood. However some of my plans are sending notifications but most aren't anymore. It can't seem to put my finger on why yet, unfortunately...

  2. Dale Miller reporter

    Ok I will continue to try to debug here as well. I am planning to restart the bamboo server tonight to see if that clears up anything.

  3. Dale Miller reporter

    Closing this as Atlassian has reproduced the issue being related to a patch they gave us to fix a problem. I don't think our issue is a problem with your plugin at this point. Sorry for the false alarm.

  4. Log in to comment