[rabbitmq-discuss] ssl - Received fatal alert

mahi e mahi.rabbitmq at gmail.com
Thu Sep 12 03:17:33 BST 2013


i tried to execute ssl program ( http://www.rabbitmq.com/ssl.html)
connecting without validating certificate

public class SslCertificate
{
    public static void main(String[] args) throws Exception
    {

        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost("localhost");
        factory.setPort(5671);

        factory.useSslProtocol();
        // Tells the library to setup the default Key and Trust managers
for you
        // which do not do any form of remote server trust verification

        Connection conn = factory.newConnection();
        Channel channel = conn.createChannel();

        //non-durable, exclusive, auto-delete queue
        channel.queueDeclare("rabbitmq-java-test", false, true, true, null);
        channel.basicPublish("", "rabbitmq-java-test", null, "Hello,
World".getBytes());


        GetResponse chResponse = channel.basicGet("rabbitmq-java-test",
false);
        if(chResponse == null) {
            System.out.println("No message retrieved");
        } else {
            byte[] body = chResponse.getBody();
            System.out.println("Recieved: " + new String(body));
        }


        channel.close();
        conn.close();
    }
}


*Getting error*

Exception in thread "main" javax.net.ssl.SSLException: Received fatal
alert: internal_error
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)




*logs*

=ERROR REPORT==== 11-Sep-2013::22:15:52 ===
SSL: hello: ssl_handshake.erl:265:Fatal error: internal error

=ERROR REPORT==== 11-Sep-2013::22:15:57 ===
error on AMQP connection <0.8954.5>: {ssl_upgrade_error,"internal error"}
(unknown POSIX error)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130911/db033da4/attachment.htm>


More information about the rabbitmq-discuss mailing list