[JIRA] (JENKINS-59879) yet-another-docker-0.1.4 docker cloud does not work with >= ssh-slaves-plugin-1.30.0

48 views
Skip to first unread message

rick.d.vries@gmail.com (JIRA)

unread,
Oct 22, 2019, 5:27:05 AM10/22/19
to jenkinsc...@googlegroups.com
Rick de Vries created an issue
 
Jenkins / Bug JENKINS-59879
yet-another-docker-0.1.4 docker cloud does not work with >= ssh-slaves-plugin-1.30.0
Issue Type: Bug Bug
Assignee: Ivan Fernandez Calvo
Components: ssh-slaves-plugin
Created: 2019-10-22 09:26
Environment: Jenkins ver 2.201
Yet Another Docker Plugin 0.1.4
SSH Slaves plugin 1.31.0
Labels: regression
Priority: Minor Minor
Reporter: Rick de Vries

After we updated the plugin to version 1.30.0 the docker plugin keeps provisioning because it is unable to find the credentials for the docker containers.

```

ERROR: Launching agent process aborted. java.lang.InterruptedException: Validate configuration: The selected credentials cannot be found at hudson.plugins.sshslaves.SSHLauncher.checkConfig(SSHLauncher.java:900) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:402) at hudson.slaves.DelegatingComputerLauncher.launch(DelegatingComputerLauncher.java:64) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:297) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
```
 
After downgrading back to version 1.28.1 everything seems to work again.
 
Changing the settings in the yet another docker plugin did not change anything.
Creating new credentials and selecting those didn't change anything either.

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

rick.d.vries@gmail.com (JIRA)

unread,
Oct 22, 2019, 5:28:03 AM10/22/19
to jenkinsc...@googlegroups.com
Rick de Vries updated an issue
Change By: Rick de Vries
After we updated the plugin to version 1.30.0 the docker plugin keeps provisioning because it is unable to find the credentials for the docker containers.

```

ERROR: Launching agent process aborted. java.lang.InterruptedException: Validate configuration: The selected credentials cannot be found at hudson.plugins.sshslaves.SSHLauncher.checkConfig(SSHLauncher.java:900) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:402) at hudson.slaves.DelegatingComputerLauncher.launch(DelegatingComputerLauncher.java:64) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:297) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
```
 
After downgrading back to version 1.28.1 everything seems to work again.
 
Changing the settings in the yet another docker plugin did not change anything.
Creating new credentials and selecting those didn't change anything either.


 

I also created an issue in github for this plugin because i do not know which one causes the problem (https://github.com/KostyaSha/yet-another-docker-plugin/issues/278)

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 8:55:03 AM10/22/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo commented on Bug JENKINS-59879
 
Re: yet-another-docker-0.1.4 docker cloud does not work with >= ssh-slaves-plugin-1.30.0

pretty similar to https://issues.jenkins-ci.org/browse/JENKINS-58340, in the case of the Docker agent it does not implement descriptor on the connector, I've resolved it in 1.30.1, I dunno which version did you sued because you have set 1.30.0 on the main comment and 1.31.0 on the environment field

rick.d.vries@gmail.com (JIRA)

unread,
Oct 22, 2019, 8:59:03 AM10/22/19
to jenkinsc...@googlegroups.com

We are currently running 1.31.0 and the problem remains.

It stopped working when we updated to 1.30.0

We waited for the fix and tried again today. We updated to the latest version (1.31.0) and the problem is still there

rick.d.vries@gmail.com (JIRA)

unread,
Oct 22, 2019, 8:59:04 AM10/22/19
to jenkinsc...@googlegroups.com
Rick de Vries edited a comment on Bug JENKINS-59879
We are currently running 1.31.0 and the problem remains.

It stopped working when we updated to 1.30.0

We waited for the fix of (JENKINS-58340) and tried again today. We updated to the latest version (1.31.0) and the problem is still there

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 9:13:03 AM10/22/19
to jenkinsc...@googlegroups.com

I'd prepare an environment and test the thing, to see if I can fix it.

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 4:06:03 PM10/22/19
to jenkinsc...@googlegroups.com

I have some issues trying to configure the plugin to arrive to the point that fails to you, the agents are spinned but the plugin throws an exception even after to try to connect by SSH

this before to enable

-Djenkins.slaves.DefaultJnlpSlaveReceiver.disableStrictVerification=true
SEVERE: Error in provisioning; template='DockerSlaveTemplate[configVersion=1,maxCapacity=10,id=b158c964-73b4-4d61-8f1b-4c2e6195f473,labelString=docker-yad,launcher=com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher@4cc279cb,remoteFs=/home/jenkins,mode=EXCLUSIVE,retentionStrategy=com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy@27f,numExecutors=1,dockerContainerLifecycle=com.github.kostyasha.yad.DockerContainerLifecycle@1a602d16[image=jenkins/ssh-slave:jdk11,pullImage=DockerPullImage[pullStrategy=PULL_LATEST,credentialsId=,registriesCreds=<null>,connector=<null>],createContainer=DockerCreateContainer[command=,commands=<null>,entrypoint=<null>,hostname=,dnsHosts=[],volumes=[],volumesFrom=[],environment=[],bindPorts=,bindAllPorts=false,memoryLimit=0,cpuShares=<null>,privileged=false,tty=false,macAddress=<null>,extraHosts=[],networkMode=<null>,devices=[],cpusetCpus=,cpusetMems=,links=[],dockerLabels=[],shmSize=0,restartPolicy=DockerContainerRestartPolicy[policyName=NO,maximumRetryCount=0],workdir=,user=],stopContainer=DockerStopContainer[timeout=10,connector=<null>],removeContainer=DockerRemoveContainer[removeVolumes=true,force=false,connector=<null>]],nodeProperties=<null>]' for cloud='YAD'
com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.exception.ConflictException: {"message":"You cannot remove a running container cad9ccbbe2fe1c2555c085807f78e4ecd8a034938b348c70d920109bb9d0ab5e. Stop the container before attempting removal or force remove"}

        at com.github.kostyasha.yad_docker_java.com.github.dockerjava.jaxrs.filter.ResponseStatusExceptionFilter.filter(ResponseStatusExceptionFilter.java:50)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:133)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:121)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:283)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$0(JerseyInvocation.java:753)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.internal.Errors.process(Errors.java:316)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.internal.Errors.process(Errors.java:298)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.internal.Errors.process(Errors.java:229)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:414)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:752)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:419)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.JerseyInvocation$Builder.delete(JerseyInvocation.java:368)
        at com.github.kostyasha.yad_docker_java.com.github.dockerjava.jaxrs.RemoveContainerCmdExec.execute(RemoveContainerCmdExec.java:29)
        at com.github.kostyasha.yad_docker_java.com.github.dockerjava.jaxrs.RemoveContainerCmdExec.execute(RemoveContainerCmdExec.java:12)
        at com.github.kostyasha.yad_docker_java.com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:23)
        at com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
        at com.github.kostyasha.yad_docker_java.com.github.dockerjava.core.command.RemoveContainerCmdImpl.exec(RemoveContainerCmdImpl.java:67)
        at com.github.kostyasha.yad.commons.DockerRemoveContainer.execInternal(DockerRemoveContainer.java:87)
        at com.github.kostyasha.yad.commons.DockerRemoveContainer.exec(DockerRemoveContainer.java:80)
        at com.github.kostyasha.yad.DockerCloud.provisionWithWait(DockerCloud.java:261)
        at com.github.kostyasha.yad.DockerCloud.lambda$provision$0(DockerCloud.java:135)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

this after enabling the option an NPE

SEVERE: Error in provisioning; template='DockerSlaveTemplate[configVersion=1,maxCapacity=10,id=b158c964-73b4-4d61-8f1b-4c2e6195f473,labelString=docker-yad,launcher=com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher@2afe850f,remoteFs=/home/jenkins,mode=NORMAL,retentionStrategy=com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy@27f,numExecutors=1,dockerContainerLifecycle=com.github.kostyasha.yad.DockerContainerLifecycle@472e5ea6[image=jenkins/ssh-slave:jdk11,pullImage=DockerPullImage[pullStrategy=PULL_LATEST,credentialsId=,registriesCreds=<null>,connector=<null>],createContainer=DockerCreateContainer[command=,commands=<null>,entrypoint=<null>,hostname=,dnsHosts=[],volumes=[],volumesFrom=[],environment=[],bindPorts=,bindAllPorts=false,memoryLimit=0,cpuShares=<null>,privileged=false,tty=false,macAddress=<null>,extraHosts=[],networkMode=<null>,devices=[],cpusetCpus=,cpusetMems=,links=[],dockerLabels=[],shmSize=0,restartPolicy=DockerContainerRestartPolicy[policyName=NO,maximumRetryCount=0],workdir=,user=],stopContainer=DockerStopContainer[timeout=10,connector=<null>],removeContainer=DockerRemoveContainer[removeVolumes=true,force=true,connector=<null>]],nodeProperties=<null>]' for cloud='YAD'
java.lang.NullPointerException
        at com.github.kostyasha.yad_docker_java.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212)
        at com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort.fromString(HostAndPort.java:168)
        at com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort.fromParts(HostAndPort.java:135)
        at com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher.getHostAndPort(DockerComputerSSHLauncher.java:174)
        at com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher.waitUp(DockerComputerSSHLauncher.java:105)
        at com.github.kostyasha.yad.DockerCloud.provisionWithWait(DockerCloud.java:253)
        at com.github.kostyasha.yad.DockerCloud.lambda$provision$0(DockerCloud.java:135)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Oct 22, 2019 9:37:25 PM hudson.slaves.NodeProvisioner lambda$update$6
WARNING: Unexpected exception encountered while provisioning agent jenkins/ssh-slave:jdk11
java.lang.NullPointerException
        at com.github.kostyasha.yad_docker_java.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212)
        at com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort.fromString(HostAndPort.java:168)
        at com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort.fromParts(HostAndPort.java:135)
        at com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher.getHostAndPort(DockerComputerSSHLauncher.java:174)
        at com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher.waitUp(DockerComputerSSHLauncher.java:105)
        at com.github.kostyasha.yad.DockerCloud.provisionWithWait(DockerCloud.java:253)
        at com.github.kostyasha.yad.DockerCloud.lambda$provision$0(DockerCloud.java:135)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Oct 22, 2019 9:37:25 PM com.github.kostyasha.yad.DockerCloud provision
INFO: Asked to provision load: '1', for: 'docker-yad' label

after filling a ton of settings that seems required but are not requested

SEVERE: Error in provisioning; template='DockerSlaveTemplate[configVersion=1,maxCapacity=10,id=b158c964-73b4-4d61-8f1b-4c2e6195f473,labelString=docker-yad,launcher=com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher@16b0d52d,remoteFs=/home/jenkins,mode=NORMAL,retentionStrategy=com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy@27f,numExecutors=1,dockerContainerLifecycle=com.github.kostyasha.yad.DockerContainerLifecycle@5d477d66[image=jenkins/ssh-slave:jdk11,pullImage=DockerPullImage[pullStrategy=PULL_LATEST,credentialsId=,registriesCreds=<null>,connector=<null>],createContainer=DockerCreateContainer[command=,commands=<null>,entrypoint=<null>,hostname=docker-agent,dnsHosts=[],volumes=[],volumesFrom=[],environment=[],bindPorts=,bindAllPorts=false,memoryLimit=2000,cpuShares=1,privileged=false,tty=false,macAddress=<null>,extraHosts=[],networkMode=<null>,devices=[],cpusetCpus=,cpusetMems=,links=[],dockerLabels=[],shmSize=2000,restartPolicy=DockerContainerRestartPolicy[policyName=NO,maximumRetryCount=0],workdir=/home/jenkins,user=jenkins],stopContainer=DockerStopContainer[timeout=10,connector=<null>],removeContainer=DockerRemoveContainer[removeVolumes=true,force=true,connector=<null>]],nodeProperties=<null>]' for cloud='YAD'
com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"OCI runtime create failed: container_linux.go:346: starting container process caused \"process_linux.go:449: container init caused \\\"process_linux.go:415: setting cgroup config for procHooks process caused \\\\\\\"The minimum allowed cpu-shares is 2\\\\\\\"\\\"\": unknown"}

after set 2 CPUs

SEVERE: Removing 9aaf475f142eff47e1b8aa560fa7f5a53369b3988dd9e6ee0daa7d759e9c846f container.
Oct 22, 2019 9:51:16 PM com.github.kostyasha.yad.DockerCloud lambda$provision$0
SEVERE: Error in provisioning; template='DockerSlaveTemplate[configVersion=1,maxCapacity=10,id=b158c964-73b4-4d61-8f1b-4c2e6195f473,labelString=docker-yad,launcher=com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher@145678d2,remoteFs=/home/jenkins,mode=NORMAL,retentionStrategy=com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy@27f,numExecutors=1,dockerContainerLifecycle=com.github.kostyasha.yad.DockerContainerLifecycle@1ec188dc[image=jenkins/ssh-slave:jdk11,pullImage=DockerPullImage[pullStrategy=PULL_LATEST,credentialsId=,registriesCreds=<null>,connector=<null>],createContainer=DockerCreateContainer[command=,commands=<null>,entrypoint=<null>,hostname=docker-agent,dnsHosts=[],volumes=[],volumesFrom=[],environment=[],bindPorts=,bindAllPorts=false,memoryLimit=2000,cpuShares=2,privileged=false,tty=false,macAddress=<null>,extraHosts=[],networkMode=<null>,devices=[],cpusetCpus=,cpusetMems=,links=[],dockerLabels=[],shmSize=2000,restartPolicy=DockerContainerRestartPolicy[policyName=NO,maximumRetryCount=0],workdir=/home/jenkins,user=jenkins],stopContainer=DockerStopContainer[timeout=10,connector=<null>],removeContainer=DockerRemoveContainer[removeVolumes=true,force=true,connector=<null>]],nodeProperties=<null>]' for cloud='YAD'
java.lang.NullPointerException
        at com.github.kostyasha.yad_docker_java.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212)
        at com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort.fromString(HostAndPort.java:168)
        at com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort.fromParts(HostAndPort.java:135)
        at com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher.getHostAndPort(DockerComputerSSHLauncher.java:174)
        at com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher.waitUp(DockerComputerSSHLauncher.java:105)
        at com.github.kostyasha.yad.DockerCloud.provisionWithWait(DockerCloud.java:253)
        at com.github.kostyasha.yad.DockerCloud.lambda$provision$0(DockerCloud.java:135)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Oct 22, 2019 9:51:19 PM hudson.model.AsyncPeriodicWork$1 run

it seems to not work with

unix:///var/run/docker.sock

as provider this line is the culprit https://github.com/KostyaSha/yet-another-docker-plugin/blob/master/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/launcher/DockerComputerSSHLauncher.java#L171 thie return *https://github.com/KostyaSha/yet-another-docker-plugin/blob/master/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/launcher/DockerComputerSSHLauncher.java#L171** and it is not an URI that return a host, getHosts() return **null*

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 4:06:03 PM10/22/19
to jenkinsc...@googlegroups.com
I have some issues trying to configure the plugin to arrive to the point that fails to you, the agents are spinned but the plugin throws an exception even after to try to connect by SSH

this before to enable {code}-Djenkins.slaves.DefaultJnlpSlaveReceiver.disableStrictVerification=true{code}

{code}
{code}


this after enabling the option an NPE

{code}
{code}


after filling a ton of settings that seems required but are not requested

{code}

SEVERE: Error in provisioning; template='DockerSlaveTemplate[configVersion=1,maxCapacity=10,id=b158c964-73b4-4d61-8f1b-4c2e6195f473,labelString=docker-yad,launcher=com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher@16b0d52d,remoteFs=/home/jenkins,mode=NORMAL,retentionStrategy=com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy@27f,numExecutors=1,dockerContainerLifecycle=com.github.kostyasha.yad.DockerContainerLifecycle@5d477d66[image=jenkins/ssh-slave:jdk11,pullImage=DockerPullImage[pullStrategy=PULL_LATEST,credentialsId=,registriesCreds=<null>,connector=<null>],createContainer=DockerCreateContainer[command=,commands=<null>,entrypoint=<null>,hostname=docker-agent,dnsHosts=[],volumes=[],volumesFrom=[],environment=[],bindPorts=,bindAllPorts=false,memoryLimit=2000,cpuShares=1,privileged=false,tty=false,macAddress=<null>,extraHosts=[],networkMode=<null>,devices=[],cpusetCpus=,cpusetMems=,links=[],dockerLabels=[],shmSize=2000,restartPolicy=DockerContainerRestartPolicy[policyName=NO,maximumRetryCount=0],workdir=/home/jenkins,user=jenkins],stopContainer=DockerStopContainer[timeout=10,connector=<null>],removeContainer=DockerRemoveContainer[removeVolumes=true,force=true,connector=<null>]],nodeProperties=<null>]' for cloud='YAD'
com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"OCI runtime create failed: container_linux.go:346: starting container process caused \"process_linux.go:449: container init caused \\\"process_linux.go:415: setting cgroup config for procHooks process caused \\\\\\\"The minimum allowed cpu-shares is 2\\\\\\\"\\\"\": unknown"}
{code}

after set 2 CPUs

{code}

SEVERE: Removing 9aaf475f142eff47e1b8aa560fa7f5a53369b3988dd9e6ee0daa7d759e9c846f container.
Oct 22, 2019 9:51:16 PM com.github.kostyasha.yad.DockerCloud lambda$provision$0
SEVERE: Error in provisioning; template='DockerSlaveTemplate[configVersion=1,maxCapacity=10,id=b158c964-73b4-4d61-8f1b-4c2e6195f473,labelString=docker-yad,launcher=com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher@145678d2,remoteFs=/home/jenkins,mode=NORMAL,retentionStrategy=com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy@27f,numExecutors=1,dockerContainerLifecycle=com.github.kostyasha.yad.DockerContainerLifecycle@1ec188dc[image=jenkins/ssh-slave:jdk11,pullImage=DockerPullImage[pullStrategy=PULL_LATEST,credentialsId=,registriesCreds=<null>,connector=<null>],createContainer=DockerCreateContainer[command=,commands=<null>,entrypoint=<null>,hostname=docker-agent,dnsHosts=[],volumes=[],volumesFrom=[],environment=[],bindPorts=,bindAllPorts=false,memoryLimit=2000,cpuShares=2,privileged=false,tty=false,macAddress=<null>,extraHosts=[],networkMode=<null>,devices=[],cpusetCpus=,cpusetMems=,links=[],dockerLabels=[],shmSize=2000,restartPolicy=DockerContainerRestartPolicy[policyName=NO,maximumRetryCount=0],workdir=/home/jenkins,user=jenkins],stopContainer=DockerStopContainer[timeout=10,connector=<null>],removeContainer=DockerRemoveContainer[removeVolumes=true,force=true,connector=<null>]],nodeProperties=<null>]' for cloud='YAD'
java.lang.NullPointerException
        at com.github.kostyasha.yad_docker_java.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212)
        at com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort.fromString(HostAndPort.java:168)
        at com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort.fromParts(HostAndPort.java:135)
        at com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher.getHostAndPort(DockerComputerSSHLauncher.java:174)
        at com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher.waitUp(DockerComputerSSHLauncher.java:105)
        at com.github.kostyasha.yad.DockerCloud.provisionWithWait(DockerCloud.java:253)
        at com.github.kostyasha.yad.DockerCloud.lambda$provision$0(DockerCloud.java:135)
        at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
        at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Oct 22, 2019 9:51:19 PM hudson.model.AsyncPeriodicWork$1 run

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 4:07:03 PM10/22/19
to jenkinsc...@googlegroups.com
it seems to not work with {code}unix:///var/run/docker.sock{code} as provider this line is the culprit https://github.com/KostyaSha/yet-another-docker-plugin/blob/master/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/launcher/DockerComputerSSHLauncher.java#L171 thie this return ** https unix :// github.com / KostyaSha var / yet-another-docker-plugin run / blob/master/yet-another- docker -plugin/src/main/java/com/github/kostyasha/yad/launcher/DockerComputerSSHLauncher . java#L171 sock** and it is not an URI that return a host, getHosts() return **null**

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 4:11:04 PM10/22/19
to jenkinsc...@googlegroups.com
it seems to not work with {code}unix:///var/run/docker.sock{code} as provider this line is the culprit https://github.com/KostyaSha/yet-another-docker-plugin/blob/master/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/launcher/DockerComputerSSHLauncher.java#L171 this return **unix:///var/run/docker.sock** and it is not an URI that return a host, getHosts() return **null**

I've created https://github.com/KostyaSha/yet-another-docker-plugin/issues/280

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 4:46:02 PM10/22/19
to jenkinsc...@googlegroups.com

Using a local Docker image I just build, why it tries to make a pull from docker hub

SEVERE: Error during callback
com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.exception.NotFoundException: {"message":"pull access denied for yad-ssh, repository does not exist or may require 'docker login': denied: requested access to the resource is denied"}

        at com.github.kostyasha.yad_docker_java.com.github.dockerjava.jaxrs.filter.ResponseStatusExceptionFilter.filter(ResponseStatusExceptionFilter.java:46)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:133)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:121)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:283)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:767)
        at com.github.kostyasha.yad_docker_java.org.glassfish.jersey.internal.Errors.process(Errors.java:316)

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 5:55:02 PM10/22/19
to jenkinsc...@googlegroups.com

finally, after some time I've made it works, I could not replicate the issue with yep-another-docker-plugin 0.15 and ssh-slaves-plugin 1.31.0 on Jenkins core 1.190.1, I've used a Docker image from jenkinsci/ssh-slave with an RSA public key preconfigured on /hoime/jenkins/.ssh/authorized_keys I have used a credential with the ssh key, I've debugged the plugin and it should not have any trouble to pass the checkconfig method if the credential selected exists. Could you check that the credential configured exists? Could you give me more details about your configuration?

ERROR: Launching agent process aborted. java.lang.InterruptedException: Validate configuration: The selected credentials cannot be found at

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 5:56:03 PM10/22/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo started work on Bug JENKINS-59879
 
Change By: Ivan Fernandez Calvo
Status: Open In Progress

kuisathaverat@gmail.com (JIRA)

unread,
Oct 22, 2019, 5:56:03 PM10/22/19
to jenkinsc...@googlegroups.com
finally, after some time I've made it works, I could not replicate the issue with yep-another-docker-plugin 0.15 and ssh-slaves-plugin 1.31.0 on Jenkins core 1.190.1, I've used a Docker image from *jenkinsci/ssh-slave* with an RSA public key preconfigured on /hoime/jenkins/.ssh/authorized_keys I have used a credential with the ssh key, I've debugged the plugin and it should not have any trouble to pass the checkconfig method if the credential selected exists. Could you check that the credential configured exists? Could you give me more details about your configuration?

{code}

ERROR: Launching agent process aborted. java.lang.InterruptedException: Validate configuration: The selected credentials cannot be found at
{code}

This is the image I have used
{code}
FROM jenkinsci/ssh-slave
USER root
COPY ssh /home/jenkins/.ssh
RUN chown -R jenkins:jenkins /home/jenkins/ \
  && chmod 700 /home/jenkins/.ssh \
  && chmod 600 /home/jenkins/.ssh/*
COPY ssh /root/.ssh
RUN chown -R root:root /root/ \
  && chmod 700 /root/.ssh \
  && chmod 600 /root/.ssh/*
RUN ssh-keygen -A
RUN sed -i /etc/ssh/sshd_config \
        -e 's/PermitRootLogin.*/PermitRootLogin yes/'

EXPOSE 22

ENTRYPOINT []
CMD [ "/bin/sh", "-c", "/usr/sbin/sshd -D -p 22"]
{code}

rick.d.vries@gmail.com (JIRA)

unread,
Oct 23, 2019, 2:17:02 AM10/23/19
to jenkinsc...@googlegroups.com

First of all, thanks for all your hard work!

We are using a container base on the PHUSION image (FROM phusion/baseimage:0.9.19) because we need a zombie reaper. (Sometimes Java got stuck and then the docker image couldnt stop)

FROM phusion/baseimage:0.9.19

ENV DEBIAN_FRONTEND noninteractive

RUN /etc/my_init.d/00_regen_ssh_host_keys.sh

# Disable root password
RUN passwd -l root

# Create jenkins user and give sudo
RUN \
  /bin/bash -c \
    'useradd --create-home -s /bin/bash jenkins && \
    adduser jenkins sudo && \
    mkdir -p /etc/sudoers.d && \
    echo jenkins ALL=NOPASSWD:ALL > /etc/sudoers.d/jenkins && \
    chmod 0440 /etc/sudoers.d/jenkins'

RUN echo "jenkins:jenkins" | chpasswd

RUN mkdir -p /home/jenkins/.ssh
VOLUME /home/jenkins/ssh

EXPOSE 22

UN sudo rm -r /etc/ssh/ssh*key
RUN sudo dpkg-reconfigure openssh-server# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
 

the above is a snippet of the ssh/user related docker config we use.
The rest is Mounting of volumes and adding packages.

we have specific keys we need to rsync files created in the docker container to a specific host and push data to git.
None of the data for that has changed but perhapse something in the 1.30.0 changed that requires new certificates?

kuisathaverat@gmail.com (JIRA)

unread,
Oct 23, 2019, 3:27:02 AM10/23/19
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Oct 23, 2019, 3:28:02 AM10/23/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo commented on Bug JENKINS-59879
 
Re: yet-another-docker-0.1.4 docker cloud does not work with >= ssh-slaves-plugin-1.30.0

on 1.30.0 I've added a check that verified the SSHLauncher config before to do nothing, this avoid tons of configuration errors the I've seen in the past, this check verified that a credential is set to access to the Agent, what do you have configured there nothing?

egutierrez@cloudbees.com (JIRA)

unread,
Oct 23, 2019, 6:27:02 AM10/23/19
to jenkinsc...@googlegroups.com

rick.d.vries@gmail.com (JIRA)

unread,
Oct 23, 2019, 7:18:02 AM10/23/19
to jenkinsc...@googlegroups.com
Rick de Vries commented on Bug JENKINS-59879
 
Re: yet-another-docker-0.1.4 docker cloud does not work with >= ssh-slaves-plugin-1.30.0

The scope of the credential is Global in Jira.
And the Strategy is set to Non verifying Verification Strategy

rick.d.vries@gmail.com (JIRA)

unread,
Oct 23, 2019, 7:20:02 AM10/23/19
to jenkinsc...@googlegroups.com
Rick de Vries edited a comment on Bug JENKINS-59879
The scope of the credential is Global in Jira.
And the Strategy is set to Non verifying Verification Strategy

And the Credential Kind is 'Username with Password'

kuisathaverat@gmail.com (JIRA)

unread,
Oct 23, 2019, 5:47:03 PM10/23/19
to jenkinsc...@googlegroups.com

I've created an environment with docker-compose using Jenkins Core 2.210, yep-another-docker-plugin 0.15 and ssh-slaves-plugin 1.31.0, all configured by JasC but yep-another-docker-plugin, it seems does not support JasC. I have configures key and user+password credentials both works as expected the agents are provisioned and execute the job. So testing the thing and debugging the code with the latest version of both plugins I could not find a reason to fail other than the credential does not exist, the check where seems to fail on your environment search for the ID of the credential that's it nothing less, nothing more.

this is my test environment https://github.com/kuisathaverat/jenkins-issues/tree/master/JENKINS-59879

kuisathaverat@gmail.com (JIRA)

unread,
Oct 25, 2019, 11:42:01 AM10/25/19
to jenkinsc...@googlegroups.com

Do you have installed the latest ssh-cedentials-plugin(1.18.0) and credential-plugin (2.3.0)?

rick.d.vries@gmail.com (JIRA)

unread,
Oct 25, 2019, 12:53:01 PM10/25/19
to jenkinsc...@googlegroups.com

ill have to check monday, but i updated everything to the latest 3 days ago

rick.d.vries@gmail.com (JIRA)

unread,
Oct 28, 2019, 4:55:02 AM10/28/19
to jenkinsc...@googlegroups.com

kuisathaverat@gmail.com (JIRA)

unread,
Nov 11, 2019, 10:54:02 AM11/11/19
to jenkinsc...@googlegroups.com

I cannot replicate it, it should be something related to the credential but I cannot figure out what, Could you attach the XML of the credential in JENKINS_HOME/credentials.xml? you could remove the password and user I want to see how the XML looks like, versions, ...

kuisathaverat@gmail.com (JIRA)

unread,
Nov 17, 2019, 9:17:02 AM11/17/19
to jenkinsc...@googlegroups.com
Ivan Fernandez Calvo closed an issue as Cannot Reproduce
 
Status: In Progress Closed
Resolution: Cannot Reproduce
Reply all
Reply to author
Forward
0 new messages