Skip to main content
1-Visitor
February 19, 2019
Solved

EMS Launch Error :: SDK: twTlsClient_Create: Initializing TLS Client >> Illegal instruction

  • February 19, 2019
  • 2 replies
  • 4527 views

Hi,

getting below error while launching EMS,

[DEBUG] 2019-02-19 04:59:02,310 SDK: twWs_Create: Initializing Websocket Client for pp-1902162113g2.devportal.ptc.io:443//Thingworx/WS
[DEBUG] 2019-02-19 04:59:02,311 SDK: twTlsClient_Create: Initializing TLS Client
Illegal instruction

Below is my config file,

 

{
 "ws_servers": [
 {
 "host": "PP-1902162113g2.devportal.ptc.io",
 "port": 443
 }
 ],
 "http_server": {
 "host": "127.0.0.1",
 "port": 8080,
 "ssl": false,
 "authenticate": false
 },
 "appKey": "dd88bbe0-977a-4836-bff9-501fb4981046",
 "logger": {
 "level": "DEBUG"
 },
 "auto_bind": [
 {
 "name": "PiThing",
 "gateway": false
 }
 ],
 "certificates": {
 "validate": false,
 "allow_self_signed": true
 },
 "ws_connection" : {
 "encryption": "ssl",
 "verbose": true,
 "msg_timeout": 1000
 }
}

and below is terminal output after sudu ./wsems

 

pi@raspberrypi:~ $ cd ThingWorx/microserver/
pi@raspberrypi:~/ThingWorx/microserver $ sudo ./wsems
[FORCE] 2019-02-19 04:59:02,289 ./wsems: Initializing EMS ....
[FORCE] 2019-02-19 04:59:02,290 main: Using config file /home/pi/ThingWorx/microserver/etc/config.json
[INFO ] 2019-02-19 04:59:02,290 ./wsems: Creating the WsEms proxy.
[INFO ] 2019-02-19 04:59:02,290 ./wsems: Starting HTTP Server.
[INFO ] 2019-02-19 04:59:02,290 Main: Using custom certificate and private key for HTTP Server
[WARN ] 2019-02-19 04:59:02,290 Main: Encryption is disabled on HTTP Server.
[WARN ] 2019-02-19 04:59:02,290 Main: Authentication is disabled on the HTTP Server.
[INFO ] 2019-02-19 04:59:02,302 ./wsems: Initializing the ThingWorx REST interface.
[INFO ] 2019-02-19 04:59:02,303 wsEmsProxy::initialize: FIPS is disabled.
[INFO ] 2019-02-19 04:59:02,303 wsEmsProxy::initialize: Encryption is enabled on Web Socket connection.
[WARN ] 2019-02-19 04:59:02,306 SDK: SDK Version: 2.0.4
[FORCE] 2019-02-19 04:59:02,306 httpServer: starting http server port=8080
[DEBUG] 2019-02-19 04:59:02,307 httpServer: http server bound to port=8080.
[WARN ] 2019-02-19 04:59:02,310 SDK: TLS Library: OpenSSL
[WARN ] 2019-02-19 04:59:02,310 SDK: TLS Library Version: 1.0.2l
[WARN ] 2019-02-19 04:59:02,310 SDK: FIPS Capable
[DEBUG] 2019-02-19 04:59:02,310 SDK: twWs_Create: Initializing Websocket Client for pp-1902162113g2.devportal.ptc.io:443//Thingworx/WS
[DEBUG] 2019-02-19 04:59:02,311 SDK: twTlsClient_Create: Initializing TLS Client
Illegal instruction

Please suggest if there is any error is config file, or any other setting I am missing.

Best answer by KedarK

Hi Evgeny,

 

I have downgraded the Rasbian OS to Jessie (latest is Stretch) and also I am now using ThingWorx instance installed at localhost instead of a hosted instance provided by PTC.

You can find older Raspbian images at http://downloads.raspberrypi.org/raspbian/images/

 

Let me know if this works for you too.

 

Regards,

Kedar.

2 replies

5-Regular Member
February 22, 2019

Hello,

 

How has the SDK been compiled / where was it downloaded from?

Was it cross compiled without setting the correct architecture?

If you have any build script, please post it here.

 

Illegal Instruction means that the assembly can't be used or isn't known in the current hardware architecture.

In other words the binary is incompatible with your current hardware.

 

Thanks in advance.

 

Regards,

Pascal

KedarK1-VisitorAuthor
1-Visitor
February 22, 2019

Hello @pgrodowski ,

 

Thank-you for reply.

Actually, I am trying to connect my raspberry Pi device to ThingWorx using instructions provided in a project (refer link below.)

https://developer.thingworx.com/en/resources/guides/thingworx-raspberry-pi-quickstart/setup-raspberry-pi

 

There is a step, in which I need to install Edge Microserver (EMS) to my raspberry device.

So to install the EMS, an executable is provided named "wsems" and also in the same folder there are couple of libraries provided, 1. "libssl.so.1.0.0" and 2. "libcrypto.so.1.0.0"

If I am correct, the executable is not referring to provided libraries and instead it is referring to same libraries with different version somewhere in my local storage.

I tried to set LD_LIBRARY_PATH variable, but still failed to install server.

 

wsems executable uses the config.json file for required parameters which I have provided in my original post and also there is output received after running the executable.

 

 Please suggest, is my assumption highlighted above is correct, or the binary (executable) itself is not compatible with the hardware I am using.

 

Regards,

Kedar.

5-Regular Member
February 22, 2019

Hi Kedar,

Are you running the Raspbian OS on your device?

https://www.raspberrypi.org/downloads/raspbian

 

1-Visitor
March 12, 2019

Hi @KedarK,

 

Have you found a solution to this issue?

 

We now have the same problem.

 

Regards,
Evgeny

KedarK1-VisitorAuthorAnswer
1-Visitor
March 12, 2019

Hi Evgeny,

 

I have downgraded the Rasbian OS to Jessie (latest is Stretch) and also I am now using ThingWorx instance installed at localhost instead of a hosted instance provided by PTC.

You can find older Raspbian images at http://downloads.raspberrypi.org/raspbian/images/

 

Let me know if this works for you too.

 

Regards,

Kedar.

1-Visitor
March 12, 2019

Hi Kedar,

 

Thank you very much for your answer.

 

We just use the Raspbian OS version of Stretch.

 

Regard,

Evgeny