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

svn checkout fails when running jenkins master in docker container

    XMLWordPrintable

Details

    Description

      i'm running jenkins using the jenkins/jenkins docker image with port 8080 and 50000 published. I have a jenkins slave running on a windows server and subversion server on another winows server(VisualSVN)

      My master node settings is only set to run jobs when specified as I don't want jobs running on the master. When I attempt to do a svn checkout it seems the svn plugin attempts to call the jnlp4 slave on random ports(port keeps changing if you restart container). A few port numbers it's used are 49319,52121,49991 etc. I know this issue is specific to svn as i can checkout git repositories fine. The stack trace from the ocnsole output also says svn and scm checkout.

      Just by the way, I know the master can communicate with the subversion repo fine because I'm using a jenkinsfile and the initial checkout works fine. jenkinsfile is pulled and it starts runnning the pipeline. It's when it attempts to run the job on the slave and tries to do the svn checkout for the slave that it blows up as the subversion plugin is attempting to contact slave on a random undocumented port.

       

      Thanks in advance

      Attachments

        Activity

          moyz Moyo Lawal added a comment -

          Hi Ivan,

           

          I checked the log for the slave which is located in the logs folder of the master node. No error message in here. Just the following lines

          "

          Inbound agent connected from 10.0.2.2/10.0.2.2
          Remoting version: 3.33
          This is a Windows agent
          Agent successfully connected and online

          "

          Are there any other logs I should be checking?

           

          I'm not sure I fully understand the statement "check the permission on the workdir of the user you use to connect the agent". Are you saying I should check the permission of the agent dir on the windows slave? Or the user which I'm using to run jenkins in the docker container(which is jenkins by default) should have access to the slave workdir i.e agent folder?

           

          P.S: This works fine out of the box when using a git repository for the same slave. git checkout runs fine and job runs fine.

          moyz Moyo Lawal added a comment - Hi Ivan,   I checked the log for the slave which is located in the logs folder of the master node. No error message in here. Just the following lines " Inbound agent connected from 10.0.2.2/10.0.2.2 Remoting version: 3.33 This is a Windows agent Agent successfully connected and online " Are there any other logs I should be checking?   I'm not sure I fully understand the statement "check the permission on the workdir of the user you use to connect the agent". Are you saying I should check the permission of the agent dir on the windows slave? Or the user which I'm using to run jenkins in the docker container(which is jenkins by default) should have access to the slave workdir i.e agent folder?   P.S: This works fine out of the box when using a git repository for the same slave. git checkout runs fine and job runs fine.

          Do you have symbolic links on your subversion repo? Do you use svn externals in the repo? Check if in the Agent workdir inside the workspace folder the job has created something from the svn repo checkout

          ifernandezcalvo Ivan Fernandez Calvo added a comment - Do you have symbolic links on your subversion repo? Do you use svn externals in the repo? Check if in the Agent workdir inside the workspace folder the job has created something from the svn repo checkout
          moyz Moyo Lawal added a comment -

          Hi Ivan,

           

          No symbolic links. No externals. I actually created a brand new svn repo with just a Jenkinsfile in there. Still the same issue.

          Nothing has been checked out in the workspace directory on the jenkins slave. I however see that repo has been checked out on jenkins master under $JENKINS_HOME/workspace. I'm guessing this is how it can read the jenkinsfile successfully to initiate the actual pipeline process

          I should mention the checkout on the master was failing previously when I was using a mapped volume onto a windows server. I had to switch to using a docker volume; and grant rw access to everyone on that volume. Only after this did the temp svn checkouts which jenkins does on master start to work. I got the clue from this post "https://forums.docker.com/t/error-in-jenkins-on-docker-toolbox-for-windows-volume-permission-issue/67283". I believe it might be the same issue, but this time on the slave. I however can't use a similar workaround.

           

          Once again my git repositories worked absolutely fine even with the mapped windows volume, and still works fine now.

          moyz Moyo Lawal added a comment - Hi Ivan,   No symbolic links. No externals. I actually created a brand new svn repo with just a Jenkinsfile in there. Still the same issue. Nothing has been checked out in the workspace directory on the jenkins slave. I however see that repo has been checked out on jenkins master under $JENKINS_HOME/workspace. I'm guessing this is how it can read the jenkinsfile successfully to initiate the actual pipeline process I should mention the checkout on the master was failing previously when I was using a mapped volume onto a windows server. I had to switch to using a docker volume; and grant rw access to everyone on that volume. Only after this did the temp svn checkouts which jenkins does on master start to work. I got the clue from this post "https://forums.docker.com/t/error-in-jenkins-on-docker-toolbox-for-windows-volume-permission-issue/67283". I believe it might be the same issue, but this time on the slave. I however can't use a similar workaround.   Once again my git repositories worked absolutely fine even with the mapped windows volume, and still works fine now.

          Sure it is related with the mapped windows volume, I cannot help you too much from here, I don’t maintain the subversion plugin anymore.

          ifernandezcalvo Ivan Fernandez Calvo added a comment - Sure it is related with the mapped windows volume, I cannot help you too much from here, I don’t maintain the subversion plugin anymore.
          moyz Moyo Lawal added a comment -

          Hi Ivan,

           

          Thanks. I updated the svn plugin in my test environment to the very latest (v2.12.2) and svn checkout seems to work fine now. Was avoiding doing this as we didn't want to deviate from the plugin versions in our prod environment. Thanks anyways.

          moyz Moyo Lawal added a comment - Hi Ivan,   Thanks. I updated the svn plugin in my test environment to the very latest (v2.12.2) and svn checkout seems to work fine now. Was avoiding doing this as we didn't want to deviate from the plugin versions in our prod environment. Thanks anyways.

          People

            Unassigned Unassigned
            moyz Moyo Lawal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: