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

If sshpass installed the build having ansible step won't run

      I am trying to run the following roles (does not matter which one):

      https://github.com/angstwad/docker.ubuntu

      https://github.com/lexrus/ansible-role-docker

      It requires sshpass to run these, as I don't have it installed, I get the following:

      [Install Docker Environment] $ sshpass ******** /usr/local/bin/ansible-playbook /var/jenkins_home/ansible/docker/install_docker.yml -i /tmp/inventory2329019756205489228.ini -f 5 -u root -k
      FATAL: command execution failed
      java.io.IOException: Cannot run program "sshpass" (in directory "/var/jenkins_home/workspace/Server Management/Install Docker Environment"): error=2, No such file or directory

      Ok so I tried to install sshpass with apt-get install sshpass and also from source. After I install it and try to build this job, I get nothing, the build won't run at all, the jenkins log has no information at all just the usal Jenkins started, etc.

      As soon when I remove the sshpass from the system, it can start the build but again it won't find sshpass and will present the error above.

          [JENKINS-42814] If sshpass installed the build having ansible step won't run

          Zoltan Szabo added a comment - - edited

          Further investigation determined that jenkis just exits (service shutting down) when I press the build now button without any message on the console.

          Zoltan Szabo added a comment - - edited Further investigation determined that jenkis just exits (service shutting down) when I press the build now button without any message on the console.

          Zoltan Szabo added a comment -

          Ok so as I had to add some stuffs to the dockerfile which is coming from the original dockerfile, I had a new entry point which starts jenkins the following way:

          exec su $JUSER -c "/bin/tini -- /usr/local/bin/jenkins.sh"

          I changed this to:

          exec java -jar /usr/share/jenkins/jenkins.war

          And now it works. Not sure if this is a bug or just this is how it works?

          Zoltan Szabo added a comment - Ok so as I had to add some stuffs to the dockerfile which is coming from the original dockerfile, I had a new entry point which starts jenkins the following way: exec su $JUSER -c "/bin/tini -- /usr/local/bin/jenkins.sh" I changed this to: exec java -jar /usr/share/jenkins/jenkins.war And now it works. Not sure if this is a bug or just this is how it works?

          The Jenkins wiki suggests Jenkins should be started with the "java -jar /path/to/jenkins.war", like the change you describe:

          https://wiki.jenkins.io/display/JENKINS/Starting+and+Accessing+Jenkins

           

          Michael Cresswell added a comment - The Jenkins wiki suggests Jenkins should be started with the "java -jar /path/to/jenkins.war", like the change you describe: https://wiki.jenkins.io/display/JENKINS/Starting+and+Accessing+Jenkins  

            michaelcresswell Michael Cresswell
            tailorzoltan Zoltan Szabo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: