MQTT to Watson IOT not connecting?

Folks,

I have OH2 running on a Raspberry Pi3. All fine. I am now trying to publish my ZWAVE events to IBM Watson’s IOT (mqtt) broker.

Watson cloud environment has been set up properly.
I can connect to the MQTT broker using a standalone client on my Mac (MQTTBox). Through that, I could verify that the URL / Username / Password are all ok. Connecting to Watson from the RPI3 however keeps failing with the following message:

11:39:54.082 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'watsoniot’
11:39:55.439 [ERROR] [penhab.io.transport.mqtt.MqttService] - Error starting broker connection
Not authorized to connect (5)
at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:24)[216:org.openhab.io.transport.mqtt:1.9.0]
at org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:773)[216:org.openhab.io.transport.mqtt:1.9.0]
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:110)[216:org.openhab.io.transport.mqtt:1.9.0]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]

My /etc/openhab2/services/mqtt.cfg looks as follows:

watsoniot.url=tcp://[myorgid].messaging.internetofthings.ibmcloud.com:1883
watsoniot.clientId=g:[myorgid]:rpi3:Gateway
watsoniot.user=use-token-auth
watsoniot.pwd=######

I already deleted the /var/lib/openhab2/config/org/openhab/mqtt.config as suggested in another thread and it got rebuilt showing the same values as the mqtt.cfg file, yet with double quotes (" ") around them, eg:
watsoniot.url=“tcp://[myorgid].messaging.internetofthings.ibmcloud.com:1883”. Looking fine to my (not too experienced) eye…

There are no other brokers listed in this file either.

Other things I have tried and want to add:

  • I am fairly (if not 100%) certain that the credentials are ok, as the stand-alone client successfully connects and Watson also sees it come online. OH2 however will not connect.
  • I have connected to a local Mosquito broker (without using credentials) and then OpenHAB connects successfully
  • I have configured Mosquito to serve as a bridge (OH2 <-> Mosquito (local) <-> Watson IOT) and then Mosquito DOES connect to IBM Watson. This also suggests that my credentials are set up correctly.

What am I missing? How can I further debug this within OH2?

Many thanks for any pointers!
Ronald