You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ArturoBelano <la...@gmail.com> on 2015/08/27 03:01:52 UTC

STOMP over secure websocket

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.

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

Posted by William <st...@163.com>.
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



Re: STOMP over secure websocket

Posted by ArturoBelano <la...@gmail.com>.
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!



--
View this message in context: http://activemq.2283324.n4.nabble.com/STOMP-over-secure-websocket-tp4701435p4701998.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: STOMP over secure websocket

Posted by Tim Bain <tb...@alumni.duke.edu>.
Have you made config changes to allow the broker to trust your self-signed
cert?
On Aug 27, 2015 1:17 PM, "ArturoBelano" <la...@gmail.com> 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.
>

Re: STOMP over secure websocket

Posted by ArturoBelano <la...@gmail.com>.
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.

Re: STOMP over secure websocket

Posted by ArturoBelano <la...@gmail.com>.
I still get a connection refused notice.  Is there a good way to debug wss
connections?  Maybe openssl?



--
View this message in context: http://activemq.2283324.n4.nabble.com/STOMP-over-secure-websocket-tp4701435p4701457.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: STOMP over secure websocket

Posted by Tim Bain <tb...@alumni.duke.edu>.
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" <
christopher.l.shannon@gmail.com> 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 <la...@gmail.com>
> 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.
> >
>

Re: STOMP over secure websocket

Posted by ArturoBelano <la...@gmail.com>.
I just accidently removed the ending quote when I posted.  Sorry about that.



--
View this message in context: http://activemq.2283324.n4.nabble.com/STOMP-over-secure-websocket-tp4701435p4701456.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: STOMP over secure websocket

Posted by Christopher Shannon <ch...@gmail.com>.
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 <la...@gmail.com>
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.
>