Good morning!

When I deliberately use a non-existing hostname in order to force the lookup
to fail, the exception is thrown in a method indirectly called by
HttpURLConnection.connect(). This means that the lookup is not done in the
URL class, which in turn means that moving the URL instantiation into the
loop won't help anything.

java.net.UnknownHostException: swww.hannesschmidt.de
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:386)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:602)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:303)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:264)
at sun.net.www.http.HttpClient.New(HttpClient.java:336)
at sun.net.www.http.HttpClient.New(HttpClient.java:317)
at sun.net.www.http.HttpClient.New(HttpClient.java:312)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.j
ava:481)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:4
72)
at UrlWatchdog.main(UrlWatchdog.java:31)

Where do you get your excepetion? My guts is telling me that the lookup
result is cached by the operating system rather than a Java class. On the
other hand, caching a negative result should never be done by anything. So
the behaviour you illustrated is really strange. What platform does your
webapp run on?

----- Original Message -----
From: "Ron Day" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 26, 2003 9:27 AM
Subject: RE: crontab problems


> Do you know which class cache the negative response............
>
> -----Original Message-----
> From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 26, 2003 2:07 AM
> To: Tomcat Users List
> Subject: RE: crontab problems
>
>
> Because the underlying classes sometimes cache a negative
> response, so you have to restart tomcat to enable a new
> lookup. (That's not specific to tomcat)
>
> > -----Original Message-----
> > From: Hannes Schmidt [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, February 26, 2003 3:02 AM
> > To: Tomcat Users List
> > Subject: Re: crontab problems
> >
> > Regarding your problem: I don't understand why bouncing
> > Tomcat would resolve a DNS problem. The UnknownHostException
> > is a indication that something is wrong with DNS or the
> > resolver library.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to