Not able to execute sudo command on ssh slave during build promotion even though Exec in pty option is checked.

XMLWordPrintable

    • Type: Bug
    • Resolution: Not A Defect
    • Priority: Critical
    • None
    • Environment:
      Jenkins server and SSH slave are running on 64 bit linux Red Hat 4.1.2 machines

      Currently I are using Jenkins ver. 1.4.39. I have Jenkins SSH plugin installed.

      Working Scenario: Connected to SSH Slave as user X and performing build promotion.
      I am using 'Send build artifacts over SSH' action to copy the required files to the SSH Slave to a folder owned by user X. I provided the required shell commands in Exec command. I am able to successfully complete the promotion.

      Failing Scenario: Connected to SSH Slave as user Y and changing user to X and performing build promotion.
      I am using 'Send build artifacts over SSH' action to copy the required files to the SSH Slave to a folder owned by user Y. I provided the required shell commands in Exec command. I want to sudo as user X for which I gave command 'sudo su - X'. When I promote the build I am receiving below error message.
      ERROR: Exception when publishing, exception message [Exec timed out or was interrupted after 10,004 ms].

      sudo command is not working for me through Jenkins even though I checked Exec in pty option required for running sudo commands. I am able to run the same command on the linux machine successfully. I set the option to Password not required for user Y to change to user X.

      Please help me by providing a fix. I really appreciate your assistance.

            Assignee:
            bap
            Reporter:
            suresh kukalakuntla
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: