Skip to main content
1-Visitor
April 5, 2016
Question

Latest C-SDK Version - Error creating BSD socket to be used for the websocket

  • April 5, 2016
  • 1 reply
  • 3325 views

We have a deployed Thingworx server on a Linode, running TW 6.0.3 with a certificate installed.

I've downloaded the latest C-SDK from the marketplace version 1-3-1-957 which also was supposed to solve the BSD bug:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS227278&lang=en&source=snippet

However, I still keep getting it. Any ideas on what is going on?. The Edge is a uClinux machine.

root:/> Starting ThingWorx ...

[FORCE] 2016-04-04 21:12:15,217: Starting up

[DEBUG] 2016-04-04 21:12:15,218: twWs_Create: Initializing Websocket Client for https://xxxxxxxxxxxxxxxxx:443//Thingworx/WS

[DEBUG] 2016-04-04 21:12:15,218: twTlsClient_Create: Initializing TLS Client

[DEBUG] 2016-04-04 21:12:15,992: twTlsClient_Close: Disconnecting from server

[ERROR] 2016-04-04 21:12:15,993: twWs_Create: Error creating BSD socket to be used for the websocket

[ERROR] 2016-04-04 21:12:15,993: twApi_Initialize: Error creating websocket structure, retrying

[DEBUG] 2016-04-04 21:12:20,997: twWs_Create: Initializing Websocket Client for https://xxxxxxxxxxxxxxx:443//Thingworx/WS

[DEBUG] 2016-04-04 21:12:20,997: twTlsClient_Create: Initializing TLS Client

[DEBUG] 2016-04-04 21:12:22,789: twTlsClient_Close: Disconnecting from server

[ERROR] 2016-04-04 21:12:22,789: twWs_Create: Error creating BSD socket to be used for the websocket

[ERROR] 2016-04-04 21:12:22,789: twApi_Initialize: Error creating websocket structure, retrying

[DEBUG] 2016-04-04 21:12:27,792: twWs_Create: Initializing Websocket Client for https://xxxxxxxxxxxxxxxx:443//Thingworx/WS

[DEBUG] 2016-04-04 21:12:27,792: twTlsClient_Create: Initializing TLS Client

[DEBUG] 2016-04-04 21:12:29,340: twTlsClient_Close: Disconnecting from server

[ERROR] 2016-04-04 21:12:29,340: twWs_Create: Error creating BSD socket to be used for the websocket

[ERROR] 2016-04-04 21:12:29,340: twApi_Initialize: Error creating websocket structure, retrying

root:/> [DEBUG] 2016-04-04 21:12:34,344: twWs_Create: Initializing Websocket Client for https://xxxxxxxxxxxxxxxxx:443//Thingworx/WS

[DEBUG] 2016-04-04 21:12:34,344: twTlsClient_Create: Initializing TLS Client

[DEBUG] 2016-04-04 21:12:35,547: twTlsClient_Close: Disconnecting from server

[ERROR] 2016-04-04 21:12:35,547: twWs_Create: Error creating BSD socket to be used for the websocket

[ERROR] 2016-04-04 21:12:35,547: twApi_Initialize: Could not connect after 3 attempts

1 reply

5-Regular Member
April 5, 2016

Gerard, is there a proxy server in place? Or are the connections going through a specific firewall? Would it be possible for you to check if they support websockets or not?

gseq1-VisitorAuthor
1-Visitor
April 5, 2016

I'll have to check with the server admin.

I can connect to a  local TW server(without TLS) fine.

EMS is not a pre-requisite, correct?

5-Regular Member
April 5, 2016

If it works correctly with a local connection, but doesn't externally, we would need to check your network settings, mainly around firewall type or proxy involved. The BSD socket error is more or less generic, so we can't exactly pinpoint on where the issue could be, but checking the network settings would be a great starting point.

I didn't get your prerequisite point though - you can use either the EMS or the C SDK to connect.