Problem with java edge server connecting to thingworx using https
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Problem with java edge server connecting to thingworx using https
I am using the java SDK and I am trying to connect to a Thingworx instance that is hosted over https. The same code works fine on other suvers that use only http. Here is a sample of my log:
6:15:41.766 DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: unpooled
16:15:41.803 DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetectionLevel: simple
16:15:41.871 DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - WebSocket Channel is connected is open: true
16:15:41.874 DEBUG i.n.h.c.h.w.WebSocketClientHandshaker13 - WebSocket version 13 client handshake key: tIy5pikEC5melbxc0YFh1g==, expected response: rTzhSyE5qQmM/0BPAUYu1q+ZG2E=
16:15:51.775 INFO c.t.c.c.c.n.NettyClientConnectionFactory - forcing underlying tcp channel closed is open: false, is active: false
16:15:51.776 ERROR c.t.c.c.e.ClientCommunicationEndpoint - Refilling connections on endpoint 0, uri: ws://maker01.ptcmanaged.com:443/Thingworx/WS failed : timeout waiting for websocket handshake to complete
16:15:51.776 INFO c.t.c.c.e.m.CommunicationEndpointMonitorTask - Endpoint reconnection was unsuccessful name: EP_0, id: 0
16:16:51.777 DEBUG c.t.c.c.e.m.CommunicationEndpointMonitorTask - CommunicationEndpoint Monitor - checking for disconnected endpoints
16:16:51.777 INFO c.t.c.c.e.m.CommunicationEndpointMonitorTask - Endpoint not connected name: EP_0, id: 0. Attempting connect...
1
I am calling
ClientConfigurator config = new ClientConfigurator();
config.setUri(address);
config.getSecurityClaims().addClaim(RESTAPIConstants.PARAM_APPKEY, appKey);
config.ignoreSSLErrors(true);
when I create my client. Is there anything else you can tell me that I could try to connect to this server.
It is using a self signed cert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Bill,
Secure WebSocket connections are made using wss://. Since you're using a self-signed certificate, you'll want to retain the config.ignoreSSLErrors(true).
Regards,
Adam