tag:help.appveyor.com,2012-11-13:/discussions/problems/1259-dns-problemAppVeyor: Discussion 2018-10-19T08:16:56Ztag:help.appveyor.com,2012-11-13:Comment/356168112014-12-23T17:00:07Z2014-12-23T17:00:07ZDNS Problem?<div><p>Hm, I've been able to download the file from that location:<br>
<a href=
"https://ci.appveyor.com/project/FeodorFitsner/simple-console/build/1.0.74">
https://ci.appveyor.com/project/FeodorFitsner/simple-console/build/...</a></p>
<p>AppVeyor workers use Google DNS (8.8.8.8/8.8.4.4).</p>
<p>Try flushing DNS before making that call:</p>
<pre>
<code>ipconfig /flushdns</code>
</pre>
<p><a href=
"https://ci.appveyor.com/project/FeodorFitsner/simple-console/build/1.0.75">
https://ci.appveyor.com/project/FeodorFitsner/simple-console/build/...</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/356168112014-12-24T12:14:13Z2014-12-24T12:14:13ZDNS Problem?<div><p>Hi Feodor,</p>
<p>weird, tried flushing the DNS cache via <code>ipconfig
/flushdns</code> but it did not help:<br>
<a href=
"https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build/49-master">
https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build...</a></p>
<p>That also raises another question, namely what kind of state is
preserved between the builds and whether you get the same Hyper-V
worker for each build or always an random one?</p>
<p>My assumption was that I would get a random build worker that is
reset to a prisitine state each time a build is started. The only
shared and preserved state would the cached directories, if
any.</p>
<p>Merry Xmas!<br>
Torben</p></div>ukiotag:help.appveyor.com,2012-11-13:Comment/356168112014-12-24T18:49:54Z2014-12-24T18:49:54ZDNS Problem?<div><p>Yes, you are correct. Each time it's a random worker from a
random Hyper-V host which was reset to a "clean" state. I could
imagine there might be some workers which was snapshoted with
"wrong" DNS, but you would randomly get that DNS error then.</p>
<p>Try downloading that file in the very beginning of your
script?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/356168112014-12-27T12:44:20Z2014-12-27T12:44:20ZDNS Problem?<div><p>Weird. I put it at the beginning (init) and it suddenly
worked:<br>
<a href=
"https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build/133-master">
https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build...</a></p></div>ukiotag:help.appveyor.com,2012-11-13:Comment/356168112014-12-27T13:05:54Z2014-12-27T13:05:54ZDNS Problem?<div><p>...and it stays weird as it is. After a successful run I moved
the downloading part back the where it was. It won't fail here
anymore because the downloaded and extracted files are now
cached.</p>
<p>However, now it fails a bit further in the build process, again
in a place where a download is involved and again with something
that looks like a dns issue:<br></p>
<pre>
<code>gem --version
502.0.14
51gem install bundler --quiet --no-ri --no-rdoc
52ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
53 Unable to download data from https://rubygems.org/ - no such name (https://rubygems.org/latest_specs.4.8.gz)
54Command exited with code 2</code>
</pre>
<p>Failed exactly here for 3 times in a row now, so I guess its
reproducible:<br>
<a href=
"https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build/135-master">
https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build...</a></p></div>ukiotag:help.appveyor.com,2012-11-13:Comment/356168112014-12-27T13:16:43Z2014-12-27T13:16:43ZDNS Problem?<div><p>ok, might have been only a hiccup though. The 4th build later
the error is gone:<br>
<a href=
"https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build/138-master">
https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build...</a></p></div>ukiotag:help.appveyor.com,2012-11-13:Comment/356168112014-12-27T13:35:25Z2014-12-27T13:35:25ZDNS Problem?<div><p>...and there it was, back again one build later and the next...:
<a href=
"https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build/139-master">
https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build...</a><br>
<a href=
"https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build/140-master">
https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build...</a></p></div>ukiotag:help.appveyor.com,2012-11-13:Comment/356168112014-12-27T21:05:14Z2014-12-27T21:05:14ZDNS Problem?<div><p>Hi Feodor,</p>
<p>I suspect all this has something to do with the installation of
Virtualbox. I'm pretty sure it adds and resets some network
adapters, which might explain the DNS resolution issues.</p>
<p>For now I am waiting until the network is back up again before
continuing:<br></p>
<pre>
<code>12While ((Test-Connection heise.de -count 1 -quiet) -ne "True") {
13 echo "waiting for network..."
14 Start-Sleep 1
15}</code>
</pre>
<p>There seem to be at least 2 seconds after installing VirtualBox
where the network is not available, e.g. see here:<br>
<a href=
"https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build/157-master">
https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build...</a></p>
<p>Once the cache for this project is cleaned and the build is
green again I consider this theory confirmed and will close the
discussion.</p>
<p>What a nasty bug in my appveyor.yml...</p>
<p>Cheers,<br>
Torben</p></div>ukiotag:help.appveyor.com,2012-11-13:Comment/356168112014-12-27T21:09:02Z2014-12-27T21:09:02ZDNS Problem?<div><p>Oh, I think you are right! Might be VirtualBox setting up
virtual NICs.</p>
<p>Anyway, using VirtualBox inside AV build workers is a great case
and if that works it adds another edge case to <a href=
"http://help.appveyor.com/discussions/questions/787-simulate-enterprise-proxy">
this one</a>. :)</p>
<p>Let me know about results.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/356168112014-12-27T21:21:53Z2014-12-27T21:21:53ZDNS Problem?<div><p>Oh, might it be that outbound ICMP is blocked from within the
azure build workers?</p>
<p>Compare this on hyperv (works after 2 secs)<br>
<a href=
"https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build/158-master">
https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build...</a><br>
vs the same build on azure (ping does not work after 13 minutes
yet...)<br>
<a href=
"https://ci.appveyor.com/project/tknerr/vagrant-appveyor-testing/build/165-master">
https://ci.appveyor.com/project/tknerr/vagrant-appveyor-testing/bui...</a></p>
<p>Cheers,<br>
Torben</p></div>ukiotag:help.appveyor.com,2012-11-13:Comment/356168112014-12-27T21:50:03Z2014-12-27T21:50:03ZDNS Problem?<div><p>Trying with <code>Test-NetConnection</code> on port 80 instead
of using ICMP.</p>
<p>Looks good on the hyperv workers:<br>
<a href=
"https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build/161-master">
https://ci.appveyor.com/project/ukio/vagrant-appveyor-testing/build...</a></p>
<p>Waiting for the azure worker to start...<br>
<a href=
"https://ci.appveyor.com/project/tknerr/vagrant-appveyor-testing/build/168-master">
https://ci.appveyor.com/project/tknerr/vagrant-appveyor-testing/bui...</a></p></div>ukiotag:help.appveyor.com,2012-11-13:Comment/356168112014-12-27T21:59:28Z2014-12-27T21:59:28ZDNS Problem?<div><p>So, the azure worker just started, and I'm glad this check now
works both for hyperv and azure workers:<br></p>
<pre>
<code>15 While ((Test-NetConnection heise.de -Port 80 -InformationLevel Quiet) -ne "True") {
16 echo "waiting for network..."
17 Start-Sleep 1
18}</code>
</pre>
<p>@Feodor: concerning the results of using VirtualBox / Vagrant
inside Appveyor I will comment in the other thread here: <a href=
"http://help.appveyor.com/discussions/problems/1247-vagrant-not-working-inside-appveyor">
http://help.appveyor.com/discussions/problems/1247-vagrant-not-work...</a></p>
<p>The cause of the "DNS issues" has been found (ie. VirtualBox
setting up virtual NICs) and a solution too (wait until outbound
http works) - so I will close this thread.</p></div>ukio