Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Anybody see the obvious in what I am missing here?
I start WSEMS on my Windows 7 machine with loglevel turned on to VERBOSE
It uses the following config.json (sensitive fields xxxxx’ed) and the websocket connects and is open up to the cloud platform.
{
"ws_servers": [{
"host": "xxxxx.cloud.thingworx.com",
"port": 443
}],
"ws_connection": {
"encryption": "ssl",
"verbose": true
},
"certificates": {
"validate": false
},
"appKey": "xxxx-xxxxxx-xxxxxxxx"
}
When I try to address the EMS from browser on the same machine as the EMS https://localhost:8000/ThingWorx/Things
Connection is refused and I see the following in the wsems trace:
[AUDIT] 2015-12-10 15:04:36,580 SDK: twWs_Connect: Websocket connected! <<-- Next two lines show the websocket connected (EMS is running)
[INFO ] 2015-12-10 15:04:36,674 Main: Succesfully connected. Saving .booted config file <<-- Assume all is well at this point...
[DEBUG] 2015-12-10 15:04:42,372 TlsStream:: doopen: Setting SO_RCVTIMEO <<-- This is what I get when try to connect with browser
[TRACE] 2015-12-10 15:04:42,372 TlsStream:: doopen: Non-SSL server socket opened
[TRACE] 2015-12-10 15:04:42,372 httpServer: Allocating new client: 1
[TRACE] 2015-12-10 15:04:42,372 client_thread::execute: Starting request handler thread 2
...
...
[DEBUG] 2015-12-10 15:04:42,372 TlsStream:: doclose: Disconnecting socket <<-- Eventually fails and Chrome web browser displays "SSL Connection Error"
...
Thanks,
Beck, under the certificates section, try adding the 'allow self signed' certificates section. Here is an example snippet:
"certificates": {
"validate": false,
"allow_self_signed": true
},
The connection settings for the websocket (which connects to the ThingWorx server) and the REST API are separate. The REST API defaults to listening on localhost:8000 as you are using, but it defaults to HTTP not HTTPS. You can enable HTTPS in config.json. Look at the "http_server" section.