6 Replies Latest reply on Jan 15, 2018 8:51 AM by jnair RSS
    jnair Explorer

    Thingworx Java Edge SDK connection error

    Dear Thingworx Community members,

    I am trying write a Thingworx Java Edge SDK example in an OSGi environment. My example is based on the Weather application given in the Thingworx academic resource page.

    During the initial connection negotiations I am getting an error "Invalid Protocol Version".  Given below is the log:


    8:33:22.481 [NettyClient-NIO-41] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=2 length=60

    08:33:22.506 [NettyClient-NIO-41] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=2

    08:33:22.507 [NettyClient-NIO-41] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=17

    08:33:22.508 [NettyClient-NIO-41] ERROR c.t.c.c.c.n.ThingworxClientConnectionHandler - WebSocket error: Invalid Protocol Version [71], closing connection!

    08:33:23.729 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.m.CommunicationEndpointMonitorTask - CommunicationEndpoint Monitor - checking for disconnected endpoints

    08:33:23.730 [Client-EndpointMonitor-1] INFO  c.t.c.c.e.m.CommunicationEndpointMonitorTask - Endpoint not connected [name: Am2302Thing, id: 0]. Attempting [re]connect...

    08:33:23.730 [Client-EndpointMonitor-1] DEBUG c.t.c.c.e.ClientCommunicationEndpoint - Clearing endpoint authentication data [id: 0]

    08:33:23.731 [Client-EndpointMonitor-1] INFO  c.t.c.c.e.ClientCommunicationEndpoint - Needed to refill connections on client endpoint [id: 0] : [active: 0, max: 1]

    08:33:24.746 [Client-EndpointMonitor-1] INFO  c.t.c.c.c.n.NettyClientConnectionFactory - forcing underlying tcp channel closed [is open: true, is active: false]

    08:33:24.747 [Client-EndpointMonitor-1] ERROR c.t.c.c.e.ClientCommunicationEndpoint - Refilling connections on [endpoint 0, uri: ws://] failed : timeout waiting for websocket handshake to complete


    Does anybody have an idea what’s causing this error?

    Any help would be appreciated.


    Best Regards,