[JIRA] (JENKINS-59374) svn checkout fails when running jenkins master in docker container

0 views
Skip to first unread message

littlemoyo@hotmail.co.uk (JIRA)

unread,
Sep 14, 2019, 7:27:02 AM9/14/19
to jenkinsc...@googlegroups.com
Moyo Lawal created an issue
 
Jenkins / Bug JENKINS-59374
svn checkout fails when running jenkins master in docker container
Issue Type: Bug Bug
Assignee: Ivan Fernandez Calvo
Components: subversion-plugin
Created: 2019-09-14 11:26
Priority: Major Major
Reporter: Moyo Lawal

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

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

kuisathaverat@gmail.com (JIRA)

unread,
Sep 15, 2019, 9:55:03 AM9/15/19
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Sep 15, 2019, 9:55:03 AM9/15/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo closed an issue as Incomplete
 

you do not specify the Jenkins Core version you use, the subversion-plugin, you do not provide the stack traces of the error, please read How to report an issue

Status: Open Closed
Resolution: Incomplete

littlemoyo@hotmail.co.uk (JIRA)

unread,
Sep 16, 2019, 5:23:03 AM9/16/19
to jenkinsc...@googlegroups.com
Moyo Lawal commented on Bug JENKINS-59374
 
Re: svn checkout fails when running jenkins master in docker container

Subversion v2.9

Jenkins v2.190

 

[Pipeline] {
[Pipeline] stage
[Pipeline]

{ (Preparation) [Pipeline] svn [Pipeline] }

[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 10.0.2.2/10.0.2.2:49931
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:957)
at hudson.FilePath.act(FilePath.java:1072)
at hudson.FilePath.act(FilePath.java:1061)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:902)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:838)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
java.lang.IllegalStateException: Jenkins.instance is missing. Read the documentation of Jenkins.getInstanceOrNull to see what you are doing wrong.
at jenkins.model.Jenkins.get(Jenkins.java:772)
at hudson.model.Hudson.getInstance(Hudson.java:77)
at hudson.scm.SubversionWorkspaceSelector.syncWorkspaceFormatFromMaster(SubversionWorkspaceSelector.java:105)
at hudson.scm.SvnClientManager.<init>(SvnClientManager.java:31)
at hudson.scm.SubversionSCM.createClientManager(SubversionSCM.java:1046)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:973)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:953)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3052)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Unknown Source)
Finished: FAILURE

 

 

littlemoyo@hotmail.co.uk (JIRA)

unread,
Sep 16, 2019, 5:24:02 AM9/16/19
to jenkinsc...@googlegroups.com
Moyo Lawal reopened an issue
 

Jenkins v2.190

Subversion v2.9

Change By: Moyo Lawal
Resolution: Incomplete
Status: Closed Reopened
Assignee: Ivan Fernandez Calvo

kuisathaverat@gmail.com (JIRA)

unread,
Sep 16, 2019, 8:15:02 AM9/16/19
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Sep 16, 2019, 8:16:08 AM9/16/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo commented on Bug JENKINS-59374
 
Re: svn checkout fails when running jenkins master in docker container

nothing to do with the description about randon connection port etc you described on the first comment, Agents only make one connection to the master, when they connect. What you see in the log it is that the plugin tries to make a checkout something happens when checking the attributes of the files and the agent connection is broken that's it.

This is the key part of the stack trace, the rest is the remoting process reporting a broken channel, I dunno why check the logs in the agent to see if you can see something else, check the permission on the workdir of the user you use to connect the agent.

```


at hudson.FilePath.act(FilePath.java:1072)
at hudson.FilePath.act(FilePath.java:1061)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:902)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:838)

```

kuisathaverat@gmail.com (JIRA)

unread,
Sep 16, 2019, 8:17:02 AM9/16/19
to jenkinsc...@googlegroups.com
nothing to do with the description about randon connection port etc you described on the first comment, Agents only make one connection to the master, when they connect. What you see in the log it is that the plugin tries to make a checkout something happens when checking the attributes of the files and the agent connection is broken that's it.

This is the key part of the stack trace, the rest is the remoting process reporting a broken channel, I dunno why check the logs in the agent to see if you can see something else, check the permission on the workdir of the user you use to connect the agent.

``` {code}
at hudson.FilePath.act(FilePath.java:1072)
at hudson.FilePath.act(FilePath.java:1061)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:902)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:838)
``` {code}

kuisathaverat@gmail.com (JIRA)

unread,
Sep 16, 2019, 8:17:02 AM9/16/19
to jenkinsc...@googlegroups.com

littlemoyo@hotmail.co.uk (JIRA)

unread,
Sep 16, 2019, 9:58:02 AM9/16/19
to jenkinsc...@googlegroups.com
Moyo Lawal commented on Bug JENKINS-59374
 
Re: svn checkout fails when running jenkins master in docker container

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.

kuisathaverat@gmail.com (JIRA)

unread,
Sep 16, 2019, 11:34:05 AM9/16/19
to jenkinsc...@googlegroups.com

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

littlemoyo@hotmail.co.uk (JIRA)

unread,
Sep 16, 2019, 12:46:02 PM9/16/19
to jenkinsc...@googlegroups.com

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.

kuisathaverat@gmail.com (JIRA)

unread,
Sep 16, 2019, 1:00:04 PM9/16/19
to jenkinsc...@googlegroups.com

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.

littlemoyo@hotmail.co.uk (JIRA)

unread,
Sep 16, 2019, 1:11:02 PM9/16/19
to jenkinsc...@googlegroups.com

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.

Reply all
Reply to author
Forward
0 new messages