Skip to main content
1-Visitor
April 29, 2020
Solved

Unable to run azure-iot.bat in windows to start connection server during IoT Hub Connector launch

  • April 29, 2020
  • 1 reply
  • 1627 views

23:22:55.039 [NettyClient-NIO-5] INFO c.t.s.i.p.v1.V1ProtocolContext - Preparing new Connection Authentication Request for channel: com.thingworx.sdk.impl.transport.MuxingBytesChannel$AuthTrackingBytesChannel@2ac59f79, request: V1AuthMessage [header=V1MessageHeader [messageType=20, requestId=1, endpointId=-1, sessionId=-1, isMultiPart=0], securityClaims=toString() called on SecurityClaims. No output emitted as this could be a security issue. If you want to log information you must explicitly do so at your own risk. It is NOT recommended you do so.]
23:22:55.057 [NettyClient-NIO-5] ERROR c.t.s.i.transport.MuxingBytesChannel - Error refilling connections on [channel: null, endpoint ws://localhost:8080/Thingworx/WS, uri: ws://localhost:8080/Thingworx/WS] failed : Connection authentication/registration FAILED [channel: com.thingworx.sdk.impl.transport.MuxingBytesChannel$AuthTrackingBytesChannel@2ac59f79, code: STATUS_UNAUTHORIZED, reason: Error [context: authenticating connection][cause: Missing application key!]]
com.thingworx.sdk.api.exception.AuthenticationException: Connection authentication/registration FAILED [channel: com.thingworx.sdk.impl.transport.MuxingBytesChannel$AuthTrackingBytesChannel@2ac59f79, code: STATUS_UNAUTHORIZED, reason: Error [context: authenticating connection][cause: Missing application key!]]
at com.thingworx.sdk.impl.protocol.common.AbstractProtocolContext$AuthChannelListenerAdapter.messageReceived(AbstractProtocolContext.java:225)
at com.thingworx.sdk.impl.protocol.common.AbstractProtocolContext$AuthChannelListenerAdapter.messageReceived(AbstractProtocolContext.java:174)
at com.thingworx.sdk.impl.transport.netty.NettyBytesChannel.messageReceived(NettyBytesChannel.java:112)
at com.thingworx.sdk.impl.transport.netty.NettyChannelHandler.channelRead0(NettyChannelHandler.java:125)
at com.thingworx.sdk.impl.transport.netty.NettyChannelHandler.channelRead0(NettyChannelHandler.java:26)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:263)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
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)

 

 

The appKey and Thingworx URL are as mentioned:-

 

transport.websockets {
// ThingWorx platform application key
app-key = "*******************************"

// One or more platforms can be specified here, comma separated
platforms = "ws://localhost:8080/Thingworx/WS"
}

 

ThingWorx Version-8.4.4

IoT Hub Connector version- 2.0.0.141

 

Thanks in advance.

Best answer by slangley

Hi @ranjank.

 

Unfortunately, I'm not able find anything wrong in the file you provided.  However, some settings come from the Azure portal and without access to that, your ThingWorx instance, or to the information that was scrubbed from the file, it's not possible to validate.

 

I recommend following these steps to ensure your configuration is set up correctly. If you still have issues, we will need to open a case for scheduling a WebEx.

 

Regards.

 

--Sharon

1 reply

Community Manager
April 29, 2020

Hi @ranjank.

 

The log you provided indicates missing application key.  However, since you provided the lines from the config relative to the appkey, it's most likely some syntax error occurring earlier in the file.  Please provide the full config file so we can take a look.  Please feel free to scrub it of any sensitive information, or you can send it to me under private email.

 

Regards.

 

--Sharon

ranjank1-VisitorAuthor
1-Visitor
April 30, 2020

@slangley ,

 

Conf file has been enclosed.

 

I have removed all the sensitive information.

slangleyCommunity ManagerAnswer
Community Manager
April 30, 2020

Hi @ranjank.

 

Unfortunately, I'm not able find anything wrong in the file you provided.  However, some settings come from the Azure portal and without access to that, your ThingWorx instance, or to the information that was scrubbed from the file, it's not possible to validate.

 

I recommend following these steps to ensure your configuration is set up correctly. If you still have issues, we will need to open a case for scheduling a WebEx.

 

Regards.

 

--Sharon