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

Remote.jar is not working anymore because of changed parameter slave.jar->agent.jar

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: docker-plugin
    • Labels:
    • Environment:
    • Similar Issues:

      Description

      I use the docker plugin to execute jobs remote in another docker-container. I configured the cloud with default parameters and the "connect method": "Attach Docker container". When i execute a job, i get the message, that the used parameter "-slaveLog" is invalid. 

      The reason for that is, that Jeff removed the parameter alias in version 4.6 of remoting.jar so just "-agentLog" is valid now (pull request here). With jenkins 2.266 the remote-4.6.jar is the new default, so the docker-plugin's default settings (for the "Attach" method) are no longer viable - it's now necessary to override the defaults to make it work.

        Attachments

          Issue Links

            Activity

            Hide
            pjdarton pjdarton added a comment -

            The original descripiton said "no builds are possible now" - that was incorrect ... builds are still possible; the problem is that the default settings are no longer viable (if you override them, it can still work).

            See this comment in docker-plugin issue 818 for details of the workaround.

            Show
            pjdarton pjdarton added a comment - The original descripiton said "no builds are possible now" - that was incorrect ... builds are still possible; the problem is that the default settings are no longer viable (if you override them, it can still work). See this comment in docker-plugin issue 818 for details of the workaround.
            Hide
            jthompson Jeff Thompson added a comment -

            I looked for usages but apparently I missed this one. It just needs to be fixed in the plugin.

            Show
            jthompson Jeff Thompson added a comment - I looked for usages but apparently I missed this one. It just needs to be fixed in the plugin.
            Hide
            pjdarton pjdarton added a comment -

            Fixed in the next release.

            Show
            pjdarton pjdarton added a comment - Fixed in the next release.
            Hide
            frickeldave David Koenig added a comment -

            It doesn't seem to work with the described workaround. When i update jenkins to version 2.275, and add the EntryPoint Cmd "${JAVA_EXE} ${JVM_ARGS} -jar ${FS_DIR}/${JAR_NAME} -noReconnect -noKeepAlive -agentLog ${FS_DIR}/agent.log", i get the following content in the logfile of the jenkins master: 

            2021-01-18 23:20:35.621+0000 [id=33] INFO c.n.j.plugins.docker.DockerCloud#provision: Will provision 'cid-jenkins-debian-slave:latest', for label: 'lcl_cid-jenkins-debian-slave', in cloud: 'lcl-slave-cloud'
            2021-01-18 23:20:35.625+0000 [id=238] INFO c.n.j.p.docker.DockerTemplate#doProvisionNode: Trying to run container for image "cid-jenkins-debian-slave:latest"
            2021-01-18 23:20:35.626+0000 [id=238] INFO c.n.j.p.docker.DockerTemplate#doProvisionNode: Trying to run container for node lcl_cid-jenkins-debian-slave-0000qbpplgfpg from image: cid-jenkins-debian-slave:latest
            2021-01-18 23:20:35.627+0000 [id=33] INFO h.s.NodeProvisioner$StandardStrategyImpl#apply: Started provisioning Image of cid-jenkins-debian-slave:latest from lcl-slave-cloud with 1 executors. Remaining excess workload: 0
            2021-01-18 23:20:35.717+0000 [id=238] INFO c.n.j.p.docker.DockerTemplate#doProvisionNode: Started container ID 8887888b049d2a2c8b01ceaa7e0f1737bc81ae7d96a9460fe76eb3b60c2f0ffa for node lcl_cid-jenkins-debian-slave-0000qbpplgfpg from image: cid-jenkins-debian-slave:latest
            2021-01-18 23:20:45.613+0000 [id=36] INFO hudson.slaves.NodeProvisioner#lambda$update$6: Image of cid-jenkins-debian-slave:latest provisioning successfully completed. We have now 6 computer(s)
            2021-01-18 23:20:45.633+0000 [id=36] INFO c.n.j.plugins.docker.DockerCloud#canAddProvisionedSlave: Provisioning 'cid-jenkins-debian-slave:latest' on 'lcl-slave-cloud'; Total containers: 5 (of 6)

            As you can see, the container will be started 6 times, but nothing happens. I tried to replace the variables by fixed values <- same result. There no logs written in the slave container.  Exact the same configuration (set statically with casc.yml on newly created containers, so its definitivly the same config) work with a Jenkins 2.265 version without setting the EntryPoint cmd). Do you have any idea? Do i something wrong?

            Show
            frickeldave David Koenig added a comment - It doesn't seem to work with the described workaround. When i update jenkins to version 2.275, and add the EntryPoint Cmd " ${JAVA_EXE} ${JVM_ARGS} -jar ${FS_DIR}/${JAR_NAME} -noReconnect -noKeepAlive -agentLog ${FS_DIR}/agent.log ", i get the following content in the logfile of the jenkins master:  2021-01-18 23:20:35.621+0000 [id=33] INFO c.n.j.plugins.docker.DockerCloud#provision: Will provision 'cid-jenkins-debian-slave:latest', for label: 'lcl_cid-jenkins-debian-slave', in cloud: 'lcl-slave-cloud' 2021-01-18 23:20:35.625+0000 [id=238] INFO c.n.j.p.docker.DockerTemplate#doProvisionNode: Trying to run container for image "cid-jenkins-debian-slave:latest" 2021-01-18 23:20:35.626+0000 [id=238] INFO c.n.j.p.docker.DockerTemplate#doProvisionNode: Trying to run container for node lcl_cid-jenkins-debian-slave-0000qbpplgfpg from image: cid-jenkins-debian-slave:latest 2021-01-18 23:20:35.627+0000 [id=33] INFO h.s.NodeProvisioner$StandardStrategyImpl#apply: Started provisioning Image of cid-jenkins-debian-slave:latest from lcl-slave-cloud with 1 executors. Remaining excess workload: 0 2021-01-18 23:20:35.717+0000 [id=238] INFO c.n.j.p.docker.DockerTemplate#doProvisionNode: Started container ID 8887888b049d2a2c8b01ceaa7e0f1737bc81ae7d96a9460fe76eb3b60c2f0ffa for node lcl_cid-jenkins-debian-slave-0000qbpplgfpg from image: cid-jenkins-debian-slave:latest 2021-01-18 23:20:45.613+0000 [id=36] INFO hudson.slaves.NodeProvisioner#lambda$update$6: Image of cid-jenkins-debian-slave:latest provisioning successfully completed. We have now 6 computer(s) 2021-01-18 23:20:45.633+0000 [id=36] INFO c.n.j.plugins.docker.DockerCloud#canAddProvisionedSlave: Provisioning 'cid-jenkins-debian-slave:latest' on 'lcl-slave-cloud'; Total containers: 5 (of 6) As you can see, the container will be started 6 times, but nothing happens. I tried to replace the variables by fixed values <- same result. There no logs written in the slave container.  Exact the same configuration (set statically with casc.yml on newly created containers, so its definitivly the same config) work with a Jenkins 2.265 version without setting the EntryPoint cmd).  Do you have any idea? Do i something wrong?
            Hide
            frickeldave David Koenig added a comment -

            An addition info: In my docker images with Jenkins 2.275 i installed the rc of the plugin (with docker-plugin:incrementals;io.jenkins.docker;1.2.2-rc968.579d1401cd89 in plugins.txt). 

            In the logfile of my Jenkins Container i see, that it will be installed. 

            Will use url: https://repo.jenkins-ci.org/incrementals/io/jenkins/docker/docker-plugin/1.2.2-rc968.579d1401cd89/docker-plugin-1.2.2-rc968.579d1401cd89.hpi to download docker-plugin plugin

            But when i try to build something i get this result: 

            2021-01-19 00:04:33.440+0000 [id=158] WARNING i.j.d.c.DockerMultiplexedInputStream#readInternal: Unexpected data on container stderr: -agentLog FILE : Local agent error log destination (overrides workDir)
            {{ -auth user:pass : If your Jenkins is security-enabled, specify}}

            ...

            ...

            ...

            Show
            frickeldave David Koenig added a comment - An addition info: In my docker images with Jenkins 2.275 i installed the rc of the plugin (with docker-plugin:incrementals;io.jenkins.docker;1.2.2-rc968.579d1401cd89 in plugins.txt).  In the logfile of my Jenkins Container i see, that it will be installed.  Will use url: https://repo.jenkins-ci.org/incrementals/io/jenkins/docker/docker-plugin/1.2.2-rc968.579d1401cd89/docker-plugin-1.2.2-rc968.579d1401cd89.hpi to download docker-plugin plugin But when i try to build something i get this result:  2021-01-19 00:04:33.440+0000 [id=158] WARNING i.j.d.c.DockerMultiplexedInputStream#readInternal: Unexpected data on container stderr: -agentLog FILE : Local agent error log destination (overrides  workDir) {{ -auth user:pass : If your Jenkins is security-enabled, specify}} ... ... ...
            Hide
            pjdarton pjdarton added a comment -

            That's weird... the URL of the incrementals build you've listed isn't the URL of the latest build -  that one is from 14th Dec 2020, not the 16th Dec 2020.
            What you've used is the lexicographically last listed build, but it looks like they're not listed 100% in date order (which is peculiar, but it's not something I control).

            Try using the 16th Dec 2020 version, https://repo.jenkins-ci.org/incrementals/io/jenkins/docker/docker-plugin/1.2.2-rc962.2f58af3fa582/docker-plugin-1.2.2-rc962.2f58af3fa582.hpi
            That includes the fix I've implemented.

            ...or grab it from https://ci.jenkins.io/job/Plugins/job/docker-plugin/job/master/ which should always give you the lastest "bleeding edge" build.

            Show
            pjdarton pjdarton added a comment - That's weird... the URL of the incrementals build you've listed isn't the URL of the latest build -  that one is from 14th Dec 2020, not the 16th Dec 2020. What you've used is the lexicographically last listed build, but it looks like they're not listed 100% in date order (which is peculiar, but it's not something I control). Try using the 16th Dec 2020 version, https://repo.jenkins-ci.org/incrementals/io/jenkins/docker/docker-plugin/1.2.2-rc962.2f58af3fa582/docker-plugin-1.2.2-rc962.2f58af3fa582.hpi That includes the fix I've implemented. ...or grab it from https://ci.jenkins.io/job/Plugins/job/docker-plugin/job/master/ which should always give you the lastest "bleeding edge" build.

              People

              Assignee:
              pjdarton pjdarton
              Reporter:
              frickeldave David Koenig
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: