mqtt output in node red disconnected to watson iot service on Bluemix - ibm-cloud

I have accidentally deleted Watson IoT service on my space. I have created a recent one and tried to configure a mqtt subscriber via node-red to send data to the new service.
It always shows disconnected to the service even though I did all the configuration requirements. ( Server , topic , token authentification .. ).
PS: I am using port 1883 and I have changed the service security to TLS optional.
What should I look up for ? Do I have to change other changed settings ?

Related

Bluemix Secure Gateway AS 400 DB2 Connection refused Issue

I have configured Bluemix Secure gateway client to connect to DB2 on AS 400 using a Windows machine. I am able to run the Db2 connection successfully from the application on Windows machine where Secure gateway client is running. But when I run the same application on Bluemix with modifying the code to depict Secure Gateway client destination details, I get 'Connection Refused' error.
I had gone through how to connect a bluemix app to on-premise db/as400? , which mentions about Secure gateway client for OS 400.
Wanted to understand how to fix the issue for 'Connection Refused' ? Do we have to use different DB2Driver/ DB2 Connect string from Bluemix? or Any other settings to be done on AS400 server?
Given that the Connection refused error is occurring between your BlueMix application and the SG Servers and no logs are being generated on the SG Client, it sounds like the issue is with a listener not being opened on the SG Servers rather than an issue between the SG Client and DB2. All listeners should come up when the SG Client initially connects to the SG Servers.
Are you able to cURL or telnet the cloud host:port provided with this particular destination? Or is this connection refusal specific to your BlueMix app? In either case, this answer will provide more direction on where to investigate further.

Node Red - Send Device to Gateway Publish/Subscribe - IBM Bluemix simulator

My requirement is to create Node red app to read a message from n devices and m gateways and publish to IBM IOT as MQTT using MQTT node, also process and store it in cloudant DB. If there any update then the device should subscribe for the commands.
I read from IBM blue mix portal and was able to send and receive the message for gateways using MQTT node to IBM IOT node.
Need clarification on the below,
can use node red simulator to send message from device/gateway
simultaneously (because gateway will send the message directly to IBM Watson IOT but devices always will send a message to gateway)
How to identify or differentiate the message received from device
/Gateway in Watson IOT node
How the sequence of the message published? is in FIFO order?
Time to live for the message? If MQTT broker disconnected then how
the message will be published like i.e how many messages can be
queued and size of the queue?
How can we notify MQTT /device disconnected to the other end
Each message published to the Watson IoT platform has a unique client ID to differentiate the origin of the publisher.
IoT uses a Pub/Sub architecture so messages are published to topics and received by the subscribers. It is not a point-to-point queue architecture.
Message are saved internally by the Watson IoT platform and you have the option of configuring cloudant DB as historian data storage for your messages as described in this tutorial.

UDP Socket over cloud provider

I am using Appache Tomcat to host webpages that can be accessed by authenticated users and a UDP socket has been opened on port 14550 in which devices sends a stream of communication messages. The system is working fine in the local network. I tried to host the this in Openshift and later found that Openshift does not allow external UDP communication. Now I am considering Amazon EC2 instance, new VM in Azure or in GCP. I would like to know that will there be any issue in using the sockets from my application. Thank you in advance.
No, on AWS EC2 everything is allowed, you just need to configure your Security Group to allow specific web traffic, UDP traffic can also be allowed their.
I was also looking for possible workaround for this issue, but it's quite easy irrespective of what platform language you are using to develop socket program on AWS EC2, as am using Node.js nginx in my case, this should work for all supporting platforms.
Configure Security Group
In the AWS console, open the EC2 tab.
Select the relevant region and click on Security Group.
You should have an default security group if you
have launched an Elastic Beanstalk instance in that region for your
app.
click on Actions button at top, and select Edit inbound rules.
here in Type column select All UDP, or you can set some Custom UDP
rule as well to listen at your socket port.
And there just enter port of your UDP server Ex: 2020.
And that's it!
Note: If something is not working, check the "Events" tab in the Beanstalk application / environments and find out what went wrong.

Connecting Libelium Smart City kit to Bluemix IoTF

We have a libelium smart city kit, with which we have configured ambient sensor module and are able to connect the sensors (Waspmote) to the gateway (Meshlium) Meshlium is able receive the data from the sensors.
We have followed the recipes for Libelium:
https://developer.ibm.com/recipes/tutorials/bluemix-configuration-guide-for-meshlium/
We set-up the API keys in bluemix and configured meshlium to connect bluemix, but blumix is not receiving the data yet.
We are also able to ping to Bluemix from meshlium.
Need some help on where we are going wrong and is there any additional set-up required both at Bluemix end and meshlium end.

Outbound HTTP request from bluemix runtime

can a NodeJS application running on Bluemix make outside HTTP requests ? What address does the receiving end see ? There is a proxy that stops traffic from unknown servers on the other end, so we need to declare the origin IP. What is it for Bluemix ?
Any application running on IBM Bluemix can make outgoing HTTP requests (or any other outgoing TCP/UDP request).
Outgoing requests will come from the IP address of the DEA running the container with this application instance. If you have multiple instances, requests can come from any of these instances.
For details on the environment variables exposing these parameters, see this page:
http://docs.run.pivotal.io/devguide/deploy-apps/environment-variable.html
Yes a NodeJs application running on Bluemix can make outgoing requests.
The receiving end will see the IP address of the Bluemix gateway rather than the IP address of the DEA running the container. You can work out what the IP address is by doing a nslookup of your the app url, but the IP address(es) used is/are not currently documentation so could change.