Hi all,
I am running JBOSS 4.0.1 on Windows. I have a client code within Jboss that 
connects to the same jboss server URL (this is part of CAS authentication).
All is well when Jboss starts up initially. But if I leave my Jboss server 
running overnight and try accessing it after a period of inactivity, I get a 
connection refused exception during socket connect. The server responds with 
the same URL from the browser window. My code snippet and exception log are 
given below.

I really appretiate your help on this ! Thanks !!

/************* CODE ***************/
URL u = new URL(url);
if (!u.getProtocol().equals("https"))
throw new IOException("only 'https' URLs are valid for this method");
URLConnection uc = u.openConnection();
uc.setRequestProperty("Connection", "close");
r = new BufferedReader(new InputStreamReader(uc.getInputStream()));

-------> The getInputStream() is from where the exception is thrown !!!

/*************** EXCEPTION LOGS *************/
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.doConnect(DashoA6275)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.protocol.https.HttpsClient.(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
at 
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.plainConnect(DashoA6275)
at 
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:617)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(DashoA6275)
at edu.yale.its.tp.cas.util.SecureURL.retrieve(Unknown Source)


Thanks,
K

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875472#3875472

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875472


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to