Following these two tutorials (https://www.anavi.org/article/182/ and http://wei-meilin.blogspot.tw/2014/05/red-hat-openshift-xpaas-simple-mqtt.html) I have installed a MQTT Broker using JBoss Fuse.
Although my mqtt-container disappears after a while (I don't know why) I can make a port-forwarding and test the broker.
But I would like to know how to connect directly to the broker. Do you know how to do it?
I have tried this tutorial (http://training.runcloudrun.com/advanced/16-Network-and-Protocols.md.html - AMQ Example) but I don't have access to "/var/lib/openshift/.httpd.d/sniproxy.cfg"
I am the author of the first tutorial that you pointed out. If you want to use MQTT without local port forwarding please have a look at the remark at the article on my blog and the AMQ cartridge that demonstrates the SNI features:
The port forwarding is not convenient for real life cases, especially if the MQTT clients are working on embedded devices such as microcontrollers and it is recommended to use a SNI Proxy as explained here: http://training.runcloudrun.com/advanced/16-Network-and-Protocols.md.html
I was using Online Openshift and that feature is only available for Enterprise edition.
Why doesn't Openshift have this feature (complete) in the Online mode?
One way to work around is to use the mqtt over websocket feature with a DIY cartridge. See the SO question "How can I access socket through Openshift" for some pointers to further details about how to run websocket on openshift.
The mosquitto seems to have implemented the websocket feature though I have not verified by testing it out.
Related
I'm trying to put to work the IDM+AuthZForce+PEP-Proxy-Wilma to secure the Orion context broker, but I'm having a bit of trouble, nothing works, all is up and running, but there's no autentication and no security.
I changed all the configuration files and nothing changed. I tried to populate the database (mongoDB or PostgreSQL) and nothing changed, too.
All services are running in a docker-compose instance.
Anyonce already has deployed this successfully?
I think you can get some help reading the following question/answers:
Fiware - How to integrate Keyrock IdM, Wilma PEP Proxy and Orion Context Broker?
I already configured Orion+Keyrock+Wilma. Here is the link for a simple tutorial on how to integrate them.
The AuthZForce is still mysterious for me. Recently I asked the following question about it:
FIWARE AuthZForce 5.4.1 is not installing
If you continue with some doubt related to Orion+Keyrock+Wilma, say it and perhaps I can help you.
I hope the suggested link can be useful for you.
I just found that mosquitto had got a websockets upgrade which allows it to
host the HTTP services.
I tried hosting a html file using the websockets feature on the port 8080.
The mosquitto broker seems to start fine and the mqtt services on the other ports seem to function properly. But when i try to access the html file over the localhost I get the a response saying no data sent by the server.
I am not sure where my mistake lies..Any ideas?
Mosquitto is not a HTTP server, it can not serve generic files.
The HTTP listener is only there to facilitate an upgrade to the websocket protocol in order to run MQTT over a websocket connection.
You might want to look out for a different broker that is flexible enough to do what you're looking for. I don't know of any MQTT broker that allows you to do that out of the box, but many are fairly extensible. For one I can talk about is VerneMQ, as I am one of the core developers. Developing a simple VerneMQ plugin that serves some static files over HTTP is a matter of a few lines of code, as the plugin only requires to setup some configuration for the internal webserver.
However, unfortunately we haven't yet documented this feature. But feel free to drop us a line if such an approach sounds interesting for you.
Cheers,
Andre
We are experiencing the issue when trying to connect to the cluster after updating the version of Java SDK.
The setup of the system is as follows:
We have a web application that is using Java SDK and a Couchbase cluster. In between we have a VIP (Virtual IP Address). We realise that isn’t ideal but we’re not able to change that immediately since VIP was mandated by Tech Ops. VIP is basically only there to reroute the initial request on application startup. That way we can make modifications on the cluster and ensure that when application starts it can find the cluster regardless of the actual nodes in the cluster and their IPs.
Prior to the issue we used JAVA SDK version 1.4.4. Our application would start and Java SDK would initiate a request on port 8091 to VIP. Please note that port 8091 is the only port open on VIP. VIP would reroute the request to one of the node cluster currently in use the cluster would respond to Java SDK. At that point Java SDK would discover all the nodes in the cluster and application would run fine. During up time if we would add, remove a node from the cluster Java SDK would update automatically and everything would run without the issue.
In the last sprint we updated the Java SDK to version 2.1.3. Our application would start and Java SDK would initiate a request on port 11210 to VIP. Since this port is not open the request would fail and Java SDK would throw an exception:
Caused by: java.lang.RuntimeException: java.util.concurrent.TimeoutException
at com.couchbase.client.java.util.Blocking.blockForSingle(Blocking.java:93)
at com.couchbase.client.java.CouchbaseCluster.openBucket(CouchbaseCluster.java:108)
at com.couchbase.client.java.CouchbaseCluster.openBucket(CouchbaseCluster.java:99)
at com.couchbase.client.java.CouchbaseCluster.openBucket(CouchbaseCluster.java:89)
No further request would be made on any port.
It appears the order in which port are being used has been changed between versions. Could somebody please confirm, or dispute, that the order in which ports are being used for cluster discovery has been changed between versions. Also could somebody please provide some advice on how we could resolve the issue. We are trying to understand the clients behavior, if we could open all those ports on the VIP would the client still then function correctly and at full performance?
The issue is happening on our production environment which we cannot use for testing out potential solutions since it will interfere with our products.
In v2.x of the Java SDK, it defaults to 11210 to get the cluster map to bootstrap the application. This is a huge improvement actually as now the map comes from the managed cache and not the cluster manager (8091). The SDK should use 8091 as a fall back if it cannot get the map on 11210 though. Regardless, you really want to get that map from 11210, trust me. It cleans up a lot of problems.
To resolve this long term and follow Couchbase best practices, upgrade to the Java 2.2.x SDK, get rid of the VIP entirely and go with a DNS SRV record instead. That gives you one DNS entry for the SDK connection object and you just manage the node list in DNS. It works great. I say SDK 2.2 as the DNS SRV record solution is fully supported there, in 2.1 it is experimental. VIPs are specifically recommended against by Couchbase these days. In older versions of the SDKs it was fine to do this and it helped with limiting the number of connections from the app to the DB nodes, but that is no longer necessary and can actually be a bad thing.
in addition to Kirk's long term answer (which I also advise you to follow), a shorter term solution may be to deactivate the 11210 bootstraping (carrier bootstrap) through the CouchbaseEnvironment by calling bootstrapCarrierEnabled(false) on the builder.
I don't guarantee that it'll work with a vIP even after that, but that may be worth a try if you're in a hurry.
I want to configure 3 activemq brokers (same machine or vm) that works together as broker network. What are the steps I need to follow ?
Have you tried to use this guide? http://activemq.apache.org/networks-of-brokers.html
Please precise your question if you have difficulties with something about this manual.
Which is best tcp socket server to testing html5websocket? I developing a html5socket based client that will interact with tcp. So I want first a testing server. I am good in PHP but not in sockets programming. So I used PHPwebsocket downloaded from google code. I tried it using its own client and server for testing but it suddenly disconnects and not work as intended so is there any other socket server to test HTML5 websocket client? Which one is better, I can use a python based, or java based tcp server or if in PHP then that can be more convenient. And please tell me what else I need to test HTML5 websocket. I am newbie in sockets. So my concepts are not so clear.
thanks for any advise.
If you want to self host then:
pywebsocket - Python
jwebsocket - Java
jetty with WebSockets - Java
You could connect to the Pusher hosted WebSocket API to see if you can connect. More information on the endpoints and Pusher protocol here:
http://pusher.com/docs/pusher_protocol
You would need to sign up for a free Pusher sandbox account to do this though.
You say you want to "interact with tcp". Do you have specific protocols in mind? If using JMS, XMPP, or AMQP, the Kaazing WebSocket Gateway provides these industry standard APIs and protocols in the browser out-of-the-box. For example, using JMS, you can build pretty complex messaging applications without a single line of server-side code. Everything can run in the client (typically in JavaScript in the browser).
Here are some examples showcasing the power of extending rich business protocols all the way to the browser.
Also, the Kaazing gateway comes with free development license; fully functional server for up to 50 concurrent connections, no functionality or time restrictions.