Author |
Message
|
GeneRK4 |
Posted: Fri Dec 12, 2014 7:48 pm Post subject: Connecting to MessageSight from MQTT Client |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
I am a newbie in exploring IoT using MessageSight...
I tried creating a MessageHub in MessageSight for Car Simulator as given in Redbook.Its working.I am able to connect to MessageHub endpoint.
Then I downloaded MyMQTT in my Android.I saved the MessageSight IP and Endpoint port in the settings.I am trying to publish a message.But it says "Some problem in connecting with broker".
I would like to see the Published message and MQTT connected Clients in the Monitoring page of MessageSight.
Please let me know where is the settings missed.. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 15, 2014 7:39 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Well.
The first thing that "some problem" could be is that you don't have access to the messagesight box from your phone, because the network is blocking all access.
The second thing that 'some problem' could be is that you're using the wrong IP address for the endpoint - you're using the address of an eht1 instead of eth0 or the mgmt ip.
This is similar to the first thing.
The third thing that 'some problem' could be is that the Endpoint is not allowing you to access it, because of the connection policies or other such things.
The fourth thing that could be 'some problem' is that the app on your phone is broken or isn't using the right levels of MQTT or a whole bunch of other things.
But it's really hard to tell what, because 'some problem' is not very useful. |
|
Back to top |
|
 |
GeneRK4 |
Posted: Mon Dec 15, 2014 5:53 pm Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
mqjeff wrote: |
Well.
The first thing that "some problem" could be is that you don't have access to the messagesight box from your phone, because the network is blocking all access.
The second thing that 'some problem' could be is that you're using the wrong IP address for the endpoint - you're using the address of an eht1 instead of eth0 or the mgmt ip.
This is similar to the first thing.
The third thing that 'some problem' could be is that the Endpoint is not allowing you to access it, because of the connection policies or other such things.
The fourth thing that could be 'some problem' is that the app on your phone is broken or isn't using the right levels of MQTT or a whole bunch of other things.
But it's really hard to tell what, because 'some problem' is not very useful. |
I will check all the possible solutions to fix this 'some problem'...Thanks for your response...I will update soon if it is working |
|
Back to top |
|
 |
GeneRK4 |
Posted: Mon Dec 15, 2014 9:54 pm Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
Hi mqjeff,
I verified all the settings today.
I am using eth0 address only.I am using the same IP for opening WebUI.Also,I tried the Remote car keyfob simulator in http://m2m.demos.ibm.com/autoremote/, using my IBM messagesight virtual machine IP.Its working fine for me.This demo is in Internet.
My MessageSight IP I used here in this demo in Internet and it is working fine.
The same MessageSight IP when I am using in my Android (connected to the same Wi-fi) ,is not working as 'Not Connected to Broker'.
In the MesssagingHub configurations,I have made the ClientID as * ,so that any ClientID can connect.
Also,I have made the Destination as 'AutoRemote/*' in the MessagingHub and I am using the same as Topic in MyMQTT in Android.
In MyMQTT app,as soon as we give the IP address and port in Settings,it will show connected if it is connected to the broker.This is working fine when connecting to test.mosquito.org.But for my Virtual MessageSight IP and Port not working...
I may be missing some basic steps..Unable to identify the issue still...Could you please let me know if there is still a chance for the firewall to block? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 16, 2014 5:40 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It sounds like you've eliminated almost everything other than the app you're using. I know you tested it against a different MQTT broker, but that still doesn't mean it isn't the source of the problem.
If you go to the Monitoring->Download log files, you can lok at the imaserver-default log, the imaserver-connection-log and the default-log.
These might help show some issue with the connection from your droid app.
If they don't show anything, then you can go to the Appliance->System Control page and increase the log level.
If they still don't show *anything*, then your device is simply not reaching the endpoint.
You should also look at the application you're using and see if there's any way you can get it to give you more information than 'some problem has occurred'. |
|
Back to top |
|
 |
GeneRK4 |
Posted: Tue Dec 16, 2014 6:11 pm Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
Thanks mqjeff for spending your time to help me..
I increased the log level to the maximum and still could not see any logs.
I feel like my device is not reaching the endpoint. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Dec 17, 2014 5:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
GeneRK4 wrote: |
Thanks mqjeff for spending your time to help me.. |
Well, honestly, it's part of my job these days.
GeneRK4 wrote: |
I increased the log level to the maximum and still could not see any logs.
I feel like my device is not reaching the endpoint. |
Yeah.
Can you use a telnet or ping application on your phone to reach the port?
Can you hit the webui on the phone? |
|
Back to top |
|
 |
GeneRK4 |
Posted: Sun Dec 21, 2014 6:49 pm Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
mqjeff wrote: |
Can you hit the webui on the phone? |
No ...Its not connecting from phone
Looks like 192.* is private IP and hence from my local PC it works fine whereas from other systems its not hitting.
Still working on to solve this issue using some networking concepts.. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Dec 21, 2014 10:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
GeneRK4 wrote: |
mqjeff wrote: |
Can you hit the webui on the phone? |
No ...Its not connecting from phone
Looks like 192.* is private IP and hence from my local PC it works fine whereas from other systems its not hitting.
Still working on to solve this issue using some networking concepts.. |
Open a browser on your phone and go to http://ipinfo.info/index.php, this should give you the outside address. As well you might let your phone use your wifi so that it would also be on the 192.168.*.*/255.255.255.0 network...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 22, 2014 6:32 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
fjb_saper wrote: |
GeneRK4 wrote: |
mqjeff wrote: |
Can you hit the webui on the phone? |
No ...Its not connecting from phone
Looks like 192.* is private IP and hence from my local PC it works fine whereas from other systems its not hitting.
Still working on to solve this issue using some networking concepts.. |
Open a browser on your phone and go to http://ipinfo.info/index.php, this should give you the outside address. As well you might let your phone use your wifi so that it would also be on the 192.168.*.*/255.255.255.0 network...
Have fun  |
It's not the phone that's on a private address, it's the webui for the MessageSight appliance running in a virtaul machine.
On your machine hosting the virtual appliance, you can run 'ipconfig', this will show you all of the adapters configured on that machine, and their (current) ip addresses. You should see one or more with the 192.* addresses, and at least one that is not a 192.* address. That one is the one you want to use from outside of your computer.
Once you get that address, you may then have to adjust the network settings of the virtual appliance to make sure that it is bridged or otherwise accessible from that address. It might already be set up that way - in which case it will just work. But if not, you'll need to look into bridging the VM guest to your network, or giving it an external address of it's own. For VMWare workstation, this is a matter of changing the settings on the VM image. |
|
Back to top |
|
 |
GeneRK4 |
Posted: Sat Dec 27, 2014 6:50 am Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
Its working now
I used NAT only however did Port Forwarding by following the link " http://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/".
Now,I am able to connect to the MessageSight Virtual machine using the host IP and the forwarded port.WebUI is working fine from my Android..
Still I am facing trouble in connecting to the MessageHub created in the MessageSight using MyMQTT client from my Android.It still says "Something went wrong in connecting to the broker".... |
|
Back to top |
|
 |
mqjeff |
Posted: Sat Dec 27, 2014 6:57 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
mqjeff wrote: |
The third thing that 'some problem' could be is that the Endpoint is not allowing you to access it, because of the connection policies or other such things. |
|
|
Back to top |
|
 |
GeneRK4 |
Posted: Sun Dec 28, 2014 10:06 pm Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
mqjeff wrote: |
mqjeff wrote: |
The third thing that 'some problem' could be is that the Endpoint is not allowing you to access it, because of the connection policies or other such things. |
|
All working now...I am able to connect to MessageHub (broker) from my Android MyMQTT app.
I have already unchecked Clientid and I dont have any security restrictions to connect to the broker other than choosing the protocol as MQTT.
I fixed it by configuring Port forwarding method again for the MessageHub port in the vmware NAT settings.
Now using my localhost's IP and the forwarded port of MessageHub,I am able to connect and successfully Publish and Subscribe.I am able to see the Active connections and the Transactions happening in the Message Sight webui when messages are published and subcribed using MyMQTT Android App.
Thank you very much mqjeff for all your guidance and support  |
|
Back to top |
|
 |
|