Skip to Content
0

Why am I unable to connect to my IoT device via the MQTT WebSockets API?

Oct 11, 2017 at 01:08 PM

63

avatar image
Former Member

I am no longer able to connect to an IoT device via the MQTT WebSockets API. It had been working fine a few weeks ago from both the IoT service cockpit and a python script.

  1. Open Internet of Things Service Cockpit
  2. Select 'View Registered Devices and Device Types'
  3. Select 'Devices'
  4. Select device to test
  5. Copy 'ID' (i.e. 1234abcd-1234-1234-1234-1234abcd5678)
  6. Open Message Management Service Cockpit
  7. Open Internet of Things Service Cockpit
  8. Select 'Send and view messages or perform other actions'
  9. Select 'Messaging through MQTT over WS'
  10. Paste the 'Device ID'
  11. Select 'Connect'
  12. Message Box shows ' websocket failure AMQJS0006E Bad Connack return code: 2 Connection Refused: identifier rejected.'
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Anton Levin
Oct 11, 2017 at 01:19 PM
0

Hello Stephen, may I please ask you to check the "RDMS Sync Base URL" configuration value in MMS Cockpit -> Configure the Message Management Service -> RDMS. Does your URL start with "https" or "http"? In case it is "http", please re-start your "iotmms" and try again. This could be potentially related to the Connectivity Service issue [1] we experienced recently. Thanks, Anton

[1] https://answers.sap.com/questions/318417/msgdevice-xxx-not-found-in-registry-synchronizing.html

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

The URL started with "http". After restarting the "iotmms" service (and waiting a minute or so), it started with "https" and both the dashboard and python script worked. Thanks!

0