Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59149

'Test Connection' succesfully sends a message, but build-event notifications don't get sent

    XMLWordPrintable

Details

    Description

      We switched https to on last week and since we did, Jenkins is not posting Rocket.Chat Notifications for the specified events anymore.

      Furthermore, both Test Connection buttons display "Success", the button in the Job sends out a notification as well.

      What could cause the Plugin, to not send the specified notifications?

      Some output from the jenkins.err.log file on our machine.

      2019-08-30 12:08:30.625+0000 [id=60633] INFO j.p.r.RocketChatNotifier#perform: Invoking Completed...
      2019-08-30 12:08:30.625+0000 [id=60633] INFO j.p.r.ActiveNotifier#completed: Build completed. Checking for rocket notifiers
      2019-08-30 12:08:30.643+0000 [id=60633] INFO j.p.r.ActiveNotifier#completed: Could not send rocket message

      Attachments

        1. job_setup.png
          job_setup.png
          227 kB
        2. notification.png
          notification.png
          44 kB
        3. plugin_setup.png
          plugin_setup.png
          102 kB

        Activity

          mmmh really strange, I added more logging info which will be available in the next plugin version. Please check again and post the updated log info

          mreinhardt Martin Reinhardt added a comment - mmmh really strange, I added more logging info which will be available in the next plugin version. Please check again and post the updated log info

          Please retry with plugin version 1.4.4

          mreinhardt Martin Reinhardt added a comment - Please retry with plugin version 1.4.4
          regetskcob Daniel Bocksteger added a comment - - edited

          mreinhardt it seemed to be working. But I have to set the "RocketChat URL" and the "Trust server cert" checkbox every single time I enter the job's configuration. It's getting cleared every time.

          Without resetting those values, it's only working until the next configuration change.

          Both the url and the checkbox are set globally, why are those values ignored?

          regetskcob Daniel Bocksteger added a comment - - edited mreinhardt it seemed to be working. But I have to set the "RocketChat URL" and the "Trust server cert" checkbox every single time I enter the job's configuration. It's getting cleared every time. Without resetting those values, it's only working until the next configuration change. Both the url and the checkbox are set globally, why are those values ignored?

          Please take a further look on why the mentioned values getting reset.

          regetskcob Daniel Bocksteger added a comment - Please take a further look on why the mentioned values getting reset.

          I have the same issue as regetskcob. When I configure the notifier in the UI I also have to set RocketChat URL and Trust server cert on every job.

          I discovered a other issue. I tried to configure the Notifier via the Jenkins Job DSL with the following example:

           

          publishers {
              rocketChatNotifier {
                  channel('#jenkins')
                  rocketServerUrl("https://chatservername.com")
                  trustSSL(true)
                  notifySuccess(true)
                  notifyFailure(true)
              }
          }
          

          and got the following error:

           
          ERROR: (MyJob.groovy, line 42) No signature of method: rocketServerUrl() is applicable for argument types: (java.lang.String) values: [https://chatservername.com]
          Possible solutions: attachments(), channel(), commitInfoChoice(), customMessage(), includeCustomMessage(), includeTestLog(), includeTestSummary(), notifyAborted(), notifyBackToNormal(), notifyFailure(), notifyNotBuilt(), notifyRepeatedFailure(), notifySuccess(), notifyUnstable(), rawMessage(), startNotification(), webhookToken(), webhookTokenCredentialId()
          
          tstrohmeier Thomas Strohmeier added a comment - I have the same issue as regetskcob . When I configure the notifier in the UI I also have to set RocketChat URL and Trust server cert on every job. I discovered a other issue. I tried to configure the Notifier via the Jenkins Job DSL with the following example:   publishers { rocketChatNotifier { channel( '#jenkins' ) rocketServerUrl( "https: //chatservername.com" ) trustSSL( true ) notifySuccess( true ) notifyFailure( true ) } } and got the following error: ERROR: (MyJob.groovy, line 42) No signature of method: rocketServerUrl() is applicable for argument types: (java.lang. String ) values: [https: //chatservername.com] Possible solutions: attachments(), channel(), commitInfoChoice(), customMessage(), includeCustomMessage(), includeTestLog(), includeTestSummary(), notifyAborted(), notifyBackToNormal(), notifyFailure(), notifyNotBuilt(), notifyRepeatedFailure(), notifySuccess(), notifyUnstable(), rawMessage(), startNotification(), webhookToken(), webhookTokenCredentialId()

          @mreinhardt Any update on this issue?

          tstrohmeier Thomas Strohmeier added a comment - @ mreinhardt Any update on this issue?

          mreinhardt same question as tstrohmeier sent yesterday. Is there any update on this issue? It's really annoying that the plugin is clearing the config every time you enter the Buildjob-Configs...

           

          regetskcob Daniel Bocksteger added a comment - mreinhardt same question as tstrohmeier sent yesterday. Is there any update on this issue? It's really annoying that the plugin is clearing the config every time you enter the Buildjob-Configs...  

          Currently I have no idea why this is happening, but any PR is highly welcome

          mreinhardt Martin Reinhardt added a comment - Currently I have no idea why this is happening, but any PR is highly welcome

          mreinhardt I'm sorry, but I'm an iOS developer maintaining our Jenkins Buildserver. But I'm not a Jenkins plugin developer. It's really sad to see this kind of support for this Plugin. We really were exited to get notifications into our Rocket.Chat, but due to the issue above this is impossible at the moment.

          regetskcob Daniel Bocksteger added a comment - mreinhardt I'm sorry, but I'm an iOS developer maintaining our Jenkins Buildserver. But I'm not a Jenkins plugin developer. It's really sad to see this kind of support for this Plugin. We really were exited to get notifications into our Rocket.Chat, but due to the issue above this is impossible at the moment.

          I fully understand your issue. But I'm just maintaining this plugin in my spare time, so I'm getting not paid for this and currently not having much time for such projects. I tried to reproduce the issue, but wasn't able to get further on my dev machine after 2 hours due to other issues, currently.

          Sorry for that.

          mreinhardt Martin Reinhardt added a comment - I fully understand your issue. But I'm just maintaining this plugin in my spare time, so I'm getting not paid for this and currently not having much time for such projects. I tried to reproduce the issue, but wasn't able to get further on my dev machine after 2 hours due to other issues, currently. Sorry for that.

          I was able to reproduce the error locally and provide a fix.

          mreinhardt Martin Reinhardt added a comment - I was able to reproduce the error locally and provide a fix.

          Fixed in Version 1.4.6

          mreinhardt Martin Reinhardt added a comment - Fixed in Version 1.4.6

          mreinhardt when will be this update available via the Update-Center?

          regetskcob Daniel Bocksteger added a comment - mreinhardt when will be this update available via the Update-Center?

          People

            mreinhardt Martin Reinhardt
            regetskcob Daniel Bocksteger
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: