From: Ian K. <spi...@gm...> - 2005-11-29 09:44:30
|
I've been trying to use org.xbill.DNS.Update (using various permutations, with/without TSIG, TCP, etc) with 2.0.0 and I just get silent failure (I got NullPointerExceptions with 1.6.6, so maybe that's a a step up :). The BIND installation is the one that comes with Mac OS 10.4 (Tiger), I have a zone "rbl" that is configured to accept updates from localhost (also tried with a TSIG key). My test does a query (expecting there to be no record), does an update and then runs the query again. Running BIND with logging set to "dynamic", I get the following: Nov 28 23:50:24.733 zone_timer: zone authors.bind/CH: enter Nov 28 23:50:24.733 zone_maintenance: zone authors.bind/CH: enter Nov 28 23:50:37.926 client 127.0.0.1#61651: UDP request Nov 28 23:50:37.926 client 127.0.0.1#61651: request is not signed Nov 28 23:50:37.926 client 127.0.0.1#61651: recursion available: approved Nov 28 23:50:37.926 client 127.0.0.1#61651: query Nov 28 23:50:37.926 client 127.0.0.1#61651: query '172.16.1.100.deny.rbl/IN' approved Nov 28 23:50:37.927 client 127.0.0.1#61651: send Nov 28 23:50:37.927 client 127.0.0.1#61651: sendto Nov 28 23:50:37.927 client 127.0.0.1#61651: senddone Nov 28 23:50:37.927 client 127.0.0.1#61651: next Nov 28 23:50:37.927 client 127.0.0.1#61651: endrequest Nov 28 23:50:37.927 client @0x1811600: udprecv Nov 28 23:50:38.256 client 127.0.0.1#63706: new TCP connection Nov 28 23:50:38.257 client 127.0.0.1#63706: replace Nov 28 23:50:38.257 clientmgr @0x401760: createclients Nov 28 23:50:38.257 clientmgr @0x401760: create new Nov 28 23:50:38.257 client @0x1810c00: create Nov 28 23:50:38.257 client 127.0.0.1#63706: read Nov 28 23:50:38.257 client @0x1810c00: accept Nov 28 23:50:38.273 client 127.0.0.1#63706: TCP request Nov 28 23:50:38.273 client 127.0.0.1#63706: error Nov 28 23:50:38.273 client 127.0.0.1#63706: send Nov 28 23:50:38.273 client 127.0.0.1#63706: sendto Nov 28 23:50:38.273 client 127.0.0.1#63706: senddone Nov 28 23:50:38.274 client 127.0.0.1#63706: next Nov 28 23:50:38.274 client 127.0.0.1#63706: endrequest Nov 28 23:50:38.274 client 127.0.0.1#63706: read Nov 28 23:50:38.282 client 127.0.0.1#63706: next Nov 28 23:50:38.282 client 127.0.0.1#63706: request failed: end of file Nov 28 23:50:38.282 client 127.0.0.1#63706: endrequest Nov 28 23:50:38.282 client 127.0.0.1#63706: closetcp Nov 28 23:50:38.288 client 127.0.0.1#61653: UDP request Nov 28 23:50:38.288 client 127.0.0.1#61653: request is not signed Nov 28 23:50:38.288 client 127.0.0.1#61653: recursion available: approved Nov 28 23:50:38.288 client 127.0.0.1#61653: query Nov 28 23:50:38.288 client 127.0.0.1#61653: query '172.16.1.100.deny.rbl/IN' approved Nov 28 23:50:38.288 client 127.0.0.1#61653: send Nov 28 23:50:38.288 client 127.0.0.1#61653: sendto Nov 28 23:50:38.288 client 127.0.0.1#61653: senddone Any idea what the "request failed: end of file" means and how to deal with this? The dynamic update example at http://www.xbill.org/dnsjava/examples.html didn't work. The update.java in the distribution... it's not clear how to use it and anyway, it's pretty complicated; I just need to send single short TTL updates to a BIND server. Any pointers to working code that uses org.xbill.DNS.Update would be appreciated. thx, -Ian |
From: Brian W. <bwe...@no...> - 2005-11-29 10:02:33
|
On Tue, 29 Nov 2005, Ian Kallen wrote: > I've been trying to use org.xbill.DNS.Update (using various > permutations, with/without TSIG, TCP, etc) with 2.0.0 and I just get > silent failure (I got NullPointerExceptions with 1.6.6, so maybe > that's a a step up :). > The BIND installation is the one that comes with Mac OS 10.4 (Tiger), > I have a zone "rbl" that is configured to accept updates from > localhost (also tried with a TSIG key). > > My test does a query (expecting there to be no record), does an update > and then runs the query again. Running BIND with logging set to > "dynamic", I get the following: Unfortunately, BIND's logging is verbose but not useful. > Any idea what the "request failed: end of file" means and how to deal > with this? No clue. > The dynamic update example at > http://www.xbill.org/dnsjava/examples.html didn't work. The > update.java in the distribution... it's not clear how to use it and > anyway, it's pretty complicated; I just need to send single short TTL > updates to a BIND server. Any pointers to working code that uses > org.xbill.DNS.Update would be appreciated. Other than a minor typo (should be args[0] instead of args[1]), the update example works for me, assuming the server is properly configured with the zone and TSIG key in the program. I'm not sure what's confusing about the update program. It has pretty complete help for all of the commands, and the usage to add a single record would be something like: > server <ip address of server> > zone <zone name> > add <name> <ttl> <type> <data> > send or, as an example: > server 127.0.0.1 > zone example > add foo 3600 A 1.2.3.4 > send If you fix the one character typo in the example, it is working code. Brian |
From: Ian K. <spi...@gm...> - 2005-11-30 18:56:17
|
OK, thanks for the usage example with update, that helped. I have code now that runs and passes its tests. A peculiar thing seems evident from my experience with this, the dnsjava 2.0.0 classes appear to be sensitive to how the classes are loaded. I found this when the simplest thing worked in a command line class (in public static void main), worked from the command line invoked by a JUnit TestCase but failed with NullPointerExceptions when the same TestCase was run by the the maven (v1.0.2) build system I had. A typical stacktrace would look like this: [junit] java.lang.NullPointerException [junit] at org.xbill.DNS.Record.getTypedObject(Record.java:64) [junit] at org.xbill.DNS.Record.getEmptyRecord(Record.java:87) [junit] at org.xbill.DNS.Record.fromString(Record.java:503) [junit] at org.xbill.DNS.Record.fromString(Record.java:527) [junit] at org.xbill.DNS.Update.add(Update.java:136) [junit] at org.xbill.DNS.Update.replace(Update.java:253) Anway, I worked around it by throwing together an ant build system for my project and everything worked. Weird. -Ian On 11/29/05, Brian Wellington <bwe...@no...> wrote: > On Tue, 29 Nov 2005, Ian Kallen wrote: > > > I've been trying to use org.xbill.DNS.Update (using various > > permutations, with/without TSIG, TCP, etc) with 2.0.0 and I just get > > silent failure (I got NullPointerExceptions with 1.6.6, so maybe > > that's a a step up :). > > The BIND installation is the one that comes with Mac OS 10.4 (Tiger), > > I have a zone "rbl" that is configured to accept updates from > > localhost (also tried with a TSIG key). > > > > My test does a query (expecting there to be no record), does an update > > and then runs the query again. Running BIND with logging set to > > "dynamic", I get the following: > > Unfortunately, BIND's logging is verbose but not useful. > > > Any idea what the "request failed: end of file" means and how to deal > > with this? > > No clue. > > > The dynamic update example at > > http://www.xbill.org/dnsjava/examples.html didn't work. The > > update.java in the distribution... it's not clear how to use it and > > anyway, it's pretty complicated; I just need to send single short TTL > > updates to a BIND server. Any pointers to working code that uses > > org.xbill.DNS.Update would be appreciated. > > Other than a minor typo (should be args[0] instead of args[1]), the updat= e > example works for me, assuming the server is properly configured with the > zone and TSIG key in the program. > > I'm not sure what's confusing about the update program. It has pretty > complete help for all of the commands, and the usage to add a single > record would be something like: > > > server <ip address of server> > > zone <zone name> > > add <name> <ttl> <type> <data> > > send > > or, as an example: > > > server 127.0.0.1 > > zone example > > add foo 3600 A 1.2.3.4 > > send > > If you fix the one character typo in the example, it is working code. > > Brian > |
From: Brian W. <bwe...@xb...> - 2005-11-30 19:02:29
|
On Wed, 30 Nov 2005, Ian Kallen wrote: > OK, thanks for the usage example with update, that helped. I have code > now that runs and passes its tests. A peculiar thing seems evident > from my experience with this, the dnsjava 2.0.0 classes appear to be > sensitive to how the classes are loaded. I found this when the > simplest thing worked in a command line class (in public static void > main), worked from the command line invoked by a JUnit TestCase but > failed with NullPointerExceptions when the same TestCase was run by > the the maven (v1.0.2) build system I had. A typical stacktrace would > look like this: > > [junit] java.lang.NullPointerException > [junit] at org.xbill.DNS.Record.getTypedObject(Record.java:64) > [junit] at org.xbill.DNS.Record.getEmptyRecord(Record.java:87) > [junit] at org.xbill.DNS.Record.fromString(Record.java:503) > [junit] at org.xbill.DNS.Record.fromString(Record.java:527) > [junit] at org.xbill.DNS.Update.add(Update.java:136) > [junit] at org.xbill.DNS.Update.replace(Update.java:253) > > Anway, I worked around it by throwing together an ant build system for > my project and everything worked. Weird. There have definitely been some problems relating to class loading, and I think they should all be solved in 2.0.1 when it's released. Brian |
From: Praveen T. <pra...@gm...> - 2005-11-30 19:15:41
|
On 11/30/05, Brian Wellington <bwe...@xb...> wrote: > > On Wed, 30 Nov 2005, Ian Kallen wrote: > > > OK, thanks for the usage example with update, that helped. I have code > > now that runs and passes its tests. A peculiar thing seems evident > > from my experience with this, the dnsjava 2.0.0 classes appear to be > > sensitive to how the classes are loaded. I found this when the > > simplest thing worked in a command line class (in public static void > > main), worked from the command line invoked by a JUnit TestCase but > > failed with NullPointerExceptions when the same TestCase was run by > > the the maven (v1.0.2) build system I had. A typical stacktrace would > > look like this: > > > > [junit] java.lang.NullPointerException > > [junit] at org.xbill.DNS.Record.getTypedObject(Record.java:64) > > [junit] at org.xbill.DNS.Record.getEmptyRecord(Record.java:87) > > [junit] at org.xbill.DNS.Record.fromString(Record.java:503) > > [junit] at org.xbill.DNS.Record.fromString(Record.java:527) > > [junit] at org.xbill.DNS.Update.add(Update.java:136) > > [junit] at org.xbill.DNS.Update.replace(Update.java:253) > > > > Anway, I worked around it by throwing together an ant build system for > > my project and everything worked. Weird. > > There have definitely been some problems relating to class loading, and I > think they should all be solved in 2.0.1 when it's released. Is 2.0.1a considered a proper release? What does the 'a' mean? -Praveen Brian > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > dnsjava-users mailing list > dns...@li... > https://lists.sourceforge.net/lists/listinfo/dnsjava-users > |
From: Brian W. <bwe...@xb...> - 2005-11-30 19:19:21
|
On Wed, 30 Nov 2005, Praveen Tammana wrote: > Is 2.0.1a considered a proper release? What does the 'a' mean? 'alpha'. It was basically a snapshot release for someone to test. I'm going to go ahead and do the real 2.0.1 release now. Brian |