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

Wsadmin Command not working with "sudo wsadmin"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: was-builder-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.430
      WAS Builder Plugin 1.6
      Debian GNU/Linux 2.6.32-5-amd64
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          rseguy 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.

          Show
          rseguy 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.
          Hide
          scm_issue_link 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"

          Show
          scm_issue_link 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"
          Hide
          scm_issue_link 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"

          Show
          scm_issue_link 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"
          Hide
          helenov 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.

          Show
          helenov 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.
          Hide
          rseguy Romain Seguy added a comment -

          Perfect, I'll release 1.6.1 tomorrow then.

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

          Fixed in 1.6.1

          Show
          rseguy Romain Seguy added a comment - Fixed in 1.6.1

            People

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

              Dates

              • Created:
                Updated:
                Resolved: