STOMP over secure websocket

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

STOMP over secure websocket

ArturoBelano
I configured and restarted activemq according to the documentation to allow ssl, wss and stomp+ssl (abbrevated here just to show you what I did there are also connections for openwire,etc all on different open ports):
        <sslContext>
           all the ssl context info
        </sslContext>

        <transportConnectors>
            <transportConnector name="ssl" uri="ssl://localhost:61618"/>

            <transportConnector name="stomp+ssl" uri="stomp+ssl://localhost:61615"/>

            <transportConnector name="secure_websocket" uri="wss://localhost:61616/>
        </transportConnectors>
When I restart activemq the log messages tell me that activemq is listening for connections on all of my ports.
However, everytime I tried to use wss://myurl:61616/stomp+wss I get a ailed: Error in connection establishment: net::ERR_CONNECTION_REFUSED result.  I'm finding it really difficult to debug.  Any suggestions?
Reply | Threaded
Open this post in threaded view
|

Re: STOMP over secure websocket

christopher.l.shannon
You should just use wss://myurl:61616 for your URL.  I don't believe you
need the stomp+wss at the end.

On Wed, Aug 26, 2015 at 9:01 PM, ArturoBelano <[hidden email]>
wrote:

> I configured and restarted activemq according to the documentation to allow
> ssl, wss and stomp+ssl (abbrevated here just to show you what I did there
> are also connections for openwire,etc all on different open ports):
>         <sslContext>
>            all the ssl context info
>         </sslContext>
>
>         <transportConnectors>
>             <transportConnector name="ssl" uri="ssl://localhost:61618"/>
>
>             <transportConnector name="stomp+ssl"
> uri="stomp+ssl://localhost:61615"/>
>
>             <transportConnector name="secure_websocket"
> uri="wss://localhost:61616/>
>         </transportConnectors>
> When I restart activemq the log messages tell me that activemq is listening
> for connections on all of my ports.
> However, everytime I tried to use wss://myurl:61616/stomp+wss I get a
> ailed:
> Error in connection establishment: net::ERR_CONNECTION_REFUSED result.  I'm
> finding it really difficult to debug.  Any suggestions?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/STOMP-over-secure-websocket-tp4701435.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: STOMP over secure websocket

Tim Bain
Your config snippet is also missing a closing quote on the wss URI; is that
just an artifact of posting your question?
On Aug 27, 2015 6:02 AM, "Christopher Shannon" <
[hidden email]> wrote:

> You should just use wss://myurl:61616 for your URL.  I don't believe you
> need the stomp+wss at the end.
>
> On Wed, Aug 26, 2015 at 9:01 PM, ArturoBelano <[hidden email]>
> wrote:
>
> > I configured and restarted activemq according to the documentation to
> allow
> > ssl, wss and stomp+ssl (abbrevated here just to show you what I did there
> > are also connections for openwire,etc all on different open ports):
> >         <sslContext>
> >            all the ssl context info
> >         </sslContext>
> >
> >         <transportConnectors>
> >             <transportConnector name="ssl" uri="ssl://localhost:61618"/>
> >
> >             <transportConnector name="stomp+ssl"
> > uri="stomp+ssl://localhost:61615"/>
> >
> >             <transportConnector name="secure_websocket"
> > uri="wss://localhost:61616/>
> >         </transportConnectors>
> > When I restart activemq the log messages tell me that activemq is
> listening
> > for connections on all of my ports.
> > However, everytime I tried to use wss://myurl:61616/stomp+wss I get a
> > ailed:
> > Error in connection establishment: net::ERR_CONNECTION_REFUSED result.
> I'm
> > finding it really difficult to debug.  Any suggestions?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/STOMP-over-secure-websocket-tp4701435.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: STOMP over secure websocket

ArturoBelano
In reply to this post by christopher.l.shannon
I just accidently removed the ending quote when I posted.  Sorry about that.
Reply | Threaded
Open this post in threaded view
|

Re: STOMP over secure websocket

ArturoBelano
In reply to this post by christopher.l.shannon
I still get a connection refused notice.  Is there a good way to debug wss connections?  Maybe openssl?
Reply | Threaded
Open this post in threaded view
|

Re: STOMP over secure websocket

ArturoBelano
I tried to connect using the openssl client and got:
connect: Connection refused
connect:errno=61
That doesn't narrow the issue down too much for me though.  I'm using a self-signed cert with the ssl connection.  Any ideas?
Reply | Threaded
Open this post in threaded view
|

Re: STOMP over secure websocket

Tim Bain
Have you made config changes to allow the broker to trust your self-signed
cert?
On Aug 27, 2015 1:17 PM, "ArturoBelano" <[hidden email]> wrote:

> I tried to connect using the openssl client and got:
> connect: Connection refused
> connect:errno=61
> That doesn't narrow the issue down too much for me though.  I'm using a
> self-signed cert with the ssl connection.  Any ideas?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/STOMP-over-secure-websocket-tp4701435p4701462.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

can't connect MQ with 'mqttws31.js' but can work with websocket purely

William-2
Dear all,

        We write a html page on STB(set-top box) using mqttws31.js and try to connect MQ with MQTT protocol over websocket. But it always post an error with ‘AMQJSC000E Connect timed out’. It’s weird that if I just write javascript direct with websocket it’s work.

        That’s to say, below snippet is worked(Running on STB).

        var ws = new WebSocket("ws://192.168.1.190:61614/mqtt", 'mqttv3.1');
        ws.onopen = function()
        {
                console.log(‘connect success’);
          ws.send("hello");
        };

once I convert to use ‘mqttws31.js’ it post ‘timeout’ error. the snippet is below,

        var client = new Messaging.Client('192.168.1.190', 61614, 'myclientid1234');

Can anyone give me some ideas? thanks!


William
2015/8/28


Reply | Threaded
Open this post in threaded view
|

Re: STOMP over secure websocket

ArturoBelano
In reply to this post by Tim Bain
I moved on using CA certs.  My original problem ended up being a firewall issue that I resolved by opening up the ports I needed on the server.  Thanks for the suggestions!