You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by David Laube <da...@stormpath.com> on 2014/02/03 21:13:58 UTC
Activemq 5.8.0 - SSL networkConnector fails with certificate_unknown but HTTPs works?
Hi All,
We have run into an interesting issue while attempting to connect two ActiveMQ clusters over SSL and/or NIO+SSL. We receive "certificate_unknown" exceptions when attempting to use SSL or NIO+SSL, but not when using HTTPs. Preferably, we would like to use the former. For the sake of this example, I have only included the config/log results of testing with SSL and HTTPs. I have reviewed the docs at both http://activemq.apache.org/certificateunknown.html and http://activemq.apache.org/how-do-i-use-ssl.html making certain that the certificate that exists on the public AMQ cluster (Cluster A) has been imported into both the trustStore AND keysStore on the private AMQ cluster (Cluster B) for good measure. We have also imported the certificate that exists on the private AMQ cluster (Cluster A) into both the trustStore AND the keyStore on the public AMQ cluster (Cluster A). I am including two non-working configs (defining SSL as the protocol for the networkConnector) and one working config which utilizes HTTPS as the protocol. Any suggestions or insight as to what we may be doing wrong would be greatly appreciated!
PROBLEM CONFIG #1:
Cluster-A "public broker" at 10.x.x.189 config:
<networkConnector name="staging-amq-broker-public-1" duplex="true" uri="masterslave:(ssl://10.x.x.119:61617,ssl://10.x.x.229:61617)?randomize=false&timeout=15000"
userName="public.gateway" password="${public.gateway.password}">
Cluster-B "private broker" at 10.x.x.119 logs:
2014-01-31 00:21:02,399 | ERROR | Could not accept connection from tcp://10.x.x.189:51015: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown | org.apache.activemq.broker.TransportConnector | ActiveMQ BrokerService[staging-amq-broker-private-1] Task-17
javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1748)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:991)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1175)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:657)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:108)
at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:115)
at java.io.DataOutputStream.flush(DataOutputStream.java:123)
at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:176)
at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:322)
at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:304)
at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:168)
at org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:84)
at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:74)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
at org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:988)
at org.apache.activemq.broker.TransportConnector$1$1.run(TransportConnector.java:215)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
=========================================
PROBLEM CONFIG #2 (using FQDN):
Cluster-A "public broker" at 10.x.x.189 config:
<networkConnector name="staging-amq-broker-public-1" duplex="true" uri="masterslave:(ssl://staging-master-prviate.mydomain.com:61617,ssl://staging-slave-private.mydomain.com:61617)?randomize=false&timeout=15000"
userName="public.gateway" password="${public.gateway.password}">
Cluster-B "private broker" at 10.x.x.119/staging-master-prviate.mydomain.com logs:
2014-02-03 19:33:11,221 | WARN | Transport Connection to: tcp://10.x.x.189:36648 failed: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: ssl:///10.x.x.189:36648
2014-02-03 19:33:11,224 | ERROR | Could not accept connection from tcp://10.x.x.189:36648: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown | org.apache.activemq.broker.TransportConnector | ActiveMQ BrokerService[staging-amq-broker-private-1] Task-5
2014-02-03 19:33:11,378 | WARN | Transport Connection to: tcp://10.x.x.189:36651 failed: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: ssl:///10.x.x.189:36651
2014-02-03 19:33:11,379 | ERROR | Could not accept connection from tcp://10.x.x.189:36651: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown | org.apache.activemq.broker.TransportConnector | ActiveMQ BrokerService[staging-amq-broker-private-1] Task-5
=========================================
WORKING config:
Cluster-A "public broker" at 10.x.x.189 config:
<networkConnector name="staging-amq-broker-public-1" duplex="true" uri="masterslave:(https://staging-master-prviate.mydomain.com:443,https://staging-slave-private.mydomain.com:443)?randomize=false&timeout=15000"
userName="public.gateway" password="${public.gateway.password}">
Cluster-B "private broker" at 10.x.x.119 logs:
2014-02-03 19:28:54,388 | INFO | Connector vm://staging-amq-broker-private-1 Started | org.apache.activemq.broker.TransportConnector | qtp472942585-55
2014-02-03 19:28:54,419 | INFO | Started responder end of duplex bridge staging-amq-broker-public-1@ID:ip-10-x-x-189-52867-1391455827816-0:1 | org.apache.activemq.broker.TransportConnection | qtp472942585-55
2014-02-03 19:28:54,489 | INFO | Network connection between vm://staging-amq-broker-private-1#0 and org.apache.activemq.transport.http.BlockingQueueTransport@6ff0ccc2(staging-amq-broker-public-1) has been established. | org.apache.activemq.network.DemandForwardingBridgeSupport | triggerStartAsyncNetworkBridgeCreation: remoteBroker=org.apache.activemq.transport.http.BlockingQueueTransport@6ff0ccc2, localBroker= vm://staging-amq-broker-private-1#0
Best regards,
-David Laube
Re: Activemq 5.8.0 - SSL networkConnector fails with
certificate_unknown but HTTPs works?
Posted by artnaseef <ar...@artnaseef.com>.
That's awesome. I need to remember that link.
Sent from my iPhone
> On Feb 3, 2014, at 6:16 PM, "Noel OConnor [via ActiveMQ]" <ml...@n4.nabble.com> wrote:
>
> Try turning on SSL debugging as well...
>
> http://docs.oracle.com/javase/1.5.0/docs/guide/security/jsse/ReadDebug.html
>
>
> On Tue, Feb 4, 2014 at 11:58 AM, artnaseef <[hidden email]> wrote:
>
> > What does the TransportConnector configuration look like?
> >
> > The error, if I'm reading it right, is from the Broker accepting the
> > connection. The broker is not rejecting its own certificate, so I suspect
> > that client-side certificates are required. If that's the case, make sure
> > the CA signing the client-side certificates is in the server's trust store.
> >
> > Perhaps the HTTPS is working because it's not requiring client-side
> > certificates?
> >
> >
> >
> >
> > --
> > View this message in context:
> > http://activemq.2283324.n4.nabble.com/Activemq-5-8-0-SSL-networkConnector-fails-with-certificate-unknown-but-HTTPs-works-tp4677342p4677357.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://activemq.2283324.n4.nabble.com/Activemq-5-8-0-SSL-networkConnector-fails-with-certificate-unknown-but-HTTPs-works-tp4677342p4677358.html
> To start a new topic under ActiveMQ - User, email ml-node+s2283324n2341805h3@n4.nabble.com
> To unsubscribe from ActiveMQ - User, click here.
> NAML
--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-8-0-SSL-networkConnector-fails-with-certificate-unknown-but-HTTPs-works-tp4677342p4677369.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Activemq 5.8.0 - SSL networkConnector fails with
certificate_unknown but HTTPs works?
Posted by Noel OConnor <no...@gmail.com>.
Try turning on SSL debugging as well...
http://docs.oracle.com/javase/1.5.0/docs/guide/security/jsse/ReadDebug.html
On Tue, Feb 4, 2014 at 11:58 AM, artnaseef <ar...@artnaseef.com> wrote:
> What does the TransportConnector configuration look like?
>
> The error, if I'm reading it right, is from the Broker accepting the
> connection. The broker is not rejecting its own certificate, so I suspect
> that client-side certificates are required. If that's the case, make sure
> the CA signing the client-side certificates is in the server's trust store.
>
> Perhaps the HTTPS is working because it's not requiring client-side
> certificates?
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Activemq-5-8-0-SSL-networkConnector-fails-with-certificate-unknown-but-HTTPs-works-tp4677342p4677357.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Re: Activemq 5.8.0 - SSL networkConnector fails with
certificate_unknown but HTTPs works?
Posted by artnaseef <ar...@artnaseef.com>.
What does the TransportConnector configuration look like?
The error, if I'm reading it right, is from the Broker accepting the
connection. The broker is not rejecting its own certificate, so I suspect
that client-side certificates are required. If that's the case, make sure
the CA signing the client-side certificates is in the server's trust store.
Perhaps the HTTPS is working because it's not requiring client-side
certificates?
--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-5-8-0-SSL-networkConnector-fails-with-certificate-unknown-but-HTTPs-works-tp4677342p4677357.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.