Trouble getting DNS to work
Chas. Owens
chas.owens at gmail.com
Sat Nov 29 07:19:39 UTC 2008
I have two machines 10.2.4.3 (client) and 10.2.4.4 (server).
Eventually there will be a squid proxy between them, but I wanted to
get a working setup first. Both are Ubuntu 8.10 and have Web
Polygraph 3.1.5. 10.2.4.3 also has Bind 9 installed. I was able to
get simple.pg working between the two machines, so I started modifying
it to add the DNS functionality I will need. I have run into a brick
wall. I can query the DNS server and get answers back, but when I run
the test it spits back
000.00| Connection.cc:492: error: 1/1 (s111) Connection refused
000.00| error: raw write after connect failed
000.00| connection between 10.2.4.3:39591 and 10.2.4.4 failed at 0
reads, 0 writes, and 1 xacts
000.00| Connection.cc:492: error: 2/2 (s111) Connection refused
000.00| error: raw write after connect failed
000.00| connection between 10.2.4.3:60757 and 10.2.4.4 failed at 0
reads, 0 writes, and 1 xacts
000.00| Connection.cc:492: error: 4/4 (s111) Connection refused
000.00| error: raw write after connect failed
000.00| connection between 10.2.4.3:34961 and 10.2.4.4 failed at 0
reads, 0 writes, and 1 xacts
and so on. When I say
dig @10.2.4.3 www.foo.com a
I get the expected
; <<>> DiG 9.5.0-P2 <<>> @10.2.4.3 www.foo.com a
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63922
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;www.foo.com. IN A
;; ANSWER SECTION:
www.foo.com. 3600 IN A 10.2.4.4
;; AUTHORITY SECTION:
foo.com. 3600 IN NS ns.foo.com.
;; ADDITIONAL SECTION:
ns.foo.com. 3600 IN A 172.16.101.100
;; Query time: 0 msec
;; SERVER: 10.2.4.3#53(10.2.4.3)
;; WHEN: Sat Nov 29 02:12:46 2008
;; MSG SIZE rcvd: 78
I am running
sudo polysrv --config simple.pg
on 10.2.4.4 and
polyclt --config simple.pg -verb_lvl 10
on 10.2.4.3
my simple.pg file is
AddrMap foo = {
zone = "foo.com";
addresses = [ '10.2.4.4:80' ];
names = [ 'www.foo.com' ];
};
use(foo);
DnsResolver dr = {
servers = [ '10.2.4.3:53' ];
timeout = 5sec;
};
// SimpleContent defines properties of content that the server generates;
// if you get no hits, set SimpleContent.obj_life_cycle to cntStatic, which
// is defined in workloads/include/contents.pg
Content SimpleContent = {
size = exp(13KB); // response sizes distributed exponentially
cachable = 80%; // 20% of content is uncachable
};
// a primitive server cleverly labeled "S101"
// normally, you would specify more properties,
// but we will mostly rely on defaults for now
Server S = {
kind = "S101";
contents = [ SimpleContent ];
direct_access = contents;
addresses = ['10.2.4.4:80' ]; // where to create these server agents
};
// a primitive robot
Robot R = {
kind = "R101";
pop_model = { pop_distr = popUnif(); };
recurrence = 55% / SimpleContent.cachable; // adjusted to get 55% DHR
origins = ['www.foo.com']; // where the origin servers are
addresses = ['10.2.4.3' ]; // where these robot agents will be created
dns_resolver = dr;
};
// commit to using these servers and robots
use(S, R);
--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
More information about the Users
mailing list