I've been trying to get the kaazing stock ticker excel demo working, and I'm running into some problems with the websocket connection. I have my gateway running and the stock feed service seems to be working:
[Stock Feed] Stock Ticker demo connected to tcp://localhost:61616
When I attempt to run the javascript JMS messaging demo, I get the following:
CONNECT: ws://localhost:8001/jms
EXCEPTION: ConnectionFailedException: WebSocket connection failed
It typically takes about 30 seconds to fail. In that time, my current sessions on the kaazing dashboard do spike to 1, so I know the connection is at least being attempted.
The same thing is occurring if I use the simple websocket client chrome extension. In my error logs, I'm seeing:
2016-03-11 11:06:18,723 [New I/O worker #6] INFO [ws://localhost:8001/jms x-kaazing-handshake]
[tcp://[0:0:0:0:0:0:0:1]:52340 http/1.1] - [localhost:8001] "GET /jms?.kl=Y HTTP/1.1 " "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0"
2016-03-11 11:06:19,860 [EagerCP_0-1] WARN Unable to establish JMS Connection due to the following exception: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused: connect
The error is addressed on the kaazing site here: http://kaazing.com/doc/jms/4.0/integration-jms/p_jms_integrate_tshoot.html#problem4 but it doesn't really provide a solution. I would try to implement the "workaround" suggested but I can't find the configuration file. None of the gateway configurations contain the given block of XML.
As a last ditch effort, I attempted to modify the activemq service configuration to include websockets by adding the ws to the transportConnector:
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
<transportConnector name="ssl" uri="ssl://0.0.0.0:61617"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
<transportConnector name="websocket" uri="ws://0.0.0.0:61614"/>
</transportConnectors>
Still no luck. What am I missing? It seems like this should work right out of the box...
The issue was a permission level on the activemq.bat load. The connection never actually establish itself because of admin privileges on our networks. I was able to fix it by tweaking our admin rights.
Of course, I never looked at the activemq batch logs which gave me the hint right away.
http://developer.kaazing.com/documentation/jms/4.0/about/setup-guide.html#localhost_install