java.net.ConnectException: Verbindungsaufbau abgelehnt

C

CptAmerica

Verwende Tomcat 4.0.3 und IBMJava2-131

Ich versuche aus einem Java-Servlet per HttpURLConnection eine
WHOIS-Abfrage für .INFO Domains zu machen.
Das hat bis jetzt immer funktioniert doch plötzlich erhalten ich unten
angehängte Fehlermeldung.
Der Aufbau der Connection sieht wie folgt aus:

strUrl= "http://www.nic.info/cgi-bin/whois.cgi?whois_query_field=";
strFreiText= "The domain name you searched for is not in the
registry";
try
{
java.net.URL newUrl= new URL(strUrl + domain);

aHTTPUrl= (HttpURLConnection) newUrl.openConnection();
//aHTTPUrl.setRequestMethod("GET");
aHTTPUrl.connect();
}
catch (Exception e)
{
if (logCat.isEnabledFor(Priority.ERROR))
logCat.log(Priority.ERROR, "Fehler bei Domain-Abfrage: " + e + "
Link:" + strUrl + domain, e);
throw new HandlerException("Fehler bei Domain-Abfrage: " + e + "
Link:" + strUrl + domain);
}

Kann mir nicht erklären warum es jetzt nicht mehr funktioniert. Bei
dem Server oder Firewall gab es keine Umstellung. Zusätzlich kommt
noch hinzu, das die Abfrage bei .AT Domains korrekt funktioniert.

Hat da jemand einen Rat?
Danke
CptAmerica

Fehlermeldung:

java.net.ConnectException: Verbindungsaufbau abgelehnt
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java(Compiled
Code))
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java(Compiled
Code))
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java(Compiled
Code))
at java.net.Socket.<init>(Socket.java(Compiled Code))
at java.net.Socket.<init>(Socket.java(Compiled Code))
at sun.net.NetworkClient.doConnect(NetworkClient.java:65)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:356)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:543)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:291)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:301)
at sun.net.www.http.HttpClient.New(HttpClient.java:313)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:429)
at net.net4you.domain.SRV_Check.pruefeDomain(SRV_Check.java:2764)
at net.net4you.domain.SRV_Check.handle(SRV_Check.java:413)
at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:269)
at org.webmacro.servlet.WMServlet.doGet(WMServlet.java:202)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java(Compiled
Code))
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java(Compiled
Code))
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compiled
Code))
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compiled
Code))
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java(Compiled
Code))
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java(Compiled
Code))
at java.lang.Thread.run(Thread.java:512)
 
M

Mark Scott

On Wed, 13 Aug 2003 07:52:08 -0700, CptAmerica wrote:

[...]
Ich versuche aus einem Java-Servlet per HttpURLConnection eine
WHOIS-Abfrage für .INFO Domains zu machen.
Das hat bis jetzt immer funktioniert doch plötzlich erhalten ich unten
angehängte Fehlermeldung.

[I'm trying to make a WHOIS query for .info domains with an
HttpURLConnection from a Java servlet. It's always worked up to now but
suddenly I keep getting the error message attached below.]

[...]
java.net.ConnectException: Verbindungsaufbau abgelehnt

[java.net.ConnectException: Connection refused]

Es scheint mir, daß www.nic.info nicht erreichbar auf TCP/80 war.

[It seems to me that www.nic.info wasn't reachable on TCP/80.]
 
C

CptAmerica

Mark Scott said:
On Wed, 13 Aug 2003 07:52:08 -0700, CptAmerica wrote:

[...]
Ich versuche aus einem Java-Servlet per HttpURLConnection eine
WHOIS-Abfrage für .INFO Domains zu machen.
Das hat bis jetzt immer funktioniert doch plötzlich erhalten ich unten
angehängte Fehlermeldung.

[I'm trying to make a WHOIS query for .info domains with an
HttpURLConnection from a Java servlet. It's always worked up to now but
suddenly I keep getting the error message attached below.]

[...]
java.net.ConnectException: Verbindungsaufbau abgelehnt

[java.net.ConnectException: Connection refused]

Es scheint mir, daß www.nic.info nicht erreichbar auf TCP/80 war.

[It seems to me that www.nic.info wasn't reachable on TCP/80.]


Hallo Mark!

Thank you for the Translation :)

OK, in fact this was a problem yesterday. But i checked out the
whois-query with Mozilla several times. They worked fine. Then i used
the Java-Servlet and again the same problem.
But i have another clue.
The Jav-VM caches DNS-Lookups, so it may be, the www.nic.info changed
the IP and therefore the servlet is asking the wrong IP all time long.
Unfortunately im working on an productive server, so i´ve to wait for
an idle-time to restart Tomcat an Java maybe this helps

CptAmerica
 
C

CptAmerica

Mark Scott said:
On Wed, 13 Aug 2003 07:52:08 -0700, CptAmerica wrote:

[...]
Ich versuche aus einem Java-Servlet per HttpURLConnection eine
WHOIS-Abfrage für .INFO Domains zu machen.
Das hat bis jetzt immer funktioniert doch plötzlich erhalten ich unten
angehängte Fehlermeldung.

[I'm trying to make a WHOIS query for .info domains with an
HttpURLConnection from a Java servlet. It's always worked up to now but
suddenly I keep getting the error message attached below.]

[...]
java.net.ConnectException: Verbindungsaufbau abgelehnt

[java.net.ConnectException: Connection refused]

Es scheint mir, daß www.nic.info nicht erreichbar auf TCP/80 war.

[It seems to me that www.nic.info wasn't reachable on TCP/80.]


Hallo Mark!

Thank you for the Translation :)

OK, in fact this was a problem yesterday. But i checked out the
whois-query with Mozilla several times. They worked fine. Then i used
the Java-Servlet and again the same problem.
But i have another clue.
The Jav-VM caches DNS-Lookups, so it may be, the www.nic.info changed
the IP and therefore the servlet is asking the wrong IP all time long.
Unfortunately im working on an productive server, so i´ve to wait for
an idle-time to restart Tomcat an Java maybe this helps

CptAmerica



Hallo Folks!

Ok i found the ERROR. The Problem was, that the JAVA-VM chached the
WHOIS Data. Due to an IP change of the desired URL, the Servlet always
wanted to connect to the "old" Server-IP therefore i got an
ConnectException.
I simply restarted the Java-VM and the Servlet works fine right now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top