[plt-scheme] dns-find-nameserver complains "input in flex scanner failed" (but works anyway)

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Mar 14 19:01:00 EDT 2010

On Mar 14, Greg Hendershott wrote:
> With DrScheme, version 4.2.3 [3m], Language: Module.
>  (require net/dns)
>  (dns-find-nameserver)
> Gives the output:
> "input in flex scanner failed" (red italics)
> <blank line>
> "d.d.d.d" (a valid IP address for the name server)
> In other words it gives this error message, but dns-find-nameserver
> and the other net/dns functions that a nameserver seem to work fine
> anyway.
> This is on Windows 7 64 bit. No such error message on OSX 10.6.
> What feels like a dumb question:
> What exactly is this red italic text? It doesn't seem to be from
> (error) because execution continues past it. It doesn't seem to be an
> exception because I tried catching it. What is it?

Any output to standard error is colored like that by drscheme.
Looking at the code, it simply runs "nslookup.exe" -- so it might be
some problem with the windows nslookup.  My guess is that running

  nslookup.exe < NUL

will show that error but still write the correct address, and to test
that the error is printed on stderr,

  nslookup.exe < NUL > NUL

would show just the error.

FWIW, on XP it just prints out the expected text with no error.  I
tried to find some documentation on how to use nslookup on windows and
found nothing.  ("help nslookup" doesn't work, "nslookup /?" or
"nslookup /help" doesn't work, the MS web page that I found --
http://technet.microsoft.com/en-us/library/bb490950.aspx didn't have
anything that worked -- it mentioned some subcommands but nothing that
I tried worked.)

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.