2
votes

I am using Eclipse Paho Java MQTT client to connect to Mosquitto Broker, Jar used is mqttv3.jar. While connecting to MQTT broker I have to pass a username and password as connection option for authentication. I am setting the same in MqttConnectOptions object and passing that object to client.connect() function. It's standard procedure. When authentication credential are correct it connects to the broker with no problem.

A weird behaviour happens when first login credentials are incorrect and broker refuses to connect as expected. But immediately after the connection attempt is made with CORRECT credentials I am receiving following MqttException.

Time out waiting for response from server (32000)

I have used this same Java code in OS X 10.8.2 and Windows 7 but surprisingly, this problem appears only on Mac and works perfectly on Windows.

Is this kind of bug as it works on one OS and not on other?

There is no issue with the Mosquitto broker as it works perfectly with command line client with this same scenario.

1

1 Answers

0
votes