• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • None
    • jenkins-1.480.1
      Linux, Oracle jdk1.7.0_11, headless mode enabled

      After activation of the File Leak Detector Plugin via the 'activate' button, the Jenkins CLI stops working:

      $ java -jar jenkins-cli.jar -s http://myjenkins:8080 help
      Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
      at $Proxy2.main(Unknown Source)
      at hudson.cli.CLI.execute(CLI.java:322)
      at hudson.cli.CLI._main(CLI.java:468)
      at hudson.cli.CLI.main(CLI.java:373)
      Caused by: java.io.IOException: Remote call on CLI connection to http://myjenkins:8080 failed
      at hudson.remoting.Channel.call(Channel.java:673)
      at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
      ... 4 more
      Caused by: java.lang.IllegalAccessError: org/kohsuke/args4j/CmdLineParser$1
      at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:94)
      at hudson.cli.CLICommand.main(CLICommand.java:211)
      at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
      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:601)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
      at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)

      The corresponding line in args4j::CmdLineParser.java is

      Collections.sort(options, new Comparator<OptionHandler>() {
      public int compare(OptionHandler o1, OptionHandler o2)

      { return o1.option.toString().compareTo(o2.option.toString()); }

      });

      Please have a look - the plugin is really useful, but the CLI is essential.

      PS
      I tried to file this issue against the 'file-leak-detector' component, but that doesn't exist. Please forward as appropriate.

          [JENKINS-16544] File Leak Detector plugin breaks CLI interface

          Alexander Ost created issue -
          Alexander Ost made changes -
          Description Original: After activation of the File Leak Detector Plugin via the 'avtivate' button, the Jenkins CLI stops working:

          $ java -jar jenkins-cli.jar -s http://myjenkins:8080 help
          Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
                  at $Proxy2.main(Unknown Source)
                  at hudson.cli.CLI.execute(CLI.java:322)
                  at hudson.cli.CLI._main(CLI.java:468)
                  at hudson.cli.CLI.main(CLI.java:373)
          Caused by: java.io.IOException: Remote call on CLI connection to http://myjenkins:8080 failed
                  at hudson.remoting.Channel.call(Channel.java:673)
                  at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
                  ... 4 more
          Caused by: java.lang.IllegalAccessError: org/kohsuke/args4j/CmdLineParser$1
                  at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:94)
                  at hudson.cli.CLICommand.main(CLICommand.java:211)
                  at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
                  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:601)
                  at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
                  at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
                  at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
                  at hudson.remoting.UserRequest.perform(UserRequest.java:118)
                  at hudson.remoting.UserRequest.perform(UserRequest.java:48)
                  at hudson.remoting.Request$2.run(Request.java:326)
                  at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
                  at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
                  at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                  at java.lang.Thread.run(Thread.java:722)


          The corresponding line in args4j::CmdLineParser.java is


          Collections.sort(options, new Comparator<OptionHandler>() {
          public int compare(OptionHandler o1, OptionHandler o2) {
          return o1.option.toString().compareTo(o2.option.toString());
          }
          });

          Please have a look - the plugin is really useful, but the CLI is essential.


          PS
          I tried to file this issue against the 'file-leak-detector' component, but that doesn't exist. Please forward as appropriate.
          New: After activation of the File Leak Detector Plugin via the 'activate' button, the Jenkins CLI stops working:

          $ java -jar jenkins-cli.jar -s http://myjenkins:8080 help
          Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
                  at $Proxy2.main(Unknown Source)
                  at hudson.cli.CLI.execute(CLI.java:322)
                  at hudson.cli.CLI._main(CLI.java:468)
                  at hudson.cli.CLI.main(CLI.java:373)
          Caused by: java.io.IOException: Remote call on CLI connection to http://myjenkins:8080 failed
                  at hudson.remoting.Channel.call(Channel.java:673)
                  at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
                  ... 4 more
          Caused by: java.lang.IllegalAccessError: org/kohsuke/args4j/CmdLineParser$1
                  at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:94)
                  at hudson.cli.CLICommand.main(CLICommand.java:211)
                  at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
                  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:601)
                  at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
                  at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
                  at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
                  at hudson.remoting.UserRequest.perform(UserRequest.java:118)
                  at hudson.remoting.UserRequest.perform(UserRequest.java:48)
                  at hudson.remoting.Request$2.run(Request.java:326)
                  at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
                  at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
                  at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                  at java.lang.Thread.run(Thread.java:722)


          The corresponding line in args4j::CmdLineParser.java is


          Collections.sort(options, new Comparator<OptionHandler>() {
          public int compare(OptionHandler o1, OptionHandler o2) {
          return o1.option.toString().compareTo(o2.option.toString());
          }
          });

          Please have a look - the plugin is really useful, but the CLI is essential.


          PS
          I tried to file this issue against the 'file-leak-detector' component, but that doesn't exist. Please forward as appropriate.

          Markus added a comment -

          We seem to be getting the same message on Jenkins ver. 1.509.2 after enabling File Leak Detector.

          [bash|jenkins|~/bin]$ java -jar jenkins-cli.jar -s http://jenkins:8080/ help
          Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
          at $Proxy2.main(Unknown Source)
          at hudson.cli.CLI.execute(CLI.java:333)
          at hudson.cli.CLI._main(CLI.java:499)
          at hudson.cli.CLI.main(CLI.java:384)
          Caused by: java.io.IOException: Remote call on CLI connection to http://jenkins.nordicsemi.no:8080/ failed
          at hudson.remoting.Channel.call(Channel.java:681)
          at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
          ... 4 more
          Caused by: java.lang.IllegalAccessError: org/kohsuke/args4j/CmdLineParser$1
          at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:94)
          at hudson.cli.CLICommand.main(CLICommand.java:211)
          at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
          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 hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:326)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
          at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:724)
          

          Markus added a comment - We seem to be getting the same message on Jenkins ver. 1.509.2 after enabling File Leak Detector. [bash|jenkins|~/bin]$ java -jar jenkins-cli.jar -s http://jenkins:8080/ help Exception in thread "main" java.lang.reflect.UndeclaredThrowableException at $Proxy2.main(Unknown Source) at hudson.cli.CLI.execute(CLI.java:333) at hudson.cli.CLI._main(CLI.java:499) at hudson.cli.CLI.main(CLI.java:384) Caused by: java.io.IOException: Remote call on CLI connection to http://jenkins.nordicsemi.no:8080/ failed at hudson.remoting.Channel.call(Channel.java:681) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158) ... 4 more Caused by: java.lang.IllegalAccessError: org/kohsuke/args4j/CmdLineParser$1 at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:94) at hudson.cli.CLICommand.main(CLICommand.java:211) at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92) 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 hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63) at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)
          Jesse Glick made changes -
          Component/s New: file-leak-detector [ 17595 ]
          Component/s Original: core [ 15593 ]
          Priority Original: Major [ 3 ] New: Critical [ 2 ]

          Jesse Glick added a comment -

          I suspect the problem is that org.kohsuke:file-leak-detector assembles (jar-with-dependencies) args4j:args4j, which gets injected into the (boot?) classpath when the Java agent is loaded, and that clashes with the version bundled in jenkins-core.jar!/WEB-INF/lib/.

          Jesse Glick added a comment - I suspect the problem is that org.kohsuke:file-leak-detector assembles ( jar-with-dependencies ) args4j:args4j , which gets injected into the (boot?) classpath when the Java agent is loaded, and that clashes with the version bundled in jenkins-core.jar!/WEB-INF/lib/ .

          Jesse Glick added a comment -

          Workaround: run some CLI command (such as help) before activating the detector.

          Jesse Glick added a comment - Workaround: run some CLI command (such as help ) before activating the detector.
          Jesse Glick made changes -
          Assignee New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Jesse Glick added a comment -

          Jesse Glick added a comment - https://github.com/kohsuke/file-leak-detector/pull/6 and https://github.com/jenkinsci/file-leak-detector-plugin/pull/1 should fix this.

          Markus added a comment -

          I can confirm that the workaround makes it possible for us to run CLI commands while the File Leak Detector is active.

          Markus added a comment - I can confirm that the workaround makes it possible for us to run CLI commands while the File Leak Detector is active.

            jglick Jesse Glick
            arost Alexander Ost
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: