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

"hudson-cli build" works only with "Anonymous Job Read Access"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: cli
    • Labels:
      None
    • Environment:
      java version "1.6.0_18"
      OpenJDK Runtime Environment (IcedTea6 1.8.1) (6b18-1.8.1-0ubuntu1)
      OpenJDK 64-Bit Server VM (build 16.0-b13, mixed mode)
      Hudson 1.380
    • Similar Issues:

      Description

      I use LDAP Auth, and Matrix-based security. Anonymous users have no access.

      When i try do "java -jar hudson-cli.jar -s http://localhost:8080 build my_project --username builder --password ********", I get error message:
      java.lang.NullPointerException
      at hudson.util.CaseInsensitiveComparator.compare(CaseInsensitiveComparator.java:40)
      at hudson.util.CaseInsensitiveComparator.compare(CaseInsensitiveComparator.java:34)
      at java.util.TreeMap.getEntryUsingComparator(TreeMap.java:368)
      at java.util.TreeMap.getEntry(TreeMap.java:339)
      at java.util.TreeMap.get(TreeMap.java:272)
      at hudson.util.CopyOnWriteMap.get(CopyOnWriteMap.java:89)
      at hudson.model.Hudson.getItem(Hudson.java:1949)
      at hudson.model.AbstractProject.findNearest(AbstractProject.java:1743)
      at hudson.cli.handlers.AbstractProjectOptionHandler.parseArguments(AbstractProjectOptionHandler.java:54)
      at org.kohsuke.args4j.CmdLineParser.parseArgument(CmdLineParser.java:435)
      at hudson.cli.CLICommand.main(CLICommand.java:177)
      at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:68)
      at sun.reflect.GeneratedMethodAccessor244.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
      at hudson.remoting.UserRequest.perform(UserRequest.java:114)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:270)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      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:636)

      But! If I grand "Job Read" access to Anonymous, all works fine. Is it a bug?

        Attachments

          Activity

          Hide
          numain Numain added a comment -

          Thanks for the "Job Read" tip!

          I have the same problem (Hudson 1.380, windows based environment).

          Show
          numain Numain added a comment - Thanks for the "Job Read" tip! I have the same problem (Hudson 1.380, windows based environment).
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java
          core/src/main/java/jenkins/model/Jenkins.java
          http://jenkins-ci.org/commit/jenkins/a77c21dd2c7cee6953a67fe7fae0552d0912c61c
          Log:
          [FIXED JENKINS-7826] it is possible that findNearest finds no match, if
          the user has no read permission on any of the jobs.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java core/src/main/java/jenkins/model/Jenkins.java http://jenkins-ci.org/commit/jenkins/a77c21dd2c7cee6953a67fe7fae0552d0912c61c Log: [FIXED JENKINS-7826] it is possible that findNearest finds no match, if the user has no read permission on any of the jobs.
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1038
          [FIXED JENKINS-7826] it is possible that findNearest finds no match, if

          Kohsuke Kawaguchi : a77c21dd2c7cee6953a67fe7fae0552d0912c61c
          Files :

          • changelog.html
          • core/src/main/java/jenkins/model/Jenkins.java
          • core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1038 [FIXED JENKINS-7826] it is possible that findNearest finds no match, if Kohsuke Kawaguchi : a77c21dd2c7cee6953a67fe7fae0552d0912c61c Files : changelog.html core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java
          core/src/main/java/jenkins/model/Jenkins.java
          http://jenkins-ci.org/commit/jenkins/a77c21dd2c7cee6953a67fe7fae0552d0912c61c
          Log:
          [FIXED JENKINS-7826] it is possible that findNearest finds no match, if
          the user has no read permission on any of the jobs.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java core/src/main/java/jenkins/model/Jenkins.java http://jenkins-ci.org/commit/jenkins/a77c21dd2c7cee6953a67fe7fae0552d0912c61c Log: [FIXED JENKINS-7826] it is possible that findNearest finds no match, if the user has no read permission on any of the jobs.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java
          core/src/main/java/jenkins/model/Jenkins.java
          http://jenkins-ci.org/commit/jenkins/a77c21dd2c7cee6953a67fe7fae0552d0912c61c
          Log:
          [FIXED JENKINS-7826] it is possible that findNearest finds no match, if
          the user has no read permission on any of the jobs.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java core/src/main/java/jenkins/model/Jenkins.java http://jenkins-ci.org/commit/jenkins/a77c21dd2c7cee6953a67fe7fae0552d0912c61c Log: [FIXED JENKINS-7826] it is possible that findNearest finds no match, if the user has no read permission on any of the jobs.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            herclogon herclogon
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: