Error implementing EMS on Raspberry Pi
I have a localhost Thingworx on my laptop;
http://localhost:8080/Thingworx
I setup a local EMS\LSR and successfully binded to my TestRemoteThing1 and updated the property.
Following the guide for "Connect Raspberry Pi to ThingWorx" in setup my Raspberry, installed and configured EMS\LSR and ran into the following issue:
Running the EMS with Auto Bind:
The Remote Monitor shows that my TestRemoteThing1 I green and ok.
"Error opening non-TLS socket [127.0.0.1:8001]"
"Error executing request on Things/TestRemoteThing1/Services/NotifyPropertyUpdate"
pi@raspberrypi:~/microserver $ sudo ./wsems
[FORCE] 2018-06-24 15:12:42,229 ./wsems: Initializing EMS ....
[FORCE] 2018-06-24 15:12:42,229 main: Using config file /home/pi/microserver/etc/config.json
[INFO ] 2018-06-24 15:12:42,229 ./wsems: Creating the WsEms proxy.
[INFO ] 2018-06-24 15:12:42,229 ./wsems: Starting HTTP Server.
[INFO ] 2018-06-24 15:12:42,229 Main: Using built-in certificate for HTTP Server
[WARN ] 2018-06-24 15:12:42,229 Main: Encryption is disabled on HTTP Server.
[WARN ] 2018-06-24 15:12:42,229 Main: Authentication is disabled on the HTTP Server.
[FORCE] 2018-06-24 15:12:42,229 httpServer: starting http server port=8000
[INFO ] 2018-06-24 15:12:42,229 ./wsems:
[INFO ] 2018-06-24 15:12:42,229 wsEmsProxy::initialize: FIPS is disabled.
[INFO ] 2018-06-24 15:12:42,229 wsEmsProxy::initialize: Encryption is disabled on Web Socket connection.
[WARN ] 2018-06-24 15:12:42,230 SDK: SDK Version: 2.0.4
[WARN ] 2018-06-24 15:12:42,230 SDK: TLS Library: OpenSSL
[WARN ] 2018-06-24 15:12:42,230 SDK: TLS Library Version: 1.0.2l
[WARN ] 2018-06-24 15:12:42,230 SDK: FIPS Capable
[INFO ] 2018-06-24 15:12:42,278 WsProxy::initialize: EMS Version 5.4.0.114
[INFO ] 2018-06-24 15:12:42,278 WsProxy::initialize: twApi singleton initialized
[WARN ] 2018-06-24 15:12:42,278 WsProxy::initialize: Certificate validation is disabled.
[WARN ] 2018-06-24 15:12:42,278 WsProxy::initialize: Self signed certificates are enabled.
[ERROR] 2018-06-24 15:12:42,280 SDK: twMap_Add: parse function returned null.
[WARN ] 2018-06-24 15:12:42,281 WsEmsProxy::bindThing: Exception connecting to localhost:8001. Err: Connection refused [localhost:8001]
[WARN ] 2018-06-24 15:12:42,281 WsEmsProxy::bindThing: Changing host from 'localhost' to '127.0.0.1'
[INFO ] 2018-06-24 15:12:42,281 WsEmsProxy::registerVirtualDirs: Adding virtual dir logs: /home/pi/microserver/logs
[INFO ] 2018-06-24 15:12:42,282 WsEmsProxy::registerVirtualDirs: Adding virtual dir instruction: /home/pi/microserver/instruction
[INFO ] 2018-06-24 15:12:42,282 wsEmsProxy::initialize: Initialization complete!
[INFO ] 2018-06-24 15:12:42,282 ./wsems: Starting the connection.
192.168.0.49:8080-->[INFO ] 2018-06-24 15:12:42,319 SDK: twWs_Connect: Websocket connected!
[WARN ] 2018-06-24 15:12:42,384 SDK: twBindBody_Delete: NULL body or stream pointer
[INFO ] 2018-06-24 15:12:42,433 Main: Succesfully connected. Saving .booted config file
[ERROR] 2018-06-24 15:12:43,457 UnencryptedClientStream::doopen: Error opening socket. Error: 111
[ERROR] 2018-06-24 15:12:43,457 HttpClient::initialize: Exception while opening connection request to 127.0.0.1. Error: Error opening non-TLS socket [127.0.0.1:8001]
[ERROR] 2018-06-24 15:12:43,458 emsRequestHandler: Error executing request on Things/TestRemoteThing1/Services/NotifyPropertyUpdate
[ERROR] 2018-06-24 15:12:53,93 UnencryptedClientStream::doopen: Error opening socket. Error: 111
[ERROR] 2018-06-24 15:12:53,93 HttpClient::initialize: Exception while opening connection request to 127.0.0.1. Error: Error opening non-TLS socket [127.0.0.1:8001]
[ERROR] 2018-06-24 15:12:53,93 emsRequestHandler: Error executing request on Things/TestRemoteThing1/Properties/TestProperty
My config.lua;
"host": "192.168.0.49",
"port": 8080
}
],
"logger": {
"level": "INFO",
"publish_level": "INFO",
"max_file_storage": 2000000,
"publish_directory": "logs",
"auto_flush": true,
"flush_chunk_size": 16384,
"buffer_size": 4096
},
"host": "localhost",
"port": 8000,
"ssl": false,
"authenticate": false,
"content_read_timeout": 20000,
"ports_to_try": 10,
"max_clients": 15,
"use_default_certificate" : true
},
"enabled": false
},
"encryption": "none",
"verbose": false,
"binary_mode": false,
"msg_timeout": 5000,
"ping_rate": 55000,
"pingpong_timeout": 10000,
"connect_period": 60000,
"duty_cycle": 100,
"message_idle_time": 50,
"max_msg_size": 1048576,
"message_chunk_size": 8192,
"max_frame_size": 8192,
"max_messages": 500,
"connect_on_demand": false,
"connect_timeout": 10000,
"connect_retry_interval": 10000,
"max_threads": 4,
"max_connect_delay": 0,
"socket_read_timeout": 100,
"frame_read_timeout": 10000,
"ssl_read_timeout": 500,
"connect_retries": -1
},
"auto_bind": [{
"name": "TestRemoteThing1",
"gateway": false
}],
"certificates": {
"validate": false,
"allow_self_signed": true
},
"file": {
"virtual_dirs": [
{"logs": "logs"},
{"instruction":"instruction"}
],
"staging_dir": "/home/pi/microserver/staging/staging"
}
I am stuck on this and really could use some help and ideas
Thanks
Dave

