cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

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

ranjank
15-Moonstone

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

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.

ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:ranjank)

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

View solution in original post

5 REPLIES 5
slangley
23-Emerald II
(To:ranjank)

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

ranjank
15-Moonstone
(To:slangley)

@slangley ,

 

Conf file has been enclosed.

 

I have removed all the sensitive information.

slangley
23-Emerald II
(To:ranjank)

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

slangley
23-Emerald II
(To:slangley)

Hi @ranjank.

 

Since you advised in a different post that this issue was resolved, can you please provide some details of the resolution for the benefit of others on the community?

 

Regards.

 

--Sharon

ranjank
15-Moonstone
(To:slangley)

Hi @slangley 

 

I don't know what was the issue. Actually I was using Windows PowerShell to set AZURE_IOT_OPTS and run the azure-iot.bat file and on that, it was showing error but when I used Command Prompt and performed the same process it worked.

 

I have done nothing. It automatically got resolved.

Announcements


Top Tags