Skip to main content
Emeritus
October 9, 2018
Question

Connect Azure IoT Hub to ThingWorx - azure-iot.bat

  • October 9, 2018
  • 11 replies
  • 5775 views

Hi Developers,

 

I received this question from a user. Any recommendations? Thanks in advance.

---------------

I get another error when i run the next step azure-iot.bat...

 

14:57:01.520 [main] INFO c.t.f.i.AbstractManyPlatformWebSocketFabric - Many Platform WebSocket Fabric enabled without service discovery: endpoints=[ws://localhost:8080/Thingworx/WS]
14:57:01.555 [main] INFO c.t.s.i.transport.MuxingBytesChannel - Subchannel ws://localhost:8080/Thingworx/WS-1 in channel ws://localhost:8080/Thingworx/WS was no longer valid - unregistering 
it
14:57:01.555 [main] INFO c.t.s.i.transport.MuxingBytesChannel - Subchannel ws://localhost:8080/Thingworx/WS-2 in channel ws://localhost:8080/Thingworx/WS was no longer valid - unregistering 
it
14:57:01.555 [main] INFO c.t.s.i.transport.MuxingBytesChannel - Subchannel ws://localhost:8080/Thingworx/WS-3 in channel ws://localhost:8080/Thingworx/WS was no longer valid - unregistering 
it
14:57:01.555 [main] INFO c.t.s.i.transport.MuxingBytesChannel - Subchannel ws://localhost:8080/Thingworx/WS-4 in channel ws://localhost:8080/Thingworx/WS was no longer valid - unregistering 
it
14:57:01.555 [main] INFO c.t.s.i.transport.MuxingBytesChannel - Subchannel ws://localhost:8080/Thingworx/WS-5 in channel ws://localhost:8080/Thingworx/WS was no longer valid - unregistering 
it
14:57:01.555 [main] INFO c.t.s.i.transport.MuxingBytesChannel - Needed to reconnect subchannels on client endpoint [id: ws://localhost:8080/Thingworx/WS] : [active: 0, max: 5]
14:57:01.617 [main] INFO c.t.connectionserver.PlatformImpl - Starting ConnectionServer: UUID=092baf65-8a0e-41a4-be53-d0296d76662e, Platform protocol=V1, Platform transport=WEBSOCKETS
14:57:01.617 [main] INFO c.t.connectionserver.PlatformImpl - Waiting for connection to platform...
14:57:02.701 [NettyClient-NIO-4] ERROR c.t.s.i.t.netty.NettyBytesChannel - Error while establishing websocket connection on channel com.thingworx.sdk.impl.transport.netty.NettyBytesChannel$2@
4bc70f42.
java.net.ConnectException: Connection refused: no further information: localhost/127.0.0.1:8080
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:748)
14:57:02.701 [NettyClient-NIO-1] ERROR c.t.s.i.t.netty.NettyBytesChannel - Error while establishing websocket connection on channel com.thingworx.sdk.impl.transport.netty.NettyBytesChannel$2@
22a04d8a.
java.net.ConnectException: Connection refused: no further information: localhost/127.0.0.1:8080
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:289)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:748)
14:57:02.701 [NettyClient-NIO-2] ERROR c.t.s.i.t.netty.NettyBytesChannel - Error while establishing websocket connection on channel com.thingworx.sdk.impl.transport.netty.NettyBytesChannel$2@
168ff519.

11 replies

22-Sapphire I
October 10, 2018

I see a reference to 127.0.0.1:8080 which is where Tomcat/Thingworx would be, so I'm not sure if it is configured right. Are they running the connection server on the same box as Thingworx is running? There might be port conflicts potentially.

I'm not even sure if it is getting to the attempt to connect to Azure.

Sorry I am just going by what I read, I haven't done a ton with connection servers/iot hub connectors.

1-Visitor
October 11, 2018

Hi PaiChung, Thank you. I am a newbee here. I am just trying to follow the steps on this guide

'https://developer.thingworx.com/resources/guides/azure-iot-hub-connector-quickstart/install-iot-hub-connector'

I believe i have configured all except 

platform.extensions {
// Filesystem location of extension zips. This is needed for the connector to deploy extensions to the platform
location = "/opt/connector-bundle/extensions"
}

Because the guide didn't mention it.

I don't know what 'Tomcat/Thingworx' is yet and the guide didn't mention it. 

where should i start to debug this problem.

Thank you.

1-Visitor
April 25, 2019

@henok were you able to resolve this issue. Seems like i am doing the same thing you are by using the connector  on the same pc where Thingworx in installed.