From: Andrew H. <aa...@vo...> - 2003-10-22 23:10:41
|
Great! That's more than enough to go on, and gives me all the information I need to work this out. I think my best bet is simply to log certain key pieces of information; if it happens again I'll (hopefully) have enough info to track down the problem. Thanks for the response, - a. Brian Wellington wrote: >On Mon, 20 Oct 2003, Andrew Houghton wrote: > > > >>Here at VolunteerMatch we use dnsjava (1.3.3) to do some basic semantic >>verification of user email addresses before they're added to our >>system. Users enter an email address for most important site actions, >>and we do logical RFC 2822 checks followed by a simple test along the >>lines of 'does this domain have an MX record? if not, does it have an A >>record?'. >> >>On Sunday, after restarting our servlet engine (Jetty 4.2.12 running on >>RH Linux 7.3, Sun JDK 1.4.0), every record lookup was returning null. >>This has happened once before on a brand new machine, and we chalked it >>up to setup problems (we had some problems in our resolv.conf that >>needed fixing). This time around, though, there weren't any changes in >>the system to cause the problem. For the record, using dig to lookup >>records from a shell worked fine for the same domains that dnsjava was >>failing on. >> >> > >What does Lookup.getErrorString() return for the failed queries? > > > >>My first guess was that dnsjava simply had some problems reading or >>parsing resolv.conf, and thus the initialization step was booched, but >>that doesn't make much sense to me given that on any normal day it >>doesn't have this problem. I'm about to dive into the code to try and >>figure out what's going on, but can anyone offhand give any ideas? Has >>anyone seen this problem? >> >> > >I've never heard of any problems with the resolv.conf parser, but it's >possible. > > > >>And, most importantly, is there a way to force dnsjava to initialize and >>return some sort if a status code? I'm not certain what a status code >>would mean in this case, but ideally I'm looking for some way of finding >>what dnsjava is using as name servers, how it decided on them, and >>whether the initialization process had any problems. >> >> > >Setting the verbose option (-Ddnsjava.options=verbose) will cause the >resolv.conf parser, called from the initialization code, to print a >message for each server it parses (in the FindServer.addServer() method). >There's also the FindServer.servers() static method, which returns the >servers being used (or the FindServer.searchPath() method returning the >domain search list). Setting the verbose option will also cause each >lookup to log a message, so while useful for debugging, it's probably not >something you'd want on all the time. > >I'm not sure how much this helps, but it should tell you if there's a >problem with initialization or something later. > >Brian > > > > |