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

Publish over SSH: sudo does not work

    Details

    • Similar Issues:

      Description

      When I try to start a service from jenkins job it gives the following error, however the same works without an issue from Putty.
      SSH: Connecting from host [ABC]
      SSH: Connecting with configuration [DEF] ...
      SSH: Creating session: username [abc_123], hostname [1.1.1.1], port [22]
      SSH: Connecting session ...
      SSH: Connected
      SSH: Opening exec channel ...
      SSH: EXEC: channel open
      SSH: EXEC: STDOUT/STDERR from command [echo [*******] | sudo -S service hybris stop] ...
      SSH: EXEC: connected
      [sudo] password for abc_123: sudo: service: command not found
      SSH: EXEC: completed after 200 ms
      SSH: Disconnecting configuration [DEF] ...
      ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [1]]
      Build step 'Send files or execute commands over SSH' changed build result to UNSTABLE
      Finished: UNSTABLE

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          This is probably because of path differences when logging in. Can you dump the environment variables and see if the PATH is the same?

          Show
          slide_o_mix Alex Earl added a comment - This is probably because of path differences when logging in. Can you dump the environment variables and see if the PATH is the same?

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              revathi_manikoth Revathi Manikoth
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: