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

Jenkins build failing due to failure of creation of docker container(ppwershell failure)

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: _unsorted
    • Labels:
      None
    • Environment:
      Windows docker + PowerShell
    • Similar Issues:

      Description

      powershell.exe : docker-compose : Cannot create container for service xxx: mkdir
      At C:\Jenkins\workspace\bootROM_pipeline\feature\C2000BROM-251-initial-design-rev3@tmp\durable-0d0b5812\powershellWrapper.ps1:3 char:1
      + & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Comm ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (docker-compose ...bootrom: mkdir :String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError

      C:\windows\system32\config\systemprofile: Cannot create a file when that file already exists.
      At C:\Jenkins\workspace\bootROM_pipeline\feature\C2000BROM-251-initial-design-rev3@tmp\durable-0d0b5812\powershellScrip

      t.ps1:1 char:1

      + docker-compose run --rm xxxx bash -l -c "cd /project; ./ ...

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      + CategoryInfo : NotSpecified: (Cannot create c...already exists.:String) [], RemoteException

      + FullyQualifiedErrorId : NativeCommandError

       

      (Note this was working fine)

       

      All the previous builds when I rebuild I am seeing this error

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          Please provide instructions that another person can follow to duplicate the error. As described in the initial issue report, this appears to be more of a request for help diagnosing "what changed?" rather than an issue report due to something in a specific release of Jenkins or one of its plugins.

          Show
          markewaite Mark Waite added a comment - Please provide instructions that another person can follow to duplicate the error. As described in the initial issue report, this appears to be more of a request for help diagnosing "what changed?" rather than an issue report due to something in a specific release of Jenkins or one of its plugins.
          Hide
          markewaite Mark Waite added a comment -

          After almost two weeks without a reply to the request for more information, closing as "Cannot reproduce"

          Show
          markewaite Mark Waite added a comment - After almost two weeks without a reply to the request for more information, closing as "Cannot reproduce"
          Hide
          manojkdi Manoj R added a comment -

          The only resolution to this issue is to delete the jenkins folder on the lave and restart the jenkins service.

          Show
          manojkdi Manoj R added a comment - The only resolution to this issue is to delete the jenkins folder on the lave and restart the jenkins service.
          Hide
          markewaite Mark Waite added a comment -

          Manoj R you reopened the issue report without providing any more information that will help someone else duplicate the problem. With no further information, I'm confident that no one will investigate any further.

          Show
          markewaite Mark Waite added a comment - Manoj R you reopened the issue report without providing any more information that will help someone else duplicate the problem. With no further information, I'm confident that no one will investigate any further.
          Hide
          manojkdi Manoj R added a comment -

          The jenkins job is using jenkins multibranch pipeline.  In one of the pipeline stages it is opening a docker container. This has been working well consistently. But intermittently i have seen this issue. Once i resolved this issue by deleting c:/jenkins folder and starting the jenkins slave service again.

          : Slave OS: Windows

          :container opening in docker is a linux container.

           

          Let me know what else information is needed. I can provide the jenkins file in parts as well if needed. But his is surely some issue. 

          Show
          manojkdi Manoj R added a comment - The jenkins job is using jenkins multibranch pipeline.  In one of the pipeline stages it is opening a docker container. This has been working well consistently. But intermittently i have seen this issue. Once i resolved this issue by deleting c:/jenkins folder and starting the jenkins slave service again. : Slave OS: Windows :container opening in docker is a linux container.   Let me know what else information is needed. I can provide the jenkins file in parts as well if needed. But his is surely some issue. 
          Hide
          markewaite Mark Waite added a comment -

          Please provide instructions that another person can follow to duplicate the error. Usually that involves a numbered list of steps which will consistently show the problem. If the numbered list of steps do not consistently show the problem, then note at which points the failure happens and the frequency at which it happens.

          Show
          markewaite Mark Waite added a comment - Please provide instructions that another person can follow to duplicate the error. Usually that involves a numbered list of steps which will consistently show the problem. If the numbered list of steps do not consistently show the problem, then note at which points the failure happens and the frequency at which it happens.
          Hide
          manojkdi Manoj R added a comment -

          Jenkins slave: Windows

          Slave agent run as service in windows (if it is not run as service then jenkins build works fine)

           

          here are some highlights about the jenkins job

          • jenkins pipeline based project
          • 1st step builds the docker image
          • 2nd step(which is failing) trys to run the command 
            • powershell 'docker-compose run --rm topograndebootrom bash -l -c "cd /project; ./tools/getversion.sh getVersion /project/xxxxx/xxxx/bootROM/include/version.h > version.txt"'

           

          Let me know if more steps are needed.

           

          Show
          manojkdi Manoj R added a comment - Jenkins slave: Windows Slave agent run as service in windows (if it is not run as service then jenkins build works fine)   here are some highlights about the jenkins job jenkins pipeline based project 1st step builds the docker image 2nd step(which is failing) trys to run the command  powershell 'docker-compose run --rm topograndebootrom bash -l -c "cd /project; ./tools/getversion.sh getVersion /project/xxxxx/xxxx/bootROM/include/version.h > version.txt"'   Let me know if more steps are needed.  
          Hide
          slide_o_mix Alex Earl added a comment -

          My guess is that the user that the jenkins agent (please don't use "slave") service is running as doesn't have permissions to run docker on the machine.

          Show
          slide_o_mix Alex Earl added a comment - My guess is that the user that the jenkins agent (please don't use "slave") service is running as doesn't have permissions to run docker on the machine.

            People

            • Assignee:
              Unassigned
              Reporter:
              manojkdi Manoj R
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: