Skip to main content
Jul 25, 2017 8:54 AM UTC

Errors when Jenkins slave issues Git commands on USS

We are currently experimenting with using Jenkins remote slave on USS to issue Git commands to Git installation. We have two test systems. On one of the test systems everything works as expected. On the second test system the Jenkins build fails during the Git fetch because it cannot find any remote branches. Both test systems are being invoked by the same Jenkins server and are connecting to the same remove Git server. We have not been able to identify what if any differences between the systems may be causing the inconsistent behavior.

We are using a standard Jenkins Git Client plugin to access the remote repository. It issues four commands at the beginning of each build. Jenkins Build Log from the failing test system:

Building remotely on tvt6031Dan in workspace /u/dbruce/test/jenkins/workspace/DansGitPull
 > /u/dbruce/test/dbb/sample/git-jenkins.sh rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > /u/dbruce/test/dbb/sample/git-jenkins.sh config remote.origin.url ssh://drbruce@abc.com/git/mortgage-repo.git # timeout=10
Fetching upstream changes from ssh://drbruce@abc.com/git/mortgage-repo.git
 > /u/dbruce/test/dbb/sample/git-jenkins.sh --version # timeout=10
using GIT_SSH to set credentials Dans ee-jenkins git credentials
 > /u/dbruce/test/dbb/sample/git-jenkins.sh fetch --tags ssh://drbruce@abc.com/git/mortgage-repo.git +refs/heads/*:refs/remotes/origin/*
Seen 0 remote branches
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.

These commands work successfully when issued directly via the command line. After the build, the following error message appears in the Jenkins Slave log:

Jul 24, 2017 6:49:35 PM org.eclipse.jgit.util.FS discoverGitSystemConfig
WARNING: Exception caught during execution of command '[git, config, --system, --edit]' in '/var/rocket/bin', return code '128', error message '�atal: Could not switch to '/rsusr/rocket/etc/': EDC5129I No such file or directory.
'

We installed Git in /var/rocket and we invoke a gitenv.sh script at the beginning of the build so that everything is pointing to /var/rocket/* installation. We do not understand where the reference to /rsusr/rocket/etc is coming from. Is there anyway to redirect that reference to our installation directories in case it is trying to write some error or diagnostic messages?

    24 replies

    Oct 23, 2018 8:29 AM UTC

    We are currently experimenting with using Jenkins remote slave on USS to issue Git commands to Git installation. We have two test systems. On one of the test systems everything works as expected. On the second test system the Jenkins build fails during the Git fetch because it cannot find any remote branches. Both test systems are being invoked by the same Jenkins server and are connecting to the same remove Git server. We have not been able to identify what if any differences between the systems may be causing the inconsistent behavior.

    We are using a standard Jenkins Git Client plugin to access the remote repository. It issues four commands at the beginning of each build. Jenkins Build Log from the failing test system:

    Building remotely on tvt6031Dan in workspace /u/dbruce/test/jenkins/workspace/DansGitPull
     > /u/dbruce/test/dbb/sample/git-jenkins.sh rev-parse --is-inside-work-tree # timeout=10
    Fetching changes from the remote Git repository
     > /u/dbruce/test/dbb/sample/git-jenkins.sh config remote.origin.url ssh://drbruce@abc.com/git/mortgage-repo.git # timeout=10
    Fetching upstream changes from ssh://drbruce@abc.com/git/mortgage-repo.git
     > /u/dbruce/test/dbb/sample/git-jenkins.sh --version # timeout=10
    using GIT_SSH to set credentials Dans ee-jenkins git credentials
     > /u/dbruce/test/dbb/sample/git-jenkins.sh fetch --tags ssh://drbruce@abc.com/git/mortgage-repo.git +refs/heads/*:refs/remotes/origin/*
    Seen 0 remote branches
    ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
    

    These commands work successfully when issued directly via the command line. After the build, the following error message appears in the Jenkins Slave log:

    Jul 24, 2017 6:49:35 PM org.eclipse.jgit.util.FS discoverGitSystemConfig
    WARNING: Exception caught during execution of command '[git, config, --system, --edit]' in '/var/rocket/bin', return code '128', error message '�atal: Could not switch to '/rsusr/rocket/etc/': EDC5129I No such file or directory.
    '
    

    We installed Git in /var/rocket and we invoke a gitenv.sh script at the beginning of the build so that everything is pointing to /var/rocket/* installation. We do not understand where the reference to /rsusr/rocket/etc is coming from. Is there anyway to redirect that reference to our installation directories in case it is trying to write some error or diagnostic messages?

    OK, I was incorrect. It is an issue on z/OS. When I run the Jenkins project to the master on Linux, it works fine. When I run it to z/OS, it fails. So, any advice on how to resolve this issue would be helpful. I have deleted and re-installed all the Rocket Open Source software.

    Thanks,
    Jerry

    Oct 23, 2018 8:35 AM UTC

    We are currently experimenting with using Jenkins remote slave on USS to issue Git commands to Git installation. We have two test systems. On one of the test systems everything works as expected. On the second test system the Jenkins build fails during the Git fetch because it cannot find any remote branches. Both test systems are being invoked by the same Jenkins server and are connecting to the same remove Git server. We have not been able to identify what if any differences between the systems may be causing the inconsistent behavior.

    We are using a standard Jenkins Git Client plugin to access the remote repository. It issues four commands at the beginning of each build. Jenkins Build Log from the failing test system:

    Building remotely on tvt6031Dan in workspace /u/dbruce/test/jenkins/workspace/DansGitPull
     > /u/dbruce/test/dbb/sample/git-jenkins.sh rev-parse --is-inside-work-tree # timeout=10
    Fetching changes from the remote Git repository
     > /u/dbruce/test/dbb/sample/git-jenkins.sh config remote.origin.url ssh://drbruce@abc.com/git/mortgage-repo.git # timeout=10
    Fetching upstream changes from ssh://drbruce@abc.com/git/mortgage-repo.git
     > /u/dbruce/test/dbb/sample/git-jenkins.sh --version # timeout=10
    using GIT_SSH to set credentials Dans ee-jenkins git credentials
     > /u/dbruce/test/dbb/sample/git-jenkins.sh fetch --tags ssh://drbruce@abc.com/git/mortgage-repo.git +refs/heads/*:refs/remotes/origin/*
    Seen 0 remote branches
    ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
    

    These commands work successfully when issued directly via the command line. After the build, the following error message appears in the Jenkins Slave log:

    Jul 24, 2017 6:49:35 PM org.eclipse.jgit.util.FS discoverGitSystemConfig
    WARNING: Exception caught during execution of command '[git, config, --system, --edit]' in '/var/rocket/bin', return code '128', error message '�atal: Could not switch to '/rsusr/rocket/etc/': EDC5129I No such file or directory.
    '
    

    We installed Git in /var/rocket and we invoke a gitenv.sh script at the beginning of the build so that everything is pointing to /var/rocket/* installation. We do not understand where the reference to /rsusr/rocket/etc is coming from. Is there anyway to redirect that reference to our installation directories in case it is trying to write some error or diagnostic messages?

    I have tried using the IP address of the git server, but it still fails with the same error message. It appears the git commands are not working, properly. How do I trace git on z/OS?

    Tatiana Balaburkina
    Rocketeer
    Oct 25, 2018 7:02 AM UTC

    I have tried using the IP address of the git server, but it still fails with the same error message. It appears the git commands are not working, properly. How do I trace git on z/OS?

    Hi, Could you please try with new git: git-2.14.4_b08.181016.tar.gz ?

    Oct 25, 2018 7:33 AM UTC

    We are currently experimenting with using Jenkins remote slave on USS to issue Git commands to Git installation. We have two test systems. On one of the test systems everything works as expected. On the second test system the Jenkins build fails during the Git fetch because it cannot find any remote branches. Both test systems are being invoked by the same Jenkins server and are connecting to the same remove Git server. We have not been able to identify what if any differences between the systems may be causing the inconsistent behavior.

    We are using a standard Jenkins Git Client plugin to access the remote repository. It issues four commands at the beginning of each build. Jenkins Build Log from the failing test system:

    Building remotely on tvt6031Dan in workspace /u/dbruce/test/jenkins/workspace/DansGitPull
     > /u/dbruce/test/dbb/sample/git-jenkins.sh rev-parse --is-inside-work-tree # timeout=10
    Fetching changes from the remote Git repository
     > /u/dbruce/test/dbb/sample/git-jenkins.sh config remote.origin.url ssh://drbruce@abc.com/git/mortgage-repo.git # timeout=10
    Fetching upstream changes from ssh://drbruce@abc.com/git/mortgage-repo.git
     > /u/dbruce/test/dbb/sample/git-jenkins.sh --version # timeout=10
    using GIT_SSH to set credentials Dans ee-jenkins git credentials
     > /u/dbruce/test/dbb/sample/git-jenkins.sh fetch --tags ssh://drbruce@abc.com/git/mortgage-repo.git +refs/heads/*:refs/remotes/origin/*
    Seen 0 remote branches
    ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
    

    These commands work successfully when issued directly via the command line. After the build, the following error message appears in the Jenkins Slave log:

    Jul 24, 2017 6:49:35 PM org.eclipse.jgit.util.FS discoverGitSystemConfig
    WARNING: Exception caught during execution of command '[git, config, --system, --edit]' in '/var/rocket/bin', return code '128', error message '�atal: Could not switch to '/rsusr/rocket/etc/': EDC5129I No such file or directory.
    '
    

    We installed Git in /var/rocket and we invoke a gitenv.sh script at the beginning of the build so that everything is pointing to /var/rocket/* installation. We do not understand where the reference to /rsusr/rocket/etc is coming from. Is there anyway to redirect that reference to our installation directories in case it is trying to write some error or diagnostic messages?

    Tatyana,

    I was able to get everything working and with git-2.14.4. Not sure what the problem was, because I was unable get any other messages to display. Tried trace git, but no luck. It wasn’t USS RESOLVER, because using the IP address of the GIT server failed as well. So, I completely removed all the open source and re-installed the following;

    • Bash v4.3, git v2.14.4, gzip v1.6, perl v5.24.0, unzip v6.0, and vim v8.0.22
    • Very carefully followed all the installation guides for each product
    • Update the /etc/profile on z/OS. See below for the updated parts of /etc/profile
    • Added the two DBB scripts, supplied by IBM, getevn.sh and git-jenkins.sh
    • Updated the z/OS slave
      o . /usr/lpp/IBM/dbb/conf/gitenv.sh && export JAVA_HOME=/usr/lpp/java/J8.0_64/ && export IBM_JAVA_ENABLE_ASCII_FILETAG=ON && env &&
      o Don’t forget to have the ‘. ‘ (dot/space) in the front of the prefix start slave command
    • Use ssh to access z/OS

    For the Rocket Open Source install, I use /usr/lpp/tools

    JAVA_HOME=/usr/lpp/java/J8.0_64
    export JAVA_HOME
    TOOLS_HOME=/usr/lpp/tools
    export TOOLS_HOME

    PATH=/bin:.
    PATH=$PATH:$JAVA_HOME/bin
    PATH=$PATH:$TOOLS_HOME/bin
    export PATH

    LIBPATH=/lib:/usr/lib
    LIBPATH=$LIBPATH:$JAVA_HOME/bin
    LIBPATH=$LIBPATH:$JAVA_HOME/lib
    LIBPATH=$LIBPATH:$JAVA_HOME/lib/s390x
    LIBPATH=$LIBPATH:$JAVA_HOME/lib/s390x/j9vm
    LIBPATH=$LIBPATH:$TOOLS_HOME/lib
    LIBPATH=$LIBPATH:$TOOLS_HOME/lib/perl5/5.24.0/os390/CORE
    export LIBPATH

    ===========================================

    CLASSPATH=$JAVA_HOME/lib
    CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/ext

    export CLASSPATH

    ======================================================================

    IJO="-Xms1024M -Xmx1024M"
    IJO="$IJO -Xshareclasses"
    export IBM_JAVA_OPTIONS="$IJO "

    MANPATH=/usr/man/%L
    MANPATH=$MANPATH:$TOOLS_HOME/man
    export MANPATH

    ======================================================================

    export _BPX_SHAREAS=YES

    bash environment variables

    ======================================================================

    export _ENCODE_FILE_NEW=IBM-1047
    export _ENCODE_FILE_EXISTING=IBM-1047
    export _CEE_RUNOPTS=“FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)”
    export _BPXK_AUTOCVT=ON
    export _TAG_REDIR_ERR=txt
    export _TAG_REDIR_IN=txt
    export _TAG_REDIR_OUT=txt

    git environment variables

    ======================================================================

    export GIT_SHELL=$TOOLS_HOME/bin/bash
    export GIT_EXEC_PATH=$TOOLS_HOME/libexec/git-core
    export GIT_TEMPLATE_DIR=$TOOLS_HOME/share/git-core/templates
    #git config --global core.editor vim

    perl environment variables

    ======================================================================

    PERL5LIB=$TOOLS_HOME/lib/perl5
    PERL5LIB=$PERL5LIB:$TOOLS_HOME/share/perl/5.24.1
    export PERL5LIB

    vim environment variables

    ======================================================================

    export VIM=$TOOLS_HOME/share/vim/

    I did have an issue with the slave logon account to z/OS. In its home directory /$HOME/.gitconfig, the Jenkins slave was trying to use it, but didn’t have access, even with chmod 777. So, I commented out the “#git config --global core.editor vim”, deleted the .gitconfig, and restart the slave. That problem went away.

    I believe the cause of the issue was twofold, but I can’t prove it

    • The missing “. “ in the prefix slave start
    • Improper installation and configuration of the Rocket Open Source

    What would be very helpful, if there a document or some help about how to trace git to get more information about various problems.

    Thanks,
    Jerry