SslSocketConnector initialization loops forever

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SslSocketConnector initialization loops forever

wsharten
During initialization, Jetty's SslSocketConnector goes into an infinite loop, apparently while SSL is trying to close something in its Finalizer.

It's not a browser issue; it happens during startup before any browser requests are sent.  The SSL certificates get added ok and SecureRandom() completes, then 'Finalizer' tries to close something and report it, looping forever.

I get this on two separate linux boxes using java versions 1.5.0_14 and 1.5.0_04.

Does anyone have SslSocketConnector working on linux?  What's wrong? Any alternatives that would let me still use Jetty but with SSL?

Here's the program, followed by the output. 

Program:
package uniflow;

import org.mortbay.jetty.Server;
import org.mortbay.jetty.security.SslSocketConnector;

public class JettySSL
{
 public static void main (String[] args)
 {
   try {
    Server server = new Server();

    SslSocketConnector sslConnector =  new SslSocketConnector();
    sslConnector.setPort(443);
    sslConnector.setMaxIdleTime(30000);
    sslConnector.setKeystore("/home/uniflow/keystore");
    sslConnector.setTruststore("/home/uniflow/keystore");
    sslConnector.setPassword("snow1226");
    sslConnector.setKeyPassword("snow1226");
    sslConnector.setTrustPassword("snow1226");
    server.addConnector (sslConnector);

    server.start();
    server.join();
   } catch (Exception e) {e.printStackTrace();}
 }
}

Output:

adding as trusted cert:
 Subject: CN=uniflowlims.com, OU=Domain Control Validated, O=uniflowlims.com
 Issuer:  EMAILADDRESS=[hidden email], CN=Starfield Secure Certification Authority, OU= http://www.starfieldtech.com/repository, O="Starfield Technologies, Inc.", L=Scottsdale, ST=Arizona, C=US
 Algorithm: RSA; Serial number: 0x3e1958
 Valid from Mon Jun 26 16:55:55 CDT 2006 until Thu Jun 26 16:55:55 CDT 2008

adding as trusted cert:
 Subject: OU=Go Daddy Class 2 Certification Authority, O="The Go Daddy Group, Inc.", C=US
 Issuer:  EMAILADDRESS=[hidden email], CN=http://www.valicert.com/, OU=ValiCert Class 2 Policy Validation Authority, O="ValiCert, Inc.", L=ValiCert Validation Network
 Algorithm: RSA; Serial number: 0x10d
 Valid from Tue Jun 29 12:06:20 CDT 2004 until Sat Jun 29 12:06:20 CDT 2024

trigger seeding of SecureRandom
done seeding SecureRandom
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT:  warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT:  warning, description = close_notify
Finalizer, WRITE: TLSv1 Alert, length = 2
...
-----these last 4 lines loop forever, until filehandles run out.  Then I get:
Finalizer, called close()
Finalizer, called closeInternal(true)
Finalizer, SEND TLSv1 ALERT:  warning, description = close_notify
Finalizer, Exception sending alert: java.net.SocketException: Too many open files
...
-----These loop forever until memory runs out.

Thanks.

Bill



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support