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

jenkins_cli fails to launch groovy script (always the "deprecated -remoting mode" error)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: cli
    • Labels:
      None
    • Environment:
      jenkins 2.60.1
    • Similar Issues:

      Description

      Hi,

      I cannot make jenkins_cli to launch groovy scripts.
      I have tried many connection methods but each time I get a "This command is requesting the deprecated -remoting mode" even-though I am not using this connection method.

      For instance, I tried with SSH connection:
      I have disabled the remote connection mode & I started SSHD on a fixed port. (see config.png attachement)
      I have then put my ssh public key in my user settings.

      "help" command works fine:
      ssh -l <MyUserName> -p <MyFixedSSHDPort> <JENKINS_HOST_MACHINE_NAME> help
      With this I receive the help of jenkins_cli.

      "who-am-i" command confirms I am correctly authenticated:
      ssh -l <MyUserName> -p <MyFixedSSHDPort> <JENKINS_HOST_MACHINE_NAME> who-am-i
      Authenticated as: <MyUserName>

      The problem is when I try this:
      ssh -l <MyUserName> -p <MyFixedSSHDPort> <JENKINS_HOST_MACHINE_NAME> groovy MyScript.groovy

      It fails with this error:
      ERROR: This command is requesting the deprecated -remoting mode. See https://jenkins.io/redirect/cli-command-requires-channel

      I also tried with -auth, -http, I always get this same error message.
      No error is logged in jenkins logs

      Looks like a bug to me but any suggestion or workaround is welcomed.

      Thank you

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          This works as designed; the non-remoting CLI cannot read local files, so this mode of operation won't work if remoting CLI is disabled.

          Try the mode using standard in, documented on the help for groovy. (Please ask any followup questions on the jenkinsci-users mailing list, only few people process incoming issue reports.)

          Show
          danielbeck Daniel Beck added a comment - This works as designed; the non-remoting CLI cannot read local files, so this mode of operation won't work if remoting CLI is disabled. Try the mode using standard in, documented on the help for groovy . (Please ask any followup questions on the jenkinsci-users mailing list, only few people process incoming issue reports.)
          Hide
          krissap Chris J added a comment -

          Hi Daniel,

          I could not find this indication that groovy local files cannot be used with jenkins_cli. Can you share a link to this "documented on the help for groovy" page please?

          By the way I have the exact same error even if I activate the "Enable CLI over remoting" setting.

          I followed you advice and sent an email to "jenkinsci-users@googlegroups.com" (found at https://jenkins.io/mailing-lists/) but got an error
          This group doesn't seem to exist anymore.
          What would be the correct way to proceed?

          Show
          krissap Chris J added a comment - Hi Daniel, I could not find this indication that groovy local files cannot be used with jenkins_cli. Can you share a link to this "documented on the help for groovy" page please? By the way I have the exact same error even if I activate the "Enable CLI over remoting" setting. I followed you advice and sent an email to "jenkinsci-users@googlegroups.com" (found at https://jenkins.io/mailing-lists/ ) but got an error This group doesn't seem to exist anymore. What would be the correct way to proceed?
          Hide
          danielbeck Daniel Beck added a comment -

          By the way I have the exact same error even if I activate the "Enable CLI over remoting" setting.

          Did you try to switch to -remoting mode as documented on the linked URL?

           This group doesn't seem to exist anymore.

          Can be browsed at https://groups.google.com/forum/#!forum/jenkinsci-users so that's incorrect – I think the automated response also suggests you need to signed up for the list to post to it. If you haven't done that, that would be a reason that your email is rejected.

          Show
          danielbeck Daniel Beck added a comment - By the way I have the exact same error even if I activate the "Enable CLI over remoting" setting. Did you try to switch to -remoting mode as documented on the linked URL?  This group doesn't seem to exist anymore. Can be browsed at https://groups.google.com/forum/#!forum/jenkinsci-users so that's incorrect – I think the automated response also suggests you need to signed up for the list to post to it. If you haven't done that, that would be a reason that your email is rejected.

            People

            • Assignee:
              Unassigned
              Reporter:
              krissap Chris J
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: