Timeout exception in FutureConnection while running on CentOS 7
milindmb opened this issue · 0 comments
I created a simple test program for the MQTT Client. I am getting Timeout exception while connectting to MQTT Server on CentOS 7 server. Same program works well on Windows and Ubuntu box.
I also tried building the mqtt-client code from git-hub and using that jar. It gives same error.
Other MQTT Client works on CentOS box which means there is no MQTT Server or network related error.
Any clues to get around this issue?
If I use blocking connection then the program hangs..
regards
Milind
Log Trace::
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2016-12-21 11:38:00.664 ERROR 4789 --- [ main] o.s.boot.SpringApplication : Application startup failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:803) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:784) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:771) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
at com.example.DemoApplication.main(DemoApplication.java:10) [classes!/:0.0.1-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [mqtt_timeout.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [mqtt_timeout.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [mqtt_timeout.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) [mqtt_timeout.jar:0.0.1-SNAPSHOT]
Caused by: java.util.concurrent.TimeoutException: null
at org.fusesource.mqtt.client.Promise.await(Promise.java:83) ~[mqtt-client-1.12.jar!/:1.12]
at com.example.MqttRunner.run(MqttRunner.java:27) ~[classes!/:0.0.1-SNAPSHOT]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800) [spring-boot-1.4.2.RELEASE.jar!/:1.4.2.RELEASE]
... 14 common frames omitted
2016-12-21 11:38:00.667 INFO 4789 --- [ main] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.ann
Code.txt