You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by j0llyr0g3r <ti...@wincor-nixdorf.com> on 2008/05/08 20:30:59 UTC

http ok, ssl ok, HTTPS -> NOT ok?

Hey folks,

i'm having a hard time with AMQ again....:-)

In a nutshell:

* Broker <- http -> Broker works using a configuration like this on both
brokers:

  <transportConnectors>
     <transportConnector name="inbound_openwire" uri="tcp://0.0.0.0:61616"/>
     <transportConnector name="inbound_http"    
uri="http://0.0.0.0:61617"/>
  </transportConnectors>
  <networkConnectors>
     <networkConnector name="outbound_http"
uri="static://(http://172.18.154.26:61617?trace=true)" networkTTL="5"/>
  </networkConnectors>


* Broker <- SSL (just tcp) -> Broker works using a configuration like this
on both brokers:

  <transportConnectors>
      <transportConnector name="inbound_openwire"
uri="tcp://0.0.0.0:61616?trace=true"/>
      <transportConnector name="inbound_http"    
uri="ssl://0.0.0.0:61617?trace=true"/>
   </transportConnectors>
   <networkConnectors>
    <networkConnector name="outbound_http"
uri="static://(ssl://172.18.154.26:61617?trace=true)" networkTTL="5"/>
   </networkConnectors>

Now the logical step for establishing HTTPS-connections would be to replace
"ssl" with "https" like this:


   <transportConnectors>
      <transportConnector name="inbound_openwire"
uri="tcp://0.0.0.0:61616"/>
      <transportConnector name="inbound_http"    
uri="https://0.0.0.0:61617"/>
   </transportConnectors>
   <networkConnectors>
     <networkConnector name="outbound_http"
uri="static://(https://172.18.154.15:61617?trace=true)"  networkTTL="5"/>
   </networkConnectors>

Unfortunately, this doesn't work.

The brokers give me the following errors on startup:

WARN  DiscoveryNetworkConnector      - Could not start network bridge
between: vm://localhost and: https://172.18.154.15:61617?trace=true due to:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

A configuration like this:

   <transportConnectors>
      <transportConnector name="inbound_openwire"
uri="tcp://localhost:61616?trace=true"/>
      <transportConnector name="inbound_http"    
uri="ssl://0.0.0.0:61617?trace=true"/>
   </transportConnectors>
   <networkConnectors>
     <networkConnector name="outbound_http"
uri="static://(https://172.18.154.15:61617)" networkTTL="5"/>
   </networkConnectors>

doesn't work out as well.

Error-message:

Could not start network bridge between: vm://localhost and:
https://172.18.154.15:61617 due to:
org.apache.commons.httpclient.ProtocolException: The server 172.18.154.15
failed to respond with a valid HTTP response


Ok, great! http is working, SSL is working, but https not?

Any ideas?
-- 
View this message in context: http://www.nabble.com/http-ok%2C-ssl-ok%2C-HTTPS--%3E-NOT-ok--tp17131092s2354p17131092.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: http ok, ssl ok, HTTPS -> NOT ok?

Posted by j0llyr0g3r <ti...@wincor-nixdorf.com>.
Hi,

according to your hint i tried the following configuration:

   <transportConnectors>
      <transportConnector name="inbound_openwire"
uri="tcp://0.0.0.0:61616"/>
      <transportConnector name="inbound_http"    
uri="http+ssl://0.0.0.0:61617"/>
   </transportConnectors>
   <networkConnectors>
      <networkConnector name="outbound_http"
uri="static://(http+ssl://172.18.154.26:61617?trace=true)"  networkTTL="5"/>
   </networkConnectors>


Then both brokers give me the following error on start-up:

ERROR BrokerService                  - Failed to start ActiveMQ JMS Message
Broker. Reason: java.io.IOException: Transport Connector could not be
registered in JMX: Transport scheme NOT recognized: [http+ssl]
java.io.IOException: Transport Connector could not be registered in JMX:
Transport scheme NOT recognized: [http+ssl]
        at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
        at
org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1395)
        at
org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:1848)
        at
org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:1801)
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:455)
        at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:50)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1288)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)


Assuming that you referred to this piece of documentation:

http://activemq.apache.org/stomp.html

i changed the configuration to:

   <transportConnectors>
      <transportConnector name="inbound_openwire"
uri="tcp://0.0.0.0:61616"/>
      <transportConnector name="inbound_http"    
uri="https://0.0.0.0:61617"/>
   </transportConnectors>
   <networkConnectors>
     <networkConnector name="outbound_http"
uri="static://(http+ssl://172.18.154.15:61617?trace=true)"  networkTTL="5"/>
   </networkConnectors>


Then the brokers don't give me any errors, but a warning:

WARN  DiscoveryNetworkConnector      - Could not connect to remote URI:
vm://localhost: Transport scheme NOT recognized: [http+ssl]

Messages don't arrive as before.

One last try:

   <transportConnectors>
      <transportConnector name="inbound_openwire"
uri="tcp://0.0.0.0:61616"/>
      <transportConnector name="inbound_http"    
uri="http+ssl://0.0.0.0:61617"/>
   </transportConnectors>
   <networkConnectors>
      <networkConnector name="outbound_http"
uri="static://(https://172.18.154.26:61617?trace=true)"  networkTTL="5"/>
   </networkConnectors>

Then both brokers give me the following error on start-up:

ERROR BrokerService                  - Failed to start ActiveMQ JMS Message
Broker. Reason: java.io.IOException: Transport Connector could not be
registered in JMX: Transport scheme NOT recognized: [http+ssl]
java.io.IOException: Transport Connector could not be registered in JMX:
Transport scheme NOT recognized: [http+ssl]

So, 

i am out of ideas......

Any ideas?



Valerio Paolini wrote:
> 
> 
>> i'm having a hard time with AMQ again....:-)
> [...]
>> Ok, great! http is working, SSL is working, but
>> https not?
> 
> reading docs it seems that if you want STOMP over SSL, you should use
> 'stomp+ssl:' -- following the same principle I would try with 'http+ssl:'.
> However I'm quite new to AMQ, so I could be wrong.
> 
> HTH,
>    Valerio
> 
> 

-- 
View this message in context: http://www.nabble.com/http-ok%2C-ssl-ok%2C-HTTPS--%3E-NOT-ok--tp17131092s2354p17136875.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.