Skip to main content
15-Moonstone
September 12, 2022
Solved

Raspberry pi ThingWorx SSL error

  • September 12, 2022
  • 1 reply
  • 2724 views

I have an error to communicate my raspberrypi with ThingWorx the same as the SSL error but I didn't enable this option how do I get the error out?

Best answer by wcui

Per below errors, it seems port 8000~8004 already used by other application on your raspberrypi OS.

     [ERROR] 2022-09-21 12:40:45,309 httpserver: Server socket error: Address already in use [*:8000]
    [ERROR] 2022-09-21 12:40:45,309 httpServer: unable to bind http server to port=8000, trying next port.

 

From you confg.json, I can see no port is configured with below settings. In this case, wsems.exe will use default 8000 port and if that fail it try next port by plus 1. I suggest to change to an available port then try restart EMS.

 

    "http_server": {
         "ssl": false,
        "authenticate": false
    },

    ---->

    "http_server": {
         "host": "localhost",
         "port": 8xxx,
         "ssl": false,
         "authenticate": false
},

1 reply

16-Pearl
September 15, 2022

Are you running WSEMS or Edge SDK app on respberrypi?

Can you give more details about the SSL error and what application you are using to communicate with ThingWorx?

MS_Santos15-MoonstoneAuthor
15-Moonstone
September 15, 2022

I'm using this link to do the procedure https://developer.thingworx.com/en/resources/guides/setup-raspberry-pi-iot-device/mlp-pi-connect-ems , I'm on step 6 , I'm giving the sudo command ./wsems

16-Pearl
September 18, 2022

I see below error in wsems log. Can you check if Port 8443 is correct and assure it is not blocked by firewall on TW server ?

you can try ping tw server and its port from raspberrypi to see if connection is possible or not.

    Unable to connect to server.

 

Also, you can try extend timeout settings, socket_read_timeout, connect_timeout,  per below link, 

http://support.ptc.com/help/thingworx/edge_microserver/en/#page/c_sdk/v5.4.0_c_ems_wsems_configuration_websocket.html

 

Besides, if you use self-signed cert on TW side, please add below setting to pass the check.

"http_server": {

    "allow_self_signed": true