Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Dear Community,
I have my thingworx 8.1 set up on port 8001. And I'm trying to establish a web socket connection through Java SDK. I've created a RemoteThing on Thingworx and configured the usergroup, appKey etc. When I execute the Java client, the following is displayed on my console:
08:43:14.280 [main] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Buffer.address: unavailable
08:43:14.281 [main] DEBUG i.n.util.internal.PlatformDependent - Platform: Windows
08:43:14.281 [main] DEBUG i.n.util.internal.PlatformDependent - Java version: 8
08:43:14.281 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noUnsafe: false
08:43:14.281 [main] DEBUG i.n.util.internal.PlatformDependent - sun.misc.Unsafe: unavailable
08:43:14.306 [main] DEBUG i.n.util.internal.PlatformDependent - maxDirectMemory: 17163091968 bytes (maybe)
08:43:14.306 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noJavassist: false
08:43:14.307 [main] DEBUG i.n.util.internal.PlatformDependent - Javassist: unavailable
08:43:14.307 [main] DEBUG i.n.util.internal.PlatformDependent - You don't have Javassist in your class path or you don't have enough permission to load dynamically generated classes. Please check the configuration for better performance.
08:43:14.307 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.tmpdir: C:\Users\sharihar\AppData\Local\Temp (java.io.tmpdir)
08:43:14.307 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
08:43:14.308 [main] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: true
08:43:14.308 [main] INFO i.n.util.internal.PlatformDependent - Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system unstability.
08:43:14.326 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
08:43:14.326 [main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
08:43:14.446 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 32
08:43:14.446 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 32
08:43:14.446 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
08:43:14.446 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
08:43:14.446 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
08:43:14.446 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512
08:43:14.446 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
08:43:14.446 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
08:43:14.446 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
08:43:14.447 [main] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
08:43:14.457 [main] INFO c.t.c.c.p.ClientMessageProcessor - Created new ClientMessageProcessor [minPoolSize: 4, maxPoolSize: 10, maxThreadLife: 10000, maxQueueSize: 1000]
08:43:14.458 [main] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Initializing CommunicationEndpoint Connection Monitor...
08:43:14.461 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Resetting duty cycle
08:43:14.461 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.m.ConnectivityMonitorTask - Entering duty cycle ON
08:43:14.461 [Client-EndpointMonitor-1] INFO c.t.c.c.e.m.ConnectivityMonitorTask - Endpoint not connected [name: EP_0, id: 0]. Attempting [re]connect...
08:43:14.461 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.ClientCommunicationEndpoint - Clearing endpoint authentication data [id: 0]
08:43:14.461 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Needed to refill connections on client endpoint [id: 0] : [active: 0, max: 1]
08:43:14.484 [Client-EndpointMonitor-1] DEBUG i.n.util.internal.ThreadLocalRandom - -Dio.netty.initialSeedUniquifier: 0xb1d6b10b73ba3cdb (took 6 ms)
08:43:14.512 [Client-EndpointMonitor-1] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: unpooled
08:43:14.512 [Client-EndpointMonitor-1] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 65536
08:43:14.554 [NettyClient-NIO-1] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetectionLevel: simple
08:43:14.577 [NettyClient-NIO-1] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - WebSocket Channel is connected [is open: true]
08:43:14.580 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocketClientHandshaker13 - WebSocket version 13 client handshake key: pLqYctpqgln7KRTk5gzgVw==, expected response: wLVdOArGCqi9OfO6hOsa4fyO9W8=
08:43:14.584 [NettyClient-NIO-1] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacity.default: 262144
08:43:14.620 [NettyClient-NIO-1] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - [ClientHandler: 1738222896] Client websocket handshake is complete
08:43:14.622 [Client-EndpointMonitor-1] INFO c.t.c.c.e.ClientCommunicationEndpoint - Preparing new Connection Authentication Request: DispatchingClientEndpoint [id: 0, isConnected: false, open connections: 0, max connections: 1]
08:43:14.623 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.CommunicationEndpoint - Sending connection authentication message, waiting for response [sync key: 1, message: AuthRequestMessage [requestId: 1, endpointId: -1, sessionId: -1, method: AUTHREQUEST]]
08:43:14.627 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=60
08:43:14.628 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2
08:43:14.629 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=17
08:43:14.632 [NettyClient-NIO-1] ERROR c.t.c.c.c.n.ThingworxClientConnectionHandler - WebSocket error: Invalid Protocol Version [71], closing connection!
08:43:44.486 [main] WARN c.t.s.s.SampleRemoteThingClient - Client not connected
08:43:44.486 [main] INFO c.t.s.s.SampleRemoteThingClient - SampleRemoteThingClient has completed execution
Please help me figure out the issue.
It seems you may be missing some packages.
You may also check for javassist jar being present in the class path.
Hi Polina,
Could you please tell me what packages are missing?
Also, I just checked for javassist.jar in classpath and it wasn't present. Let me know if I've added it the way I should.
It's still the same result.