locked
i am not being able to set up amqp connection RRS feed

  • Question

  • Going through https://azure.microsoft.com/en-us/documentation/articles/iot-hub-java-java-getstarted/#run-the-applications tutorial, i came across the implementation part for device-to-cloud messaging. I established the 'simulated device' and 'read_d2c_messages' maven project . But i got stucked while implementing it. That is, i am getting the following error while running 'simulated device'. I want to know if i had to configure AMQP separately or what is the problem or reason for getting this error.

    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building simulated-device 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ simulated-device ---
    Sep 22, 2016 1:36:40 PM org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory getClass
    WARNING: unable to load org.bouncycastle.openssl.PEMReader
    Sep 22, 2016 1:36:40 PM org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory getClass
    WARNING: unable to load org.bouncycastle.openssl.PasswordFinder
    Sep 22, 2016 1:36:40 PM org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory <clinit>
    WARNING: unable to load bouncycastle provider
    [WARNING] 
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:294)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.io.IOException: java.io.IOException: Error opening Amqp connection: 
    at com.microsoft.azure.iothub.transport.amqps.AmqpsTransport.open(AmqpsTransport.java:104)
    at com.microsoft.azure.iothub.DeviceClient.open(DeviceClient.java:163)
    at com.mycompany.app.App.main(App.java:84)
    ... 6 more
    Caused by: java.io.IOException: Error opening Amqp connection: 
    at com.microsoft.azure.iothub.transport.amqps.AmqpsIotHubConnection.open(AmqpsIotHubConnection.java:183)
    at com.microsoft.azure.iothub.transport.amqps.AmqpsTransport.open(AmqpsTransport.java:97)
    ... 8 more
    Caused by: java.lang.InterruptedException: Waited too long for the connection to open.
    at com.microsoft.azure.iothub.transport.amqps.AmqpsIotHubConnection.connectionReady(AmqpsIotHubConnection.java:543)
    at com.microsoft.azure.iothub.transport.amqps.AmqpsIotHubConnection.open(AmqpsIotHubConnection.java:176)
    ... 9 more
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 2...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 2...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 2...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 2...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 2...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 2...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 2...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...
    Lost connection to the server. Reconnection attempt 1...

    • Moved by Swikruti Bose Thursday, September 22, 2016 12:32 PM Related to IoT Hub
    Thursday, September 22, 2016 8:22 AM

All replies