<div dir="ltr">At work I have a script that provisions a vm for use by employees.  One step in this process is to fetch hadoop, which we happen to get from cloudera.  I noticed the script always failed when I used libvirt's default networking (nat) but worked fine when I used user mode networking. My instinct is that this is related to (potentially uncommon) network traffic from the server in question, and the iptables rules added by libvirt. <div>
<br></div><div>Repro steps:<div><br></div><div style>1. Create a vm (I tested with linux and freebsd guests) using default libvirt networking settings (<interface type='network'>).</div><div style>2. wget, curl, fetch: <a href="http://archive.cloudera.com/one-click-install/lucid/cdh3-repository_1.0_all.deb">http://archive.cloudera.com/one-click-install/lucid/cdh3-repository_1.0_all.deb</a></div>
<div style><br></div><div style>Observe it will "hang". If you use strace you'll see it block on the select call.</div><div style><br></div><div style>My particular host is using a virbr0 network bridge, with the following iptables rules:</div>
<div style><br></div><div style><div>$ iptables -S -v -Z</div><div>-P INPUT ACCEPT -c 404828 91071544<br></div><div>-P FORWARD ACCEPT -c 0 0</div><div>-P OUTPUT ACCEPT -c 402905 45139291</div><div>-A INPUT -i virbr0 -p udp -m udp --dport 53 -c 26 1703 -j ACCEPT</div>
<div>-A INPUT -i virbr0 -p tcp -m tcp --dport 53 -c 0 0 -j ACCEPT</div><div>-A INPUT -i virbr0 -p udp -m udp --dport 67 -c 70 22960 -j ACCEPT</div><div>-A INPUT -i virbr0 -p tcp -m tcp --dport 67 -c 0 0 -j ACCEPT</div><div>
-A FORWARD -d <a href="http://192.168.122.0/24">192.168.122.0/24</a> -o virbr0 -m state --state RELATED,ESTABLISHED -c 1191 1495856 -j ACCEPT</div><div>-A FORWARD -s <a href="http://192.168.122.0/24">192.168.122.0/24</a> -i virbr0 -c 853 64266 -j ACCEPT</div>
<div>-A FORWARD -i virbr0 -o virbr0 -c 6 1968 -j ACCEPT</div><div>-A FORWARD -o virbr0 -c 0 0 -j REJECT --reject-with icmp-port-unreachable</div><div>-A FORWARD -i virbr0 -c 0 0 -j REJECT --reject-with icmp-port-unreachable</div>
<div>Zeroing chain `INPUT'</div><div>Zeroing chain `FORWARD'</div><div>Zeroing chain `OUTPUT'</div><div><br></div><div style>I'm not sure how best to diagnose this problem. Any ideas or tips?</div><div style>
<br></div><div style>Thanks!</div><div style><br></div><div style>John M.</div></div></div></div>