Page 1 of 1

Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 17:03
by DragMZ
Hello,

I'm experiencing problems with DNS lookups on a Debian VM (both Windows or Linux as a host).
There is a single (NAT) network card attached to the VM.
The VM is used for communication with different domains and sometimes it happens, that when it has to resolve many domains in a short time, then the problem above causes it to freeze on DNS lookups.

The problem can be reproduced, running the following shell script for ~15s:

while [ 1 ]; do nslookup google.pl; done

DNS stops from responding for ~1 minute and I'm getting ";; connection timed out; no servers could be reached" error.
I can still ping a remote host if the domain has been already resolved or if I know its IP address so the network seems to work when this happens.

I've tried to execute the shell script on different Debian VMs and the problem is reproducible on each.

Can anyone help? I can provide some more details if required.

Tested on:
Windows 7 host - VirtualBox 4.1.6
Debian host - VirtualBox 4.1.4

Many thanks,
Marcin.

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 17:08
by Perryg
Post a guests log file (as an attachment) after this has happened.

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 17:35
by DragMZ
Have attached the logs saved when the lookups freezed while the shell script was running. Can't see anything interesting there though.
As you can see, I've upgraded to 4.1.8 but it didn't help.

I'm going to try with different network adapter types (currently I'm using Intel 82540EM).

Regards

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 18:10
by Perryg

Code: Select all

Host RAM: 3071MB RAM, available: 1519MB
RamSize         <integer> = 0x0000000008000000 (134217728)
With the available ram at 1.5 and assigning 1.3 to the guest, it may be an issue.

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 18:45
by DragMZ
The VM has 128 MB assigned

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 18:52
by Perryg
Why yes it does now that I opened my eyes. Have you tried to increase it a little and see if it fails?
Other than that I don't know what would be causing your issue. As far as VirtualBox is concerned it does not see an issue so this would indicate a guest issue more than likely.

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 19:06
by DragMZ
Yes sure I'll try it. Thanks for your help :)

I'm getting some extra details in logs when using "virtio-net" network adapter:
00:03:01.984 virtio-net: failed to allocate SG buffer: size=69 rc=VERR_TRY_AGAIN

BTW - I've tried it with all available adapter types but the problem occurs on all of them.

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 19:16
by DragMZ
It still doesn't work with 512 MB RAM but I've verified it's fine when using a bridged adapter. Anyway it doesn't solve my problem as I need to use NAT...

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 19:23
by Perryg
I don't know what to tell you. You can post a ticket at bugtracker as see what they say.

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 19:39
by DragMZ
Ok sure, I'll try it.

Thanks!

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 20:04
by DragMZ
Looks I have found a workaround for the problem:

Code: Select all

VBoxManage modifyvm "VM name" --natdnsproxy1 on
no more timeouts with the DNS proxy turned on :)

Re: Problem with DNS lookups (NAT)

Posted: 4. Feb 2012, 20:10
by Perryg
Ah yes. I remember now. This used to be a real issue, but I thought that had been fixed a long time ago. Good for you.