You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by harikrish07121991 <ha...@gmail.com> on 2015/03/31 05:22:22 UTC
"Invalid TLS Padding data Error" while trying to connect ActiveMQ
via SSL
Hi,
I am trying to enable SSL in ActiveMQ broker with the following connector
config in activemq.xml
<transportConnectors>
<transportConnector name="openwire"
uri="tcp://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ssl" uri="ssl://0.0.0.0:8883"/>
</transportConnectors>
*But each time when the client tries to connect via port 8883 with client
certificates , an error similar to the one below occurs :
*
2015-03-30 19:00:58,844 | WARN | Transport Connection to:
tcp://10.30.9.254:45849 failed: java.io.IOException: Unknown data type: 77 |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
Transport: ssl:///10.30.9.254:45849
2015-03-30 19:00:58,926 | WARN | Transport Connection to:
tcp://10.30.9.254:45850 failed: javax.net.ssl.SSLHandshakeException: Invalid
TLS padding data | org.apache.activemq.broker.TransportConnection.Transport
| ActiveMQ Transport: ssl:///10.30.9.254:45850
Am pretty much sure that the certificates are well formed.Also am using
apache-activemq-5.11.0 and openssl version 1.0.1.
Kindly help me with the issue am facing .
Thanks
--
View this message in context: http://activemq.2283324.n4.nabble.com/Invalid-TLS-Padding-data-Error-while-trying-to-connect-ActiveMQ-via-SSL-tp4694099.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: "Invalid TLS Padding data Error" while trying to connect
ActiveMQ via SSL
Posted by artnaseef <ar...@artnaseef.com>.
What does the transportConnector configuration look like?
I believe for MQTT and SSL, you need "ssl+mqtt". Or is it "mqtt+ssl"?
--
View this message in context: http://activemq.2283324.n4.nabble.com/Invalid-TLS-Padding-data-Error-while-trying-to-connect-ActiveMQ-via-SSL-tp4694099p4695546.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: "Invalid TLS Padding data Error" while trying to connect
ActiveMQ via SSL
Posted by harikrish07121991 <ha...@gmail.com>.
hai Hadrian,
Thanks for replying. Am using Ubuntu 12.04 with kernel 3.13 . Also the java
version is 1.7.0_72.
I have used the following link for the creation of client and broker certs.
https://github.com/rethab/php-stomp-cert-example/blob/master/README.md
--
View this message in context: http://activemq.2283324.n4.nabble.com/Invalid-TLS-Padding-data-Error-while-trying-to-connect-ActiveMQ-via-SSL-tp4694099p4694185.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: "Invalid TLS Padding data Error" while trying to connect ActiveMQ
via SSL
Posted by Hadrian Zbarcea <hz...@gmail.com>.
Also what kind of keys and algorithms you use may be relevant, jce not
installed, could be many things. At this point there is no clear
indication that the bug is actually in activemq. More details would help.
Best,
Hadrian
On 03/31/2015 09:13 AM, Hadrian Zbarcea wrote:
> Can you please add a few details about the environment (like the OS type
> and version).
>
> Thanks,
> Hadrian
>
>
> On 03/31/2015 08:48 AM, Tim Bain wrote:
>> Based on a few minutes of Googling, the most common cause of that
>> exception
>> seems to be code that doesn't read enough bytes before trying to unwrap
>> (decrypt) the content. If that's what's going on, the log lines you
>> posted
>> clearly indicate that the bug is in ActiveMQ code rather than code you
>> wrote (since it's during the process of interpreting the message's type),
>> so I'd recommend you submit a bug in JIRA.
>>
>> Include the simplest configuration that can reproduce the problem, so
>> that
>> whichever developer takes it on is able to recreate the problem, and if
>> you're getting any stack traces in your logs, include them in the JIRA
>> bug
>> as well.
>> On Mar 30, 2015 9:34 PM, "harikrish07121991"
>> <ha...@gmail.com>
>> wrote:
>>
>>> Hi,
>>> I am trying to enable SSL in ActiveMQ broker with the following
>>> connector
>>> config in activemq.xml
>>> <transportConnectors>
>>>
>>> <transportConnector name="openwire"
>>> uri="tcp://
>>> 0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600
>>>
>>> "/>
>>> <transportConnector name="ssl" uri="ssl://0.0.0.0:8883"/>
>>> </transportConnectors>
>>> *But each time when the client tries to connect via port 8883 with
>>> client
>>> certificates , an error similar to the one below occurs :
>>> *
>>>
>>> 2015-03-30 19:00:58,844 | WARN | Transport Connection to:
>>> tcp://10.30.9.254:45849 failed: java.io.IOException: Unknown data type:
>>> 77 |
>>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>>> Transport: ssl:///10.30.9.254:45849
>>> 2015-03-30 19:00:58,926 | WARN | Transport Connection to:
>>> tcp://10.30.9.254:45850 failed: javax.net.ssl.SSLHandshakeException:
>>> Invalid
>>> TLS padding data |
>>> org.apache.activemq.broker.TransportConnection.Transport
>>> | ActiveMQ Transport: ssl:///10.30.9.254:45850
>>>
>>> Am pretty much sure that the certificates are well formed.Also am using
>>> apache-activemq-5.11.0 and openssl version 1.0.1.
>>>
>>> Kindly help me with the issue am facing .
>>>
>>> Thanks
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://activemq.2283324.n4.nabble.com/Invalid-TLS-Padding-data-Error-while-trying-to-connect-ActiveMQ-via-SSL-tp4694099.html
>>>
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>
Re: "Invalid TLS Padding data Error" while trying to connect ActiveMQ
via SSL
Posted by Hadrian Zbarcea <hz...@gmail.com>.
Can you please add a few details about the environment (like the OS type
and version).
Thanks,
Hadrian
On 03/31/2015 08:48 AM, Tim Bain wrote:
> Based on a few minutes of Googling, the most common cause of that exception
> seems to be code that doesn't read enough bytes before trying to unwrap
> (decrypt) the content. If that's what's going on, the log lines you posted
> clearly indicate that the bug is in ActiveMQ code rather than code you
> wrote (since it's during the process of interpreting the message's type),
> so I'd recommend you submit a bug in JIRA.
>
> Include the simplest configuration that can reproduce the problem, so that
> whichever developer takes it on is able to recreate the problem, and if
> you're getting any stack traces in your logs, include them in the JIRA bug
> as well.
> On Mar 30, 2015 9:34 PM, "harikrish07121991" <ha...@gmail.com>
> wrote:
>
>> Hi,
>> I am trying to enable SSL in ActiveMQ broker with the following connector
>> config in activemq.xml
>> <transportConnectors>
>>
>> <transportConnector name="openwire"
>> uri="tcp://
>> 0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600
>> "/>
>> <transportConnector name="ssl" uri="ssl://0.0.0.0:8883"/>
>> </transportConnectors>
>> *But each time when the client tries to connect via port 8883 with client
>> certificates , an error similar to the one below occurs :
>> *
>>
>> 2015-03-30 19:00:58,844 | WARN | Transport Connection to:
>> tcp://10.30.9.254:45849 failed: java.io.IOException: Unknown data type:
>> 77 |
>> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
>> Transport: ssl:///10.30.9.254:45849
>> 2015-03-30 19:00:58,926 | WARN | Transport Connection to:
>> tcp://10.30.9.254:45850 failed: javax.net.ssl.SSLHandshakeException:
>> Invalid
>> TLS padding data | org.apache.activemq.broker.TransportConnection.Transport
>> | ActiveMQ Transport: ssl:///10.30.9.254:45850
>>
>> Am pretty much sure that the certificates are well formed.Also am using
>> apache-activemq-5.11.0 and openssl version 1.0.1.
>>
>> Kindly help me with the issue am facing .
>>
>> Thanks
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/Invalid-TLS-Padding-data-Error-while-trying-to-connect-ActiveMQ-via-SSL-tp4694099.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>
Re: "Invalid TLS Padding data Error" while trying to connect ActiveMQ
via SSL
Posted by Tim Bain <tb...@alumni.duke.edu>.
Based on a few minutes of Googling, the most common cause of that exception
seems to be code that doesn't read enough bytes before trying to unwrap
(decrypt) the content. If that's what's going on, the log lines you posted
clearly indicate that the bug is in ActiveMQ code rather than code you
wrote (since it's during the process of interpreting the message's type),
so I'd recommend you submit a bug in JIRA.
Include the simplest configuration that can reproduce the problem, so that
whichever developer takes it on is able to recreate the problem, and if
you're getting any stack traces in your logs, include them in the JIRA bug
as well.
On Mar 30, 2015 9:34 PM, "harikrish07121991" <ha...@gmail.com>
wrote:
> Hi,
> I am trying to enable SSL in ActiveMQ broker with the following connector
> config in activemq.xml
> <transportConnectors>
>
> <transportConnector name="openwire"
> uri="tcp://
> 0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600
> "/>
> <transportConnector name="ssl" uri="ssl://0.0.0.0:8883"/>
> </transportConnectors>
> *But each time when the client tries to connect via port 8883 with client
> certificates , an error similar to the one below occurs :
> *
>
> 2015-03-30 19:00:58,844 | WARN | Transport Connection to:
> tcp://10.30.9.254:45849 failed: java.io.IOException: Unknown data type:
> 77 |
> org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
> Transport: ssl:///10.30.9.254:45849
> 2015-03-30 19:00:58,926 | WARN | Transport Connection to:
> tcp://10.30.9.254:45850 failed: javax.net.ssl.SSLHandshakeException:
> Invalid
> TLS padding data | org.apache.activemq.broker.TransportConnection.Transport
> | ActiveMQ Transport: ssl:///10.30.9.254:45850
>
> Am pretty much sure that the certificates are well formed.Also am using
> apache-activemq-5.11.0 and openssl version 1.0.1.
>
> Kindly help me with the issue am facing .
>
> Thanks
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Invalid-TLS-Padding-data-Error-while-trying-to-connect-ActiveMQ-via-SSL-tp4694099.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Re: "Invalid TLS Padding data Error" while trying to connect
ActiveMQ via SSL
Posted by harikrish07121991 <ha...@gmail.com>.
Hai,
Thanks for replying. I have already tried connecting to the "openwire"
connector from an mqtt client without ssl and it worked. Also tried
connecting to the ssl connector without the client certificates and the case
remains the same:
2015-04-01 12:41:11,941 | WARN | Transport Connection to:
tcp://10.30.9.254:59032 failed: java.io.IOException: Unknown data type: 77 |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
Transport: ssl:///10.30.9.254:59032
2015-04-01 12:41:16,517 | WARN | Transport Connection to:
tcp://10.30.9.254:59033 failed: javax.net.ssl.SSLHandshakeException: Invalid
TLS padding data | org.apache.activemq.broker.TransportConnection.Transport
| ActiveMQ Transport: ssl:///10.30.9.254:59033
2015-04-01 12:41:17,591 | WARN | Transport Connection to:
tcp://10.30.9.254:59034 failed: javax.net.ssl.SSLHandshakeException: Invalid
Padding length: 218 |
org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ
Transport: ssl:///10.30.9.254:59034
--
View this message in context: http://activemq.2283324.n4.nabble.com/Invalid-TLS-Padding-data-Error-while-trying-to-connect-ActiveMQ-via-SSL-tp4694099p4694184.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: "Invalid TLS Padding data Error" while trying to connect
ActiveMQ via SSL
Posted by artnaseef <ar...@artnaseef.com>.
Hmm, the unknown data type is a concern.
Can you try without client certificates?
Also, please provide the details of the java version in use.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Invalid-TLS-Padding-data-Error-while-trying-to-connect-ActiveMQ-via-SSL-tp4694099p4694147.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.