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

Builds fail as git push gets stuck

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Labels:
      None
    • Environment:
      Win-7 X64, Jenkins 2.46.3, Git plugin 3.3.0, Bitbucket pluin 1.1.5
    • Similar Issues:

      Description

      Jenkins Freestyle job.
      Builds .net app using msbuild. – Pass
      Add & Commit the changes. – Pass
      Push commit to repo. – Stucks

      Logs: 
      -----------------------------------------------------------------------------------------------------------------------
      Building in workspace C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB
      [WS-CLEANUP] Deleting project workspace...
      [WS-CLEANUP] Done
      Cloning the remote Git repository
      Cloning repository http://*MYREPOSERVER*:7990/scm/doc/applicationsrc_repo.git
       > git.exe init C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB # timeout=10
      Fetching upstream changes from http://*MYREPOSERVER*:7990/scm/doc/applicationsrc_repo.git
       > git.exe --version # timeout=10
       > git.exe fetch --tags --progress http://*MYREPOSERVER*:7990/scm/doc/applicationsrc_repo.git +refs/heads/*:refs/remotes/origin/*
       > git.exe config remote.origin.url http://*MYREPOSERVER*:7990/scm/doc/applicationsrc_repo.git # timeout=10
       > git.exe config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
       > git.exe config remote.origin.url http://*MYREPOSERVER*:7990/scm/doc/applicationsrc_repo.git # timeout=10
      Fetching upstream changes from http://*MYREPOSERVER*:7990/scm/doc/applicationsrc_repo.git
       > git.exe fetch --tags --progress http://*MYREPOSERVER*:7990/scm/doc/applicationsrc_repo.git +refs/heads/*:refs/remotes/origin/*
       > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
       > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
      Checking out Revision e71d654e4108190a7602d474a398faebe88c91bf (refs/remotes/origin/master)
       > git.exe config core.sparsecheckout # timeout=10
       > git.exe checkout -f e71d654e4108190a7602d474a398faebe88c91bf
       > git.exe rev-list e71d654e4108190a7602d474a398faebe88c91bf # timeout=10
      Path To MSBuild.exe: C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
      Executing the command cmd.exe /C " chcp 1252 && "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" WebAppDemoApp.sln " && exit %%ERRORLEVEL%% from C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB
      [WebAppDemo_BB] $ cmd.exe /C " chcp 1252 && "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" WebAppDemoApp.sln " && exit %%ERRORLEVEL%%
      Active code page: 1252
      Microsoft (R) Build Engine version 14.0.25420.1
      Copyright (C) Microsoft Corporation. All rights reserved.
      
      Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
      Build started 6/5/2017 6:14:35 PM.
      Project "C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\WebAppDemoApp.sln" on node 1 (default targets).
      ValidateSolutionConfiguration:
        Building solution configuration "Debug|Any CPU".
      Project "C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\WebAppDemoApp.sln" (1) is building "C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\WebAppDemoApp\WebAppDemoApp.csproj" (2) on node 1 (default targets).
      GenerateTargetFrameworkMonikerAttribute:
      Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
      CoreCompile:
        C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Net.Compilers.1.0.0\build\..\tools\csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Owin.Security.3.0.1\lib\net45\Microsoft.Owin.Security.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Owin.Security.Facebook.3.0.1\lib\net45\Microsoft.Owin.Security.Facebook.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Owin.Security.Google.3.0.1\lib\net45\Microsoft.Owin.Security.Google.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Owin.Security.MicrosoftAccount.3.0.1\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Owin.Security.OAuth.3.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Owin.Security.Twitter.3.0.1\lib\net45\Microsoft.Owin.Security.Twitter.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\mscorlib.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Owin.1.0\lib\net40\Owin.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.ComponentModel.DataAnnotations.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Configuration.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Drawing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Net.Http.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Net.Http.WebRequest.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Runtime.Serialization.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Web.Abstractions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Web.ApplicationServices.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Web.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Web.Entity.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Web.Routing.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Xml.Linq.dll" /reference:"C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\packages\WebGrease.1.5.2\lib\WebGrease.dll" /debug+ /debug:full /optimize- /out:obj\Debug\WebAppDemoApp.dll /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /target:library /utf8output App_Start\BundleConfig.cs App_Start\FilterConfig.cs App_Start\IdentityConfig.cs App_Start\RouteConfig.cs App_Start\Startup.Auth.cs App_Start\WebApiConfig.cs Areas\HelpPage\ApiDescriptionExtensions.cs Areas\HelpPage\App_Start\HelpPageConfig.cs Areas\HelpPage\Controllers\HelpController.cs Areas\HelpPage\HelpPageAreaRegistration.cs Areas\HelpPage\HelpPageConfigurationExtensions.cs Areas\HelpPage\ModelDescriptions\CollectionModelDescription.cs Areas\HelpPage\ModelDescriptions\ComplexTypeModelDescription.cs Areas\HelpPage\ModelDescriptions\DictionaryModelDescription.cs Areas\HelpPage\ModelDescriptions\EnumTypeModelDescription.cs Areas\HelpPage\ModelDescriptions\EnumValueDescription.cs Areas\HelpPage\ModelDescriptions\IModelDocumentationProvider.cs Areas\HelpPage\ModelDescriptions\KeyValuePairModelDescription.cs Areas\HelpPage\ModelDescriptions\ModelDescription.cs Areas\HelpPage\ModelDescriptions\ModelDescriptionGenerator.cs Areas\HelpPage\ModelDescriptions\ModelNameAttribute.cs Areas\HelpPage\ModelDescriptions\ModelNameHelper.cs Areas\HelpPage\ModelDescriptions\ParameterAnnotation.cs Areas\HelpPage\ModelDescriptions\ParameterDescription.cs Areas\HelpPage\ModelDescriptions\SimpleTypeModelDescription.cs Areas\HelpPage\Models\HelpPageApiModel.cs Areas\HelpPage\SampleGeneration\HelpPageSampleGenerator.cs Areas\HelpPage\SampleGeneration\HelpPageSampleKey.cs Areas\HelpPage\SampleGeneration\ImageSample.cs Areas\HelpPage\SampleGeneration\InvalidSample.cs Areas\HelpPage\SampleGeneration\ObjectGenerator.cs Areas\HelpPage\SampleGeneration\SampleDirection.cs Areas\HelpPage\SampleGeneration\TextSample.cs Areas\HelpPage\XmlDocumentationProvider.cs Controllers\AccountController.cs Controllers\HomeController.cs Controllers\ValuesController.cs Global.asax.cs Models\AccountBindingModels.cs Models\AccountViewModels.cs Models\IdentityModels.cs Properties\AssemblyInfo.cs Providers\ApplicationOAuthProvider.cs Results\ChallengeResult.cs Startup.cs "C:\windows\TEMP\.NETFramework,Version=v4.5.2.AssemblyAttributes.cs"
      
      CopyFilesToOutputDirectory:
        Copying file from "obj\Debug\WebAppDemoApp.dll" to "bin\WebAppDemoApp.dll".
        WebAppDemoApp -> C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\WebAppDemoApp\bin\WebAppDemoApp.dll
        Copying file from "obj\Debug\WebAppDemoApp.pdb" to "bin\WebAppDemoApp.pdb".
      Done Building Project "C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\WebAppDemoApp\WebAppDemoApp.csproj" (default targets).
      Done Building Project "C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB\WebAppDemoApp.sln" (default targets).
      
      Build succeeded.
          0 Warning(s)
          0 Error(s)
      
      Time Elapsed 00:00:14.84
      [WebAppDemo_BB] $ cmd /c call C:\windows\TEMP\hudson5454792597764725306.bat
      
      C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB>git checkout master 
      M	WebAppDemoApp/bin/WebAppDemoApp.dll
      M	WebAppDemoApp/bin/WebAppDemoApp.pdb
      M	WebAppDemoApp/obj/Debug/WebAppDemoApp.csprojResolveAssemblyReference.cache
      M	WebAppDemoApp/obj/Debug/WebAppDemoApp.dll
      M	WebAppDemoApp/obj/Debug/WebAppDemoApp.pdb
      Branch master set up to track remote branch master from origin.
      Switched to a new branch 'master'
      
      C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB>git commit -am "Build 13 Commit" 
      [master 5d15423] Build 13 Commit
       Committer: REHMANA01
      Your name and email address were configured automatically based
      on your username and hostname. Please check that they are accurate.
      You can suppress this message by setting them explicitly:
      
          git config --global user.name "Your Name"
          git config --global user.email you@example.com
      
      After doing this, you may fix the identity used for this commit with:
      
          git commit --amend --reset-author
      
       5 files changed, 0 insertions(+), 0 deletions(-)
      
      C:\Program Files (x86)\Jenkins\workspace\WebAppDemo_BB>git push -u origin master 
      
      

      ------------------------------------------------------------------------------------------------------------------------
      Build goes on till it times out.
      I have tried changing repositories as well.
      Initially my repo was on github where i faced the same issue, later moved the repo to local bitbucket setup. Both were public repo.

        Attachments

          Issue Links

            Activity

            Hide
            rehmana1 Azizul Rehman added a comment -

            Still facing issue even after all the suggested configurations.

            Show
            rehmana1 Azizul Rehman added a comment - Still facing issue even after all the suggested configurations.
            Hide
            markewaite Mark Waite added a comment -

            There are so many users of the plugin using git publisher to push from Windows machines to git repositories that I can't (yet) accept this is a plugin bug. I firmly believe it is a configuration error.

            Typically, configuration errors are best discovered by attempting to duplicate the problem in a "fresh" environment.

            Please provide detailed steps so that someone else can duplicate the problem before you reopen the bug report.

            Show
            markewaite Mark Waite added a comment - There are so many users of the plugin using git publisher to push from Windows machines to git repositories that I can't (yet) accept this is a plugin bug. I firmly believe it is a configuration error. Typically, configuration errors are best discovered by attempting to duplicate the problem in a "fresh" environment. Please provide detailed steps so that someone else can duplicate the problem before you reopen the bug report.
            Hide
            rehmana1 Azizul Rehman added a comment -

            I have tried this on three different machines and the end result was same.

            Show
            rehmana1 Azizul Rehman added a comment - I have tried this on three different machines and the end result was same.
            Hide
            markewaite Mark Waite added a comment -

            I attempted to duplicate the bug you've reported and was unsuccessful. The steps I took included:

            1. Create a freestyle job named "JENKINS-44682-bitbucket-push-fails-from-windows"
            2. Restrict that job to only run on agents with the label "windows"
            3. Use git repository "https://bitbucket.org/markewaite/jenkins-bugs.git" (http authentication, username / password credential)
            4. Use my username/password credential named "bitbucket-username-password"
            5. Use refspec "+refs/heads/JENKINS-44682:refs/remotes/origin/JENKINS-44682" so that data transfer can be reduced by "honor refspec"
            6. Define branch to build as "JENKINS-44682"
            7. Use advanced clone option "honor refspec" to reduce data transfer to only the specific branch
            8. Use advanced clone option "Do not fetch tags" to reduce data transfer
            9. Add "Checkout to local branch" and configure to checkout to a branch named "JENKINS-44682"
            10. Add "Prune stale remote tracking branches"
            11. Add "Use commit author in changelog"
            12. Add "Polling ignores commits from certain users" and include the user that runs my Jenkins server in the exclusion
            13. Enable scm polling on a 2 minute interval ("H/2 * * * *")
            14. Add an ant build step which runs the target "info-and-increment" (increments a build number in a file in the workspace)
            15. Add a "Git Publisher" post build action
            16. Configure the git publisher to push the branch "JENKINS-44682" to the remote named "orign" only if the build succeeds
            17. Run the job and see that it pushes the change to the bitbucket.org repository

            Please describe in precise detail the steps you've taken that show the problem.  I've attached the config.xml file of the job which I used that failed to duplicate the problem.

            Show
            markewaite Mark Waite added a comment - I attempted to duplicate the bug you've reported and was unsuccessful. The steps I took included: Create a freestyle job named " JENKINS-44682 -bitbucket-push-fails-from-windows " Restrict that job to only run on agents with the label "windows" Use git repository "https://bitbucket.org/markewaite/jenkins-bugs.git" (http authentication, username / password credential) Use my username/password credential named "bitbucket-username-password" Use refspec " +refs/heads/ JENKINS-44682 :refs/remotes/origin/ JENKINS-44682 " so that data transfer can be reduced by "honor refspec" Define branch to build as " JENKINS-44682 " Use advanced clone option "honor refspec" to reduce data transfer to only the specific branch Use advanced clone option "Do not fetch tags" to reduce data transfer Add "Checkout to local branch" and configure to checkout to a branch named " JENKINS-44682 " Add "Prune stale remote tracking branches" Add "Use commit author in changelog" Add "Polling ignores commits from certain users" and include the user that runs my Jenkins server in the exclusion Enable scm polling on a 2 minute interval ("H/2 * * * *") Add an ant build step which runs the target "info-and-increment" (increments a build number in a file in the workspace) Add a "Git Publisher" post build action Configure the git publisher to push the branch " JENKINS-44682 " to the remote named "orign" only if the build succeeds Run the job and see that it pushes the change to the bitbucket.org repository Please describe in precise detail the steps you've taken that show the problem.  I've attached the config.xml file of the job which I used that failed to duplicate the problem.
            Hide
            rehmana1 Azizul Rehman added a comment -

            Finally got the git push working.

            Had to remove the git for windows setup, cleanup the machine and use the jenkins.war file to run jenkins.
            Before moving to the .war file, i tried with multiple machines (uninstalling and cleaning the machine and reinstalling the Jenkins for windows setup.) but all in vain and had to move to Jenkins.war as a final resort.

            So, it seems that the issue might be in the Jenkins-Windows itself instead if the plugin.

            Show
            rehmana1 Azizul Rehman added a comment - Finally got the git push working. Had to remove the git for windows setup, cleanup the machine and use the jenkins.war file to run jenkins. Before moving to the .war file, i tried with multiple machines (uninstalling and cleaning the machine and reinstalling the Jenkins for windows setup.) but all in vain and had to move to Jenkins.war as a final resort. So, it seems that the issue might be in the Jenkins-Windows itself instead if the plugin.

              People

              • Assignee:
                Unassigned
                Reporter:
                rehmana1 Azizul Rehman
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: