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

Unable to rebuild a job triggered by polling (regression in 2.358)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • Affected versions: Jenkins v2.358+
      Jenkins master: Windows 10
      Jenkins slaves: Debian 10/11
    • 2.363

      After update Jenkins from v2.357 to v2.358+ (tried until latest version available -> v2.361), I can't rebuild a job which is triggered by GitLab webhooks (tag push events)

       

      Any logs are available in the build (check attached file) and I can't cancel the job. I have to restart Jenkins for that.

      In jenkins.err.log, I have this log:

      2022-08-02 10:17:58.033+0000 [id=79]    SEVERE    hudson.model.Executor#finish1: Executor threw an exception
      java.lang.NullPointerException
          at java.base/java.util.Objects.requireNonNull(Objects.java:221)
          at java.base/java.nio.file.Files.writeString(Files.java:3632)
          at hudson.triggers.SCMTrigger$SCMTriggerCause.onAddedTo(SCMTrigger.java:746)
          at hudson.model.CauseAction.onAttached(CauseAction.java:164)
          at hudson.model.Run.addAction(Run.java:433)
          at hudson.model.AbstractBuild.addAction(AbstractBuild.java:1010)
          at hudson.model.Executor.run(Executor.java:432)

       

      I tried all Jenkins versions available, tried to update all my plugins, change slave machine, nothing worked.

      I don't have this issue when I try to rebuild job triggered via Jenkins directly.

          [JENKINS-69210] Unable to rebuild a job triggered by polling (regression in 2.358)

          Sergei St added a comment - - edited

          Absolutely the same issue for Jenkins (2.361) on CentOS 7.2009 using OpenJDK 11.0.15

           

          Also, you can't abort or kill these jobs. Any POST requests to these jobs just do nothing. And it blocks next tasks (in queue) in this job. 

          After restart jenkins, stucked task just deleted

          Sergei St added a comment - - edited Absolutely the same issue for Jenkins (2.361) on CentOS 7.2009 using OpenJDK 11.0.15   Also, you can't abort or kill these jobs. Any POST requests to these jobs just do nothing. And it blocks next tasks (in queue) in this job.  After restart jenkins, stucked task just deleted

          Not limited to gitlab hooks, but also same effect with gerrit-trigger

          Christian Lohmaier added a comment - Not limited to gitlab hooks, but also same effect with gerrit-trigger

          Basil Crow added a comment -

          Basil Crow added a comment - alexdf cloph serzh Can you please test https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/main/jenkins-war/2.363-rc32717.cc2a_97fedd4c/jenkins-war-2.363-rc32717.cc2a_97fedd4c.war and confirm that the issue has been resolved?

          Alex DF added a comment -

          basil When I test your war file, Jenkins doesn't start:

          Exception in thread "main" java.lang.IllegalArgumentException: Unrecognized option: --httpsCertificate=********************************
              at winstone.cmdline.CmdLineParser.parse(CmdLineParser.java:52)
              at winstone.Launcher.getArgsFromCommandLine(Launcher.java:413)
              at winstone.Launcher.main(Launcher.java:383)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at executable.Main._main(Main.java:334)
              at executable.Main.main(Main.java:116)

           

          But after removing all authentication part, I could test a rebuild and it worked

          Alex DF added a comment - basil When I test your war file, Jenkins doesn't start: Exception in thread "main" java.lang.IllegalArgumentException: Unrecognized option: --httpsCertificate=********************************     at winstone.cmdline.CmdLineParser.parse(CmdLineParser.java:52)     at winstone.Launcher.getArgsFromCommandLine(Launcher.java:413)     at winstone.Launcher.main(Launcher.java:383)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.base/java.lang.reflect.Method.invoke(Method.java:566)     at executable.Main._main(Main.java:334)     at executable.Main.main(Main.java:116)   But after removing all authentication part, I could test a rebuild and it worked

          uygar bayar added a comment -

          The same problem occurs when trying to rebuild failed jobs. JENKINS-69124 

          uygar bayar added a comment - The same problem occurs when trying to rebuild failed jobs. JENKINS-69124  

          Basil Crow added a comment -

          But after removing all authentication part, I could test a rebuild and it worked

          Thanks for testing, alexdf! The Unrecognized option: --httpsCertificate error is an unrelated migration; see the proposed upgrade guidelines from jenkinsci/jenkins#6801:

          Support for OpenSSL-style PEM-encoded RSA private keys has been removed when running Jenkins with the embedded Jetty (Winstone) container and TLS. Specifically, the --httpsPrivateKey and --httpsCertificate flags have been removed in favor of the --httpsKeyStore flag. The removed flags have printed deprecation warnings since 2016 and were implemented with non-standard APIs that have since been removed from Java 17. The recommendation is to migrate to the --httpsKeyStore option, which takes a keystore as described in the documentation. As of JEP 229, PKCS12 is the recommended keystore type.

          Based on the successful testing by alexdf, jenkinsci/jenkins#6971 has been merged toward tomorrow's weekly release of 2.363.

          Basil Crow added a comment - But after removing all authentication part, I could test a rebuild and it worked Thanks for testing, alexdf ! The Unrecognized option: --httpsCertificate error is an unrelated migration; see the proposed upgrade guidelines from jenkinsci/jenkins#6801 : Support for OpenSSL-style PEM-encoded RSA private keys has been removed when running Jenkins with the embedded Jetty (Winstone) container and TLS. Specifically, the --httpsPrivateKey and --httpsCertificate flags have been removed in favor of the --httpsKeyStore flag. The removed flags have printed deprecation warnings since 2016 and were implemented with non-standard APIs that have since been removed from Java 17. The recommendation is to migrate to the --httpsKeyStore option, which takes a keystore as described in the documentation . As of JEP 229 , PKCS12 is the recommended keystore type. Based on the successful testing by alexdf , jenkinsci/jenkins#6971 has been merged toward tomorrow's weekly release of 2.363.

            basil Basil Crow
            alexdf Alex DF
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: