jpsstack
jpsstack

Reputation: 1291

Can not connect to Watson IoT - connection refused

I'm following these instructions using the orgID given by the Watson IoT platform.

I then created the MQ Client in Node-RED using this orgID and d:orgID:mydevicetype:mydevicedid using arbitrary mydevicetype and mydevicedid.

These are the Node-RED error messages:

"Error: Connection refused: Not authorized"
"Error stopping node: Error: [BaseClient:disconnect] Client is not connected"

I then created a device on the Watson IoT platform using the mydevicetype and mydevicedid and eas provided a token. I got the same error using use-token-auth as the user and the token as password.

Device log on the Watson IoT platform:

Invalid userID () for device auth: 
ClientID='d:orgID:mydevicetype:mydevicdeid', 
ClientIP=169.50.40.xxx 

Upvotes: 0

Views: 160

Answers (2)

Martin Smithson
Martin Smithson

Reputation: 111

If the client id that you are specifying really is:

d:orgID:mydevicetype:mydevicdeid

then your problem is that you need to specify the actual 6 character orgId, e.g.:

d:abcdef:mydevicetype:mydevicdeid

Give that a go and let us know how you get on.

Upvotes: 0

Can you try:

  • url: mqtts://[orgId].messaging.internetofthings.ibmcloud.com
  • port:8883
  • username: use-token-auth
  • password: [the token you got when you created the device]
  • client id: d:[orgID]:[mydevicetype]:[mydeviceid]

Looks like not much different from what you've tried, perhaps your are not using a secure (mqtts) connection ?

Upvotes: 1

Related Questions