Skip to Content
avatar image
Former Member

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

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.'
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 11, 2017 at 01:19 PM

    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

    Add comment
    10|10000 characters needed 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!