[rabbitmq-discuss] ssl error on rabbitmq server

Cha eric.cha.read at gmail.com
Tue Apr 12 16:43:38 BST 2011


Hello,

I try to get the ssl working on rabbitmq server (v 2.4.1), we setup the 
ssl stuff per this http://www.rabbitmq.com/ssl.html .  When trying to 
connect to server over ssl using the client code within the ssl.html, 
just keep getting

Exception in thread "main" javax.net.ssl.SSLHandshakeException: Remote 
host closed connection during handshake
     at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:817)
     at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
     at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:632)
     at 
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
     at 
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
     at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
     at java.io.DataOutputStream.flush(DataOutputStream.java:106)
     at 
com.rabbitmq.client.impl.SocketFrameHandler.sendHeader(SocketFrameHandler.java:118)
     at 
com.rabbitmq.client.impl.SocketFrameHandler.sendHeader(SocketFrameHandler.java:131)
     at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:242)
     at 
com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:403)
     at 
com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:423)
     at SSLExampleNoValidation.main(SSLExampleNoValidation.java:20)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
     at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)
     at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
     ... 12 more


The rabbitmq server log has

=INFO REPORT==== 12-Apr-2011::11:29:20 ===
accepted TCP connection on [::]:5671 from 192.168.8.170:56034

=INFO REPORT==== 12-Apr-2011::11:29:20 ===
starting TCP connection <0.4899.0> from 192.168.8.170:56034

=ERROR REPORT==== 12-Apr-2011::11:29:20 ===
SSL: 995: error:{badmatch,[]} [{ssl_connection,init_certificates,4},
                                {ssl_connection,ssl_init,2},
                                {ssl_connection,init,1},
                                {gen_fsm,init_it,6},
                                {proc_lib,init_p_do_apply,3}]


=ERROR REPORT==== 12-Apr-2011::11:29:20 ===
error on TCP connection <0.4899.0>:{ssl_upgrade_error,ecertfile}

=INFO REPORT==== 12-Apr-2011::11:29:20 ===
closing TCP connection <0.4899.0>

The rabbitmq.config has the following

[
   {rabbit, [
      {ssl_listeners, [5671]},
      {ssl_options, [{cacertfile,"/home/test/testca/cacert.pem"},
                     {certfile,"/home/test/server/cert.pem"},
                     {keyfile,"/home/test/server/key.pem"},
                     {verify,verify_peer},
                     {fail_if_no_peer_cert,false}]}
    ]}
].


I use ubuntu 10.10 with Erlang R13B03.

Any ideas?

Thanks,

Cha


More information about the rabbitmq-discuss mailing list