logo       

Re: java.rmi.ConnectIOException: error during JRMP connection establishment: msg#00027

java.sun.rmi

Subject: Re: java.rmi.ConnectIOException: error during JRMP connection establishment;

Yes, im using client autentication, and the problem is there because if i
don´t use client auth my connection is not broken.
Here is the command line that i use to launch my server and my client :


Server:
-Djava.rmi.server.codebase="file:///D:/ProjectName/classes/" -Djavax.net.deb
ug=SSL,handshake,data,trustmanager -Djavax.net.ssl.trustStore=D:\ProjectName
\server.keystore -Djavax.net.ssl.keyStore=D:\ProjectName\server.keystore -D
javax.net.ssl.keyStorePassword=server

... and the Client:
-Djava.rmi.server.codebase="file:///D:/ProjectName/classes/" -Djavax.net.ssl
.trustStore=D:\ProjectName\server.keystore -Djavax.net.ssl.keyStore=D:\Proje
ctName\client.keystore -Djavax.net.ssl.keyStore=D:\ProjectName\server.keysto
re -Djavax.net.ssl.keyStore=D:\ProjectName\client.keystore -Djavax.net.ssl.
keyStorePassword=client -Djava.rmi.server.codebase="file:///D:/ProjectName/c
lasses/" -Djavax.net.debug=SSL,handshake,data,trustmanager



Thanks. César.-

-----Mensaje original-----
De: Peter Jones - JavaSoft East [mailto:jones@xxxxxxxxxxxxxxxxxxxx]
Enviado el: Monday, August 16, 2004 5:24 PM
Para: Cisar Fernando Henriques
CC: RMI-USERS@xxxxxxxxxxxx
Asunto: Re: java.rmi.ConnectIOException: error during JRMP connection
establishment;


> java.rmi.ConnectIOException: error during JRMP connection establishment;
nested exception is:
> java.net.SocketException: Software caused connection abort: recv failed
> at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:274)
> at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
> at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
> at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
> at java.rmi.Naming.lookup(Naming.java:84)
> at mps.test.TestClient.main(TestClient.java:43)
> Caused by: java.net.SocketException: Software caused connection abort:
recv failed
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:129)
> at com.sun.net.ssl.internal.ssl.InputRecord.a(DashoA6275)
> at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
> at com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SunJSSE_az.j(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
> at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
> at java.io.DataOutputStream.flush(DataOutputStream.java:101)
> at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
> ... 5 more

It looks like the registry side is closing the incoming connection
during the SSL handshake attempt.

> RMI TCP Connection(3)-127.0.0.1, WRITE: TLSv1 Handshake, length = 742
> RMI TCP Connection(3)-127.0.0.1, READ: TLSv1 Handshake, length = 141
> *** Certificate chain
> ***
> RMI TCP Connection(3)-127.0.0.1, SEND TLSv1 ALERT: fatal, description =
> bad_certificate
> RMI TCP Connection(3)-127.0.0.1, WRITE: TLSv1 Alert, length = 2
> RMI TCP Connection(3)-127.0.0.1, called closeSocket()
> RMI TCP Connection(3)-127.0.0.1, handling exception:
> javax.net.ssl.SSLHandshakeException: null cert chain
> RMI TCP Connection(3)-127.0.0.1, called close()
> RMI TCP Connection(3)-127.0.0.1, called closeInternal(true)

It seems that you have configured the server-side SSL socket to
require client authentication, but the client-side SSL socket is not
providing any certificates?

It would be helpful to see the command lines that you are using, the
code for the socket factory classes, etc.

[It appears that you are setting the global RMI socket factory (to a
factory that uses JSSE to create SSL sockets) rather than performing a
registry lookup with a custom client socket factory.]

-- Peter
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.738 / Virus Database: 492 - Release Date: 8/16/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.738 / Virus Database: 492 - Release Date: 8/16/2004

===========================================================================
To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
of the message "signoff RMI-USERS". For general help, send email to
listserv@xxxxxxxxxxxx and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise