You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I place an mqtt client(runnable jar) on host "A".
and set host "B" as apache activeMQ server.
If I send some test data A to B, It works fine.
But when I modify hostname A, mqtt client cannnot connect to host B.
ERROR LOG:
Exception in thread "main" java.util.concurrent.TimeoutException
at org.fusesource.mqtt.client.Promise.await(Promise.java:83)
at app.Main.main(Main.java:24)
Client codes are below:
String data = "...testdata...";
MQTT mqtt = new MQTT();
mqtt.setHost("host-B-Domain.com", 1883);
mqtt.setUserName("testUser");
mqtt.setPassword("testPwd");
mqtt.setWillRetain(false);
FutureConnection connection = mqtt.futureConnection();
connection.connect().await(5, TimeUnit.SECONDS); **#connectionTimeout occurs**
connection.publish(
new UTF8Buffer("testBufferData"), new AsciiBuffer(data), QoS.EXACTLY_ONCE, false);
connection.disconnect().await();
firewall config is OK and tested with telnet command.
I've also checked with tcpdump.
If hostname changed, mqtt does not send any packets to host B.
And activeMQ doesn't have any restrictions about hostname.
Both hosts are running with CentOS 7 x64.
And using java-1.8.0-openjdk-headless-1.8.0.91-1.b14.el7_2.x86_64.
How can I solve this issue?
any comments are appreciated.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello, I need some help with mqtt connection.
I place an mqtt client(runnable jar) on host "A".
and set host "B" as apache activeMQ server.
If I send some test data A to B, It works fine.
But when I modify hostname A, mqtt client cannnot connect to host B.
ERROR LOG:
Client codes are below:
firewall config is OK and tested with telnet command.
I've also checked with tcpdump.
If hostname changed, mqtt does not send any packets to host B.
And activeMQ doesn't have any restrictions about hostname.
Both hosts are running with CentOS 7 x64.
And using java-1.8.0-openjdk-headless-1.8.0.91-1.b14.el7_2.x86_64.
How can I solve this issue?
any comments are appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: