<div dir="ltr">You didn't show your wiring, but clearly you can see from the stack trace that the Spring factory is delegating to the rabbit client factory, and it's using SSL...<div><br></div><div><div><font face="courier new, monospace">Caused by: java.net.ConnectException: Connection refused: connect</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>at java.net.PlainSocketImpl.socketConnect(Native Method)</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">  </span>at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">    </span>at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">     </span>at java.net.Socket.connect(Socket.java:529)</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>at com.sun.net.ssl.internal.ssl<font color="#ff0000">.SSLSocketImpl</font>.connect(SSLSocketImpl.java:564)</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">  </span>at com.rabbitmq.client.ConnectionFactory.createFrameHandler(ConnectionFactory.java:445)</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:504)</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:545)</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:181)</font></div>
</div><div><br></div><div>... so there must be something wrong with your configuration.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 11:41 AM, PATAR, SAGAR <span dir="ltr"><<a href="mailto:sp345s@att.com" target="_blank">sp345s@att.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks Gary ..<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I tried as you suggested below by wiring my CF to the spring …It still doesn’t work ..<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I was able to get it working with a simple java but not through spring …<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Pl. find the log and the context file attached ..<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Appreciate all the help..<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Sagar<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> rabbitmq-discuss [mailto:<a href="mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com" target="_blank">rabbitmq-discuss-bounces@lists.rabbitmq.com</a>]
<b>On Behalf Of </b>Gary Russell<br>
<b>Sent:</b> Friday, December 06, 2013 1:30 PM<br>
<b>To:</b> Discussions about RabbitMQ<br>
<b>Subject:</b> Re: [rabbitmq-discuss] SSL Client using spring<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Wire up your rabbit connection factory as you wish, and then provide a reference to it to the spring connection factory...<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New""><rabbit:connection-factory id="connectionFactory" connection-factory="rabbitFactory" ... /></span><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Dec 6, 2013 at 1:22 PM, PATAR, SAGAR <<a href="mailto:sp345s@att.com" target="_blank">sp345s@att.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">I don’t see any option to use SSL and pass the cert / keystore using spring amqp … Can you pl. help me with some examples …
<u></u><u></u></p>
<p class="MsoNormal">I was able to get it working using a simple java class ..but cant see options with spring amqp<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Sagar<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br></div>