java.lang.IllegalStateException: The Bamboo Smack client could not be initiated.

Atlassian JIRA | Martin Meinhold | 3 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    We were alerted about the HipChat messaging being broken on JBAC. Looking at the server log, I was seeing the following stack trace: {noformat} 2014-06-12 12:42:38,182 INFO [Thread-30] [BambooSmackClient] Connecting to InstantMessagingServerDefinitionImpl{name='Default', host='chat.hipchat.com', port=5222, username='xxxxxxx@chat.hipchat.com', resource='jira-bamboo.internal.at lassian.com', secureConnectionRequired=true, enforceLegacySsl=false} Exception in thread "Thread-30" java.lang.IllegalStateException: The Bamboo Smack client could not be initiated. at com.atlassian.bamboo.xmpp.BambooSmackClient$BambooXMPPConnection.getConnection(BambooSmackClient.java:253) at com.atlassian.bamboo.xmpp.BambooSmackClient$BambooXMPPConnection.syncSend(BambooSmackClient.java:239) at com.atlassian.bamboo.xmpp.BambooSmackClient$XmppWorkerThread.run(BambooSmackClient.java:278) {noformat} We don't know what caused this problem and the exception that caused the problem is ignored in the code (yay). Unfortunately, it looks like a restart is the only solution to this: * The code is contained in bamboo core; so there is no quick win by disabling and re-enabling the plugin * The unhandled ISE exception caused the worker thread to die; a new thread is only created when the {{BambooSmackClient}} is created - which itself is a Spring bean so it only exists once I suggest to include at least the reason contained in the ignored exception in the ISE. Hardening the worker thread and making sure that when it dies there is a new one would be nice as well. ATM we're running Atlassian Bamboo version 5.6-m1 build 4402 - 15 May 14. Note: using the test functionality on via the UI, I could see the following exception in the server log: {noformat} 2014-06-13 04:55:11,108 INFO [http-bio-8085-exec-133] [BambooSmackClient] Connecting to InstantMessagingServerDefinitionImpl{name='Default', host='chat.hipchat.com', port=5222, username='xxxxxx@chat.hipchat.com', resource='jira-bamboo.internal.atlassian.com', secureConnectionRequired=true, enforceLegacySsl=false} 2014-06-13 04:55:11,126 INFO [http-bio-8085-exec-133] [ConfigureInstantMessagingServer] Exception thrown from IM validation chat.hipchat.com:5222 Exception: XMPPError connecting to chat.hipchat.com:5222.; : remote-server-error(502) at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:600) at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1022) at com.atlassian.bamboo.xmpp.BambooSmackClient$BambooXMPPConnection.createNewConnection(BambooSmackClient.java:197) at com.atlassian.bamboo.xmpp.BambooSmackClient.connect(BambooSmackClient.java:69) at com.atlassian.bamboo.ww2.actions.admin.instantmessagingserver.ConfigureInstantMessagingServer.testImServer(ConfigureInstantMessagingServer.java:218) at com.atlassian.bamboo.ww2.actions.admin.instantmessagingserver.ConfigureInstantMessagingServer.doEdit(ConfigureInstantMessagingServer.java:165) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.FieldErrorUsageVerifier.intercept(FieldErrorUsageVerifier.java:49) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.JSONValidationInterceptor.doIntercept(JSONValidationInterceptor.java:69) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.SimpleConversionErrorInterceptor.intercept(SimpleConversionErrorInterceptor.java:78) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ... {noformat} The {{remote-server-error(502)}} indicates a problem with HipChat?

    Atlassian JIRA | 3 years ago | Martin Meinhold
    java.lang.IllegalStateException: The Bamboo Smack client could not be initiated.
  2. 0

    We were alerted about the HipChat messaging being broken on JBAC. Looking at the server log, I was seeing the following stack trace: {noformat} 2014-06-12 12:42:38,182 INFO [Thread-30] [BambooSmackClient] Connecting to InstantMessagingServerDefinitionImpl{name='Default', host='chat.hipchat.com', port=5222, username='xxxxxxx@chat.hipchat.com', resource='jira-bamboo.internal.at lassian.com', secureConnectionRequired=true, enforceLegacySsl=false} Exception in thread "Thread-30" java.lang.IllegalStateException: The Bamboo Smack client could not be initiated. at com.atlassian.bamboo.xmpp.BambooSmackClient$BambooXMPPConnection.getConnection(BambooSmackClient.java:253) at com.atlassian.bamboo.xmpp.BambooSmackClient$BambooXMPPConnection.syncSend(BambooSmackClient.java:239) at com.atlassian.bamboo.xmpp.BambooSmackClient$XmppWorkerThread.run(BambooSmackClient.java:278) {noformat} We don't know what caused this problem and the exception that caused the problem is ignored in the code (yay). Unfortunately, it looks like a restart is the only solution to this: * The code is contained in bamboo core; so there is no quick win by disabling and re-enabling the plugin * The unhandled ISE exception caused the worker thread to die; a new thread is only created when the {{BambooSmackClient}} is created - which itself is a Spring bean so it only exists once I suggest to include at least the reason contained in the ignored exception in the ISE. Hardening the worker thread and making sure that when it dies there is a new one would be nice as well. ATM we're running Atlassian Bamboo version 5.6-m1 build 4402 - 15 May 14. Note: using the test functionality on via the UI, I could see the following exception in the server log: {noformat} 2014-06-13 04:55:11,108 INFO [http-bio-8085-exec-133] [BambooSmackClient] Connecting to InstantMessagingServerDefinitionImpl{name='Default', host='chat.hipchat.com', port=5222, username='xxxxxx@chat.hipchat.com', resource='jira-bamboo.internal.atlassian.com', secureConnectionRequired=true, enforceLegacySsl=false} 2014-06-13 04:55:11,126 INFO [http-bio-8085-exec-133] [ConfigureInstantMessagingServer] Exception thrown from IM validation chat.hipchat.com:5222 Exception: XMPPError connecting to chat.hipchat.com:5222.; : remote-server-error(502) at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:600) at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1022) at com.atlassian.bamboo.xmpp.BambooSmackClient$BambooXMPPConnection.createNewConnection(BambooSmackClient.java:197) at com.atlassian.bamboo.xmpp.BambooSmackClient.connect(BambooSmackClient.java:69) at com.atlassian.bamboo.ww2.actions.admin.instantmessagingserver.ConfigureInstantMessagingServer.testImServer(ConfigureInstantMessagingServer.java:218) at com.atlassian.bamboo.ww2.actions.admin.instantmessagingserver.ConfigureInstantMessagingServer.doEdit(ConfigureInstantMessagingServer.java:165) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.FieldErrorUsageVerifier.intercept(FieldErrorUsageVerifier.java:49) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.JSONValidationInterceptor.doIntercept(JSONValidationInterceptor.java:69) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) at com.atlassian.bamboo.ww2.interceptors.SimpleConversionErrorInterceptor.intercept(SimpleConversionErrorInterceptor.java:78) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) ... {noformat} The {{remote-server-error(502)}} indicates a problem with HipChat?

    Atlassian JIRA | 3 years ago | Martin Meinhold
    java.lang.IllegalStateException: The Bamboo Smack client could not be initiated.

    Root Cause Analysis

    1. java.lang.IllegalStateException

      The Bamboo Smack client could not be initiated.

      at com.atlassian.bamboo.xmpp.BambooSmackClient$BambooXMPPConnection.getConnection()
    2. com.atlassian.bamboo
      BambooSmackClient$XmppWorkerThread.run
      1. com.atlassian.bamboo.xmpp.BambooSmackClient$BambooXMPPConnection.getConnection(BambooSmackClient.java:253)
      2. com.atlassian.bamboo.xmpp.BambooSmackClient$BambooXMPPConnection.syncSend(BambooSmackClient.java:239)
      3. com.atlassian.bamboo.xmpp.BambooSmackClient$XmppWorkerThread.run(BambooSmackClient.java:278)
      3 frames