Install Hangs

jffelsinger's Avatar

jffelsinger

02 Jun, 2014 05:20 PM

The build for one of my projects tends to hang for an inordinately long amount of time during a couple of the install and pre-build processes. It also seems to happen on the same steps each time. First it'll hang when installing some of the ruby gems. Particularly, it seems to happen when installing compass. It next hangs after having used nuget restore to install an entity framework package. It wouldn't particularly bother me, but I haven't been able to build yet as the two processes hang long enough to go over the 30 minute mark. The gem install takes about 20 minutes and the nuget restore seems like it might take even longer.

Locally neither are a problem, and watching the console window with verbose output turned on seems to show that the commands themselves (gem install and nuget restore) are hanging at points when nothing is really happening (such as right AFTER a successful request), which seems odd to me. I could be completely off the mark on that assumption though.

  1. Support Staff 1 Posted by Feodor Fitsner on 02 Jun, 2014 06:00 PM

    Feodor Fitsner's Avatar

    Is nuget restore hanging every time or it has sporadic nature?

  2. 2 Posted by jffelsinger on 02 Jun, 2014 06:06 PM

    jffelsinger's Avatar

    Every time. With nuget restore It gets a few packages installed but eventually hangs part-way through.

  3. Support Staff 3 Posted by Feodor Fitsner on 02 Jun, 2014 06:08 PM

    Feodor Fitsner's Avatar

    Do you have any custom NuGet package sources configured?

  4. 4 Posted by jffelsinger on 02 Jun, 2014 06:16 PM

    jffelsinger's Avatar

    I do. I am adding two sources to nuget when running it. One source from here, ci.appveyor.com/nuget/..., and another from elsewhere.

    The console logs indicate that referenced packages from both of those sources look to be getting installed before it hangs.

  5. Support Staff 5 Posted by Feodor Fitsner on 02 Jun, 2014 06:28 PM

    Feodor Fitsner's Avatar

    Where the second feed is hosted?

    I'm 95% sure it's custom feed problem. Sometimes default nuget.org feed lags (nuget.org maintenance or specific build worker VM networking problems), but most of the time it works with predictable results. Just ran a test build: https://ci.appveyor.com/project/appvyr/demo-app

  6. 6 Posted by jffelsinger on 02 Jun, 2014 06:46 PM

    jffelsinger's Avatar

    The second source is from my team's teamcity nuget repo, which is hosted in a Windows Azure VM (we've just found Appveyor and started moving some of our projects over). We haven't had problems with it lagging before though; this source is being used on another project here without incident.

    Could still be the culprit though. I'ma remove the references to our repos from the project and see how it runs, will report back with results.

  7. Support Staff 7 Posted by Feodor Fitsner on 02 Jun, 2014 06:56 PM

    Feodor Fitsner's Avatar

    Yeah, let me know how it goes.

    Also, you might do a small fake project just to test how packages are being downloaded. Disable build and test stages and then use nuget install <package-from-teamcity> -Source <team-city-feed> as a build script.

  8. 8 Posted by jffelsinger on 02 Jun, 2014 08:40 PM

    jffelsinger's Avatar

    Seems that the problem with nuget was a problem with the credentials I was using. I didn't catch it because the line got hidden somewhere between 500 lines of output, and it was hanging at a rather nondescript place. Got that fixed and nuget is working beautifully.

  9. Support Staff 9 Posted by Feodor Fitsner on 02 Jun, 2014 08:42 PM

    Feodor Fitsner's Avatar

    Cool, thanks for the update!

  10. Support Staff 10 Posted by Feodor Fitsner on 03 Jun, 2014 10:19 PM

    Feodor Fitsner's Avatar

    Joel,

    Could you please share how did you solve NuGet credentials problem? It seems there is a similar problem: http://help.appveyor.com/discussions/problems/246-using-nuget-restore

    Thank you!

    - Feodor

  11. 11 Posted by jffelsinger on 04 Jun, 2014 01:07 PM

    jffelsinger's Avatar

    Hm, when I click that link it doesn't seem to load, so I'll share here. Not sure if it'll help either, since it was actually a dumb blunder on my part, but here goes:

    I'll start right off and say that the solution for me was to double-check the credentials I was supplying since I had messed up and was supplying a wrong username. I took a couple steps to get to the solution though, and that might be a help.

    Step 1) I turned on verbose output during the nuget restore, nuget restore -verbosity detailed, to get a better handle on where the problem might be occurring.

    Step 2) I created a couple of empty projects that just pulled in references from nuget, each using just one of my custom nuget repos. This allowed me to see exactly which one was the problem. It also reduced the output to a more manageable size as I was pulling in less packages from each.

    Anyhoo, after step two I was able to catch, on one of those test projects, the following lines that I hadn't noticed before:

    1234 |    Please provide credentials for: https://ci.appveyor.com/nuget/stuffhere-12ldswsdf
    1235 |    Username:
    

    When I saw that I did a bit more debugging, by echoing out some of environment variables before the nuget restore, like so:

    before_build:
      - echo %nuget_user% %nuget_password%
      - nuget sources add -Name "Repo Name" -Source https://all.the.url/stuff/nuget-wsdf234 -UserName %nuget_user% -Password %nuget_password%
    

    If I was using the gui I could have just double-checked there, but since I was using a yml file with encrypted/secure values this was easier. During the next build I was able to see that I had actually supplied the wrong credentials for one of my sources.

    Hope that helps.

  12. Support Staff 12 Posted by Feodor Fitsner on 04 Jun, 2014 04:26 PM

    Feodor Fitsner's Avatar

    Perfect, thank you!

  13. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:44 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Jun, 2025 08:45 PM
18 Jun, 2025 04:23 PM
13 Jun, 2025 04:36 PM
13 Jun, 2025 04:27 PM
13 Jun, 2025 07:20 AM

 

10 Jun, 2025 01:56 AM
09 Jun, 2025 07:11 PM
04 Jun, 2025 04:08 PM
27 May, 2025 05:48 PM
27 May, 2025 06:37 AM
27 May, 2025 06:31 AM