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

Wsadmin Command not working with "sudo wsadmin"

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • was-builder-plugin
    • None
    • Jenkins 1.430
      WAS Builder Plugin 1.6
      Debian GNU/Linux 2.6.32-5-amd64

      I'm trying to use the "Wsadmin Command" feature, but it is not working. It seems Jenkins is treating the field content as a single command.

      This is the Console Output I'm receiving (note the quotation marks around what came from the "Wsadmin Command" field):Using user admin defined at the server level
      $ "/usr/bin/sudo /home/was/IBM/WebSphere/AppServer01/bin/wsadmin.sh" -conntype SOAP -host zefiro.cit -port 8880 -user admin -password ******** -lang jython -f "/var/lib/jenkins/jobs/AVD ZEFIRO/workspace/newDeploy.py" "AVD ZEFIRO" zefiro Vendas
      FATAL: Wsadmin execution failed
      Build step 'IBM WebSphere Application Server 6.x/7.x' marked build as failure
      Checking console output
      Finished: FAILURE

      Jenkins' log doesn't say anything usefull, but this:

      Sep 19, 2011 4:18:01 PM hudson.model.Run runINFO: AVD ZEFIRO #12 main build action completed: FAILURE

      My prime suspects are the quotation marks around the "sudo wsadmin" pair.

      I'm using Jenkins 1.430 and WAS Builder Plugin 1.6.

          [JENKINS-11104] Wsadmin Command not working with "sudo wsadmin"

          Romain Seguy added a comment -

          Hello,

          Can you give a try with this HPI to ensure the fix works fine for you?
          Once done, I'll release 1.6.1.

          Thanks.

          Romain Seguy added a comment - Hello, Can you give a try with this HPI to ensure the fix works fine for you? Once done, I'll release 1.6.1. Thanks.

          Code changed in jenkins
          User: rseguy
          Path:
          README.md
          pom.xml
          src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASBuildStep.java
          src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASInstallation.java
          src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASServer.java
          http://jenkins-ci.org/commit/was-builder-plugin/1427fcd261aab82f841e1a979796d3e6cf684818
          Log:
          [FIXED JENKINS-11104] Wsadmin command was not working with "sudo wsadmin"

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: rseguy Path: README.md pom.xml src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASBuildStep.java src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASInstallation.java src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASServer.java http://jenkins-ci.org/commit/was-builder-plugin/1427fcd261aab82f841e1a979796d3e6cf684818 Log: [FIXED JENKINS-11104] Wsadmin command was not working with "sudo wsadmin"

          Code changed in jenkins
          User: rseguy
          Path:
          README.md
          pom.xml
          src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASBuildStep.java
          src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASInstallation.java
          src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASServer.java
          http://jenkins-ci.org/commit/was-builder-plugin/1427fcd261aab82f841e1a979796d3e6cf684818
          Log:
          [FIXED JENKINS-11104] Wsadmin command was not working with "sudo wsadmin"

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: rseguy Path: README.md pom.xml src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASBuildStep.java src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASInstallation.java src/main/java/com/michelin/cio/hudson/plugins/wasbuilder/WASServer.java http://jenkins-ci.org/commit/was-builder-plugin/1427fcd261aab82f841e1a979796d3e6cf684818 Log: [FIXED JENKINS-11104] Wsadmin command was not working with "sudo wsadmin"

          Heleno Valle added a comment -

          Hi, Romain!

          Finally I was able to try your fix and it worked just fine.

          Only that I had to use sudo -n in order to avoid it checking for a tty (to ask for the password).

          Thank you very much!

          Best regards.

          Heleno Valle added a comment - Hi, Romain! Finally I was able to try your fix and it worked just fine. Only that I had to use sudo -n in order to avoid it checking for a tty (to ask for the password). Thank you very much! Best regards.

          Romain Seguy added a comment -

          Perfect, I'll release 1.6.1 tomorrow then.

          Romain Seguy added a comment - Perfect, I'll release 1.6.1 tomorrow then.

          Romain Seguy added a comment -

          Fixed in 1.6.1

          Romain Seguy added a comment - Fixed in 1.6.1

            rseguy Romain Seguy
            helenov Heleno Valle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: