cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to connect EMS to ThingWorx Composer without SSL

apdams
12-Amethyst

How to connect EMS to ThingWorx Composer without SSL

 I am following the IoT Connectivity with Thingworx course and am trying to configure the json file for EMS to connect to my Thingworx server. It is running on http (no SSL). This is what I currently have in the json file.

{
    "ws_servers":    [{
            "host":    "http://192.168.1.170",
            "port":    80
        }],
    "appKey":    "ad2d631b-d6fe-45f0-a892-6dbc500fd339",
    "logger":   {
        "level":    "TRACE"
    },
    "certificates": {
        "validate": false
    },
    "http_server" : {
        "host": "localhost",
        "port":    8080,
        "ssl" : false,
        "authenticate": false        
    }
}

 

This is the error:

 

[WARN ] 2018-10-19 13:05:55,846 SDK: SDK Version: 2.0.4
[WARN ] 2018-10-19 13:05:55,847 SDK: TLS Library: OpenSSL
[WARN ] 2018-10-19 13:05:55,847 SDK: TLS Library Version: 1.0.2l
[WARN ] 2018-10-19 13:05:55,847 SDK: FIPS Capable
[DEBUG] 2018-10-19 13:05:55,847 SDK: twWs_Create: Initializing Websocket Client
for http://192.168.1.170:80//Thingworx/WS
[DEBUG] 2018-10-19 13:05:55,847 SDK: twTlsClient_Create: Initializing TLS Client

[TRACE] 2018-10-19 13:05:55,848 SDK: twSocket_Close: closing socket: 0, socket i
nfo - host: http://192.168.1.170, port: 80, proxyHost: NULL, proxyPort: 0, state
: 0
[DEBUG] 2018-10-19 13:05:55,848 SDK: twTlsClient_Close: Disconnecting from serve
r
[ERROR] 2018-10-19 13:05:55,848 SDK: twWs_Create: Error creating BSD socket to b
e used for the websocket
[ERROR] 2018-10-19 13:05:55,848 SDK: twApi_Initialize: Error creating websocket
structure, retrying
[FORCE] 2018-10-19 13:05:56,0 httpServer: starting http server port=8080
[DEBUG] 2018-10-19 13:05:56,3 httpServer: http server bound to port=8080.
[DEBUG] 2018-10-19 13:06:00,849 SDK: twWs_Create: Initializing Websocket Client
for http://192.168.1.170:80//Thingworx/WS
[DEBUG] 2018-10-19 13:06:00,849 SDK: twTlsClient_Create: Initializing TLS Client

[TRACE] 2018-10-19 13:06:00,849 SDK: twSocket_Close: closing socket: 0, socket i
nfo - host: http://192.168.1.170, port: 80, proxyHost: NULL, proxyPort: 0, state
: 0
[DEBUG] 2018-10-19 13:06:00,849 SDK: twTlsClient_Close: Disconnecting from serve
r
[ERROR] 2018-10-19 13:06:00,849 SDK: twWs_Create: Error creating BSD socket to b
e used for the websocket
[ERROR] 2018-10-19 13:06:00,849 SDK: twApi_Initialize: Error creating websocket
structure, retrying

 

 

Any ideas?

Adrian

ACCEPTED SOLUTION

Accepted Solutions
apdams
12-Amethyst
(To:apdams)

I have a config file that works. Problem now solved:

{
  "ws_servers": [{
    "host": "192.168.1.170",
    "port": 80
  }],
  "appKey": "f9efc9d8-1836-4a44-a8cb-1cb599bd4a49",
  "logger": {
    "level": "DEBUG"
  },
  "certificates": {
    "validate": false,
    "allow_self_signed": true
  },
  "ws_connection": {
    "encryption": "none",
    "verbose": true
  },
  "http_server" : {
        "host": "localhost",
        "port": 8084,    
        "ssl": false,
        "content_read_timeout": 20000,
    "authenticate": false
  }
}

View solution in original post

15 REPLIES 15
CRArko
17-Peridot
(To:apdams)

Hello.

 

If you just try connecting to tomcat (not ThingWorx) are you able to? And that is on port 8080, yes?

 

 

Thank you for using our community.

 

-- Craig A.

apdams
12-Amethyst
(To:CRArko)

Hi Craig

Well, I will try to respond correctly here. To be  honest, I did not install our Thingworx server, so don't know that much about it. I will also admit I just chose port 8080 in an attempt to solve the problem. I am not purposely trying to connect to tomcat, if that listens on port 8080. I just want a WS connection for EMS.

 

At any rate, if I try to connect to port 8080 in a browser on my ems machine, it fails. I hope that answers your question.

 

If I try another port (eg port 81), I get this error:

 

[WARN ] 2018-10-19 13:28:07,634 SDK: SDK Version: 2.0.4
[WARN ] 2018-10-19 13:28:07,634 SDK: TLS Library: OpenSSL
[WARN ] 2018-10-19 13:28:07,634 SDK: TLS Library Version: 1.0.2l
[WARN ] 2018-10-19 13:28:07,634 SDK: FIPS Capable
[DEBUG] 2018-10-19 13:28:07,634 SDK: twWs_Create: Initializing Websocket Client
for http://192.168.1.170:80//Thingworx/WS
[DEBUG] 2018-10-19 13:28:07,634 SDK: twTlsClient_Create: Initializing TLS Client

[TRACE] 2018-10-19 13:28:07,635 SDK: twSocket_Close: closing socket: 0, socket i
nfo - host: http://192.168.1.170, port: 80, proxyHost: NULL, proxyPort: 0, state
: 0
[DEBUG] 2018-10-19 13:28:07,635 SDK: twTlsClient_Close: Disconnecting from serve
r
[ERROR] 2018-10-19 13:28:07,635 SDK: twWs_Create: Error creating BSD socket to b
e used for the websocket
[ERROR] 2018-10-19 13:28:07,635 SDK: twApi_Initialize: Error creating websocket
structure, retrying
[FORCE] 2018-10-19 13:28:07,780 httpServer: starting http server port=81
[DEBUG] 2018-10-19 13:28:07,785 httpServer: http server bound to port=81.
[DEBUG] 2018-10-19 13:28:12,636 SDK: twWs_Create: Initializing Websocket Client
for http://192.168.1.170:80//Thingworx/WS
[DEBUG] 2018-10-19 13:28:12,636 SDK: twTlsClient_Create: Initializing TLS Client

[TRACE] 2018-10-19 13:28:12,636 SDK: twSocket_Close: closing socket: 0, socket i
nfo - host: http://192.168.1.170, port: 80, proxyHost: NULL, proxyPort: 0, state
: 0
[DEBUG] 2018-10-19 13:28:12,636 SDK: twTlsClient_Close: Disconnecting from serve
r
[ERROR] 2018-10-19 13:28:12,636 SDK: twWs_Create: Error creating BSD socket to b
e used for the websocket
[ERROR] 2018-10-19 13:28:12,636 SDK: twApi_Initialize: Error creating websocket
structure, retrying

CRArko
17-Peridot
(To:apdams)

Let's try the simple things first; are there any proxy servers or firewalls that might be interfering with communications on those ports?

 

 

-- Craig A.

apdams
12-Amethyst
(To:CRArko)

The machines are on the same subnet, so I would say there is no firewall or proxy between them


Adrian

CRArko
17-Peridot
(To:apdams)

Understood. Which version of the EMS is this? And the SDK version in use? I find instances of similar errors that have reportedly been fixed in later versions. Let's make sure you have those versions.

 

Thanks,

 

-- Craig A.

apdams
12-Amethyst
(To:CRArko)

I got the ems from this:

MED-61060-CD-054_F000_Microserver-Windows-x86-32-openssl-5-4-0-114

The Thingworx platform appears to be version 8.

Not sure about the SDK.

You said:

"if I try to connect to port 8080 in a browser on my ems machine, it fails"

Have you been able to successfully browse to your Thingworx instance? If so, what is the URL you used? The EMS will be able to connect at the same IP and port you used to browse to Thingworx.

If you can browse to Thingworx with:

http://192.168.1.170/Thingworx

Use these settings for the EMS: 

"host": "192.168.1.170",
"port": "80"

If you can browse to Thingworx with:

(note the extra s) https://192.168.1.170/Thingworx

Use these settings for the EMS:

"host": "192.168.1.170",
"port": "443"

 

Also be sure to delete the .booted file between changes to your config.json file so you are not fooled by a syntax errors in your config file causing the EMS to use the last successfully parsed config file.

 

The config file below can be used as a template to connect with the free 30 day trial instances available at developer.thingworx.com

 

 

{
  "ws_servers": [{
  "host": "pp-18090513391s.devportal.ptc.io",
  "port": 443
}],
"appKey": "981b0d67-da01****-8007-01b9c30260b6",

"logger": {
   "level":"DEBUG"
},

"ws_connection": {
  "encryption": "ssl",
  "verbose": true
},

"http_server": {

  "ssl": false,
  "authenticate": false
},

"certificates": {
"validate": false,
"allow_self_signed": true
}

}

Hi

 

The error has changed and it looks like it is going further, but still not to the end.

 

I can browse to Thingworx using the http url (not https). So I use port 80.


Following your suggestions, this is my config file

 

{
    "ws_servers":    [{
            "host":    "192.168.1.170",
            "port":    80
        }],
    "appKey":    "ad2d631b-d6fe-45f0-a892-6dbc500fd339",
    "logger":   {
        "level":    "DEBUG",
"publish_directory":"logs"
    },
    "certificates": {
        "validate": false        
    },
    "http_server" : {
        
        "ssl" : false,
"authenticate": false        
    }
}

 

There is no config.booted file, so that's okay

 

The debug trace below makes sense right up to near the end where it says this:

[DEBUG] 2018-10-19 16:39:16,384 SDK: twTlsClient_Reconnect: Re-establishing SSL
context

 

Why is it trying to establish SSL?

 

This is the latest debug trace.

[FORCE] 2018-10-19 16:39:16,248 wsems: Initializing EMS ....
[FORCE] 2018-10-19 16:39:16,248 main: Using config file C:\EMS\microserver\etc\c
onfig.json
[INFO ] 2018-10-19 16:39:16,248 wsems: Creating the WsEms proxy.
[INFO ] 2018-10-19 16:39:16,248 wsems: Starting HTTP Server.
[INFO ] 2018-10-19 16:39:16,249 Main: Using custom certificate and private key f
or HTTP Server
[WARN ] 2018-10-19 16:39:16,249 Main: Encryption is disabled on HTTP Server.
[WARN ] 2018-10-19 16:39:16,249 Main: Authentication is disabled on the HTTP Ser
ver.
[INFO ] 2018-10-19 16:39:16,249 wsems: Initializing the ThingWorx REST interface
.
[INFO ] 2018-10-19 16:39:16,249 wsEmsProxy::initialize: FIPS is disabled.
[INFO ] 2018-10-19 16:39:16,249 wsEmsProxy::initialize: Encryption is enabled on
 Web Socket connection.
[WARN ] 2018-10-19 16:39:16,249 SDK: SDK Version: 2.0.4
[WARN ] 2018-10-19 16:39:16,249 SDK: TLS Library: OpenSSL
[WARN ] 2018-10-19 16:39:16,249 SDK: TLS Library Version: 1.0.2l
[WARN ] 2018-10-19 16:39:16,249 SDK: FIPS Capable
[DEBUG] 2018-10-19 16:39:16,249 SDK: twWs_Create: Initializing Websocket Client
for 192.168.1.170:80//Thingworx/WS
[DEBUG] 2018-10-19 16:39:16,249 SDK: twTlsClient_Create: Initializing TLS Client

[FORCE] 2018-10-19 16:39:16,252 httpServer: starting http server port=8000
[DEBUG] 2018-10-19 16:39:16,255 httpServer: http server bound to port=8000.

192.168.1.170:80-->[DEBUG] 2018-10-19 16:39:16,306 SDK: twApi_Initialize: Websoc
ket Established after 0 tries
[DEBUG] 2018-10-19 16:39:16,307 SDK: subscribedPropsMgr_Initialize: Initializing
 subscribed properties manager
[INFO ] 2018-10-19 16:39:16,307 WsProxy::initialize: EMS Version 5.4.0.114
[INFO ] 2018-10-19 16:39:16,307 WsProxy::initialize: twApi singleton initialized

[WARN ] 2018-10-19 16:39:16,307 WsProxy::initialize: Certificate validation is d
isabled.
[DEBUG] 2018-10-19 16:39:16,307 jsonConfigurator::getJsonEntity: Key validation_
criteria not found
[DEBUG] 2018-10-19 16:39:16,307 jsonConfigurator::getJsonEntity: Parent file not
 found
[DEBUG] 2018-10-19 16:39:16,307 SDK: twTunnelManager_Create: Tunnel Manager sing
leton already exists
[ERROR] 2018-10-19 16:39:16,307 SDK: twMap_Add: parse function returned null.
[DEBUG] 2018-10-19 16:39:16,307 jsonConfigurator::getJsonEntity: Key auto_bind n
ot found
[INFO ] 2018-10-19 16:39:16,307 wsEmsProxy::initialize: Initialization complete!

[INFO ] 2018-10-19 16:39:16,308 wsems: Starting the connection.
[DEBUG] 2018-10-19 16:39:16,384 SDK: twTlsClient_Reconnect: Re-establishing SSL
context
[DEBUG] 2018-10-19 16:39:16,385 SDK: twTlsClient_Connect: Connecting to server
[ERROR] 2018-10-19 16:39:16,386 SDK: TW_NEW_SSL_CLIENT: SSL handshake error. Err
or: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol.
[ERROR] 2018-10-19 16:39:16,386 SDK: Error intializing SSL connection
[ERROR] 2018-10-19 16:39:16,386 SDK: twWs_Connect: Error restarting socket.  Err
or 0

 

 

The EMS will connect to the platform using SSL by default. You need to add this to the config:

 

"ws_connection": {
  "encryption": "none"
}

 

EMS encryption configuration

 

Here's the latest config

 

{
    "ws_servers":    [{
            "host":    "http://192.168.1.170",
            "port":    80
        }],
    "appKey":    "ad2d631b-d6fe-45f0-a892-6dbc500fd339",
    "logger":   {
        "level":    "DEBUG",
"publish_directory":"logs"
    },
    "certificates": {
        "validate": false
            
    },
    "ws_connection": {
        "encryption": "none"
    },
    "http_server" : {
        "ssl" : false,
"authenticate": false        
    }
}

 

Still fails, though. I should add this, in case it is relevant. When I browse to http://http://192.168.1.170/Thingworx I get prompted for username/pwd. Is that an issue?

 

[FORCE] 2018-10-19 18:08:31,956 wsems: Initializing EMS ....
[FORCE] 2018-10-19 18:08:31,956 main: Using config file C:\EMS\microserver\etc\c
onfig.json
[INFO ] 2018-10-19 18:08:31,956 wsems: Creating the WsEms proxy.
[INFO ] 2018-10-19 18:08:31,956 wsems: Starting HTTP Server.
[INFO ] 2018-10-19 18:08:31,956 Main: Using custom certificate and private key f
or HTTP Server
[WARN ] 2018-10-19 18:08:31,956 Main: Encryption is disabled on HTTP Server.
[WARN ] 2018-10-19 18:08:31,956 Main: Authentication is disabled on the HTTP Ser
ver.
[INFO ] 2018-10-19 18:08:31,956 wsems: Initializing the ThingWorx REST interface
.
[INFO ] 2018-10-19 18:08:31,956 wsEmsProxy::initialize: FIPS is disabled.
[INFO ] 2018-10-19 18:08:31,956 wsEmsProxy::initialize: Encryption is disabled o
n Web Socket connection.
[WARN ] 2018-10-19 18:08:31,956 SDK: SDK Version: 2.0.4
[WARN ] 2018-10-19 18:08:31,956 SDK: TLS Library: OpenSSL
[WARN ] 2018-10-19 18:08:31,956 SDK: TLS Library Version: 1.0.2l
[WARN ] 2018-10-19 18:08:31,956 SDK: FIPS Capable
[DEBUG] 2018-10-19 18:08:31,956 SDK: twWs_Create: Initializing Websocket Client
for http://192.168.1.170:80//Thingworx/WS
[DEBUG] 2018-10-19 18:08:31,956 SDK: twTlsClient_Create: Initializing TLS Client

[DEBUG] 2018-10-19 18:08:31,958 SDK: twTlsClient_Close: Disconnecting from serve
r
[ERROR] 2018-10-19 18:08:31,958 SDK: twWs_Create: Error creating BSD socket to b
e used for the websocket
[ERROR] 2018-10-19 18:08:31,958 SDK: twApi_Initialize: Error creating websocket
structure, retrying
[FORCE] 2018-10-19 18:08:31,958 httpServer: starting http server port=8000
[DEBUG] 2018-10-19 18:08:31,964 httpServer: http server bound to port=8000.
[DEBUG] 2018-10-19 18:08:36,959 SDK: twWs_Create: Initializing Websocket Client
for http://192.168.1.170:80//Thingworx/WS
[DEBUG] 2018-10-19 18:08:36,959 SDK: twTlsClient_Create: Initializing TLS Client

[DEBUG] 2018-10-19 18:08:36,959 SDK: twTlsClient_Close: Disconnecting from serve
r
[ERROR] 2018-10-19 18:08:36,959 SDK: twWs_Create: Error creating BSD socket to b
e used for the websocket
[ERROR] 2018-10-19 18:08:36,959 SDK: twApi_Initialize: Error creating websocket
structure, retrying

Asking for login is fine - it means it is up and working.

 

Confirm the appKey is valid, the expiration is set to one day by default when you create them, and try the config below. 

 

I removed  "publish_directory":"logs" in logging and increased debugging on the WebSocket connection

 

{
  "ws_servers": [{
    "host": "http://192.168.1.170",
    "port": 80
  }],
  "appKey": "ad2d631b-d6fe-45f0-a892-6dbc500fd339",
  "logger": {
    "level": "DEBUG"
  },
  "certificates": {
    "validate": false,

    "allow_self_signed": true
  },
  "ws_connection": {
    "encryption": "none",

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

I checked the appKey and it expired on 20th October. I reset the expiry as shown below

 

2019-04-23 00:00:00

I set the config to the content you sent. Here is the latest trace. Sadly, still not working

 

[FORCE] 2018-10-22 07:55:08,70 wsems: Initializing EMS ....
[FORCE] 2018-10-22 07:55:08,70 main: Using config file C:\EMS\microserver\etc\co
nfig.json
[INFO ] 2018-10-22 07:55:08,70 wsems: Creating the WsEms proxy.
[INFO ] 2018-10-22 07:55:08,70 wsems: Starting HTTP Server.
[INFO ] 2018-10-22 07:55:08,70 Main: Using custom certificate and private key fo
r HTTP Server
[WARN ] 2018-10-22 07:55:08,70 Main: Encryption is disabled on HTTP Server.
[WARN ] 2018-10-22 07:55:08,70 Main: Authentication is disabled on the HTTP Serv
er.
[INFO ] 2018-10-22 07:55:08,70 wsems: Initializing the ThingWorx REST interface.

[INFO ] 2018-10-22 07:55:08,71 wsEmsProxy::initialize: FIPS is disabled.
[INFO ] 2018-10-22 07:55:08,71 wsEmsProxy::initialize: Encryption is disabled on
 Web Socket connection.
[WARN ] 2018-10-22 07:55:08,71 SDK: SDK Version: 2.0.4
[WARN ] 2018-10-22 07:55:08,71 SDK: TLS Library: OpenSSL
[WARN ] 2018-10-22 07:55:08,71 SDK: TLS Library Version: 1.0.2l
[WARN ] 2018-10-22 07:55:08,71 SDK: FIPS Capable
[DEBUG] 2018-10-22 07:55:08,71 SDK: twWs_Create: Initializing Websocket Client f
or http://192.168.1.170:80//Thingworx/WS
[DEBUG] 2018-10-22 07:55:08,71 SDK: twTlsClient_Create: Initializing TLS Client
[DEBUG] 2018-10-22 07:55:08,72 SDK: twTlsClient_Close: Disconnecting from server

[ERROR] 2018-10-22 07:55:08,72 SDK: twWs_Create: Error creating BSD socket to be
 used for the websocket
[ERROR] 2018-10-22 07:55:08,72 SDK: twApi_Initialize: Error creating websocket s
tructure, retrying
[FORCE] 2018-10-22 07:55:08,73 httpServer: starting http server port=8000
[DEBUG] 2018-10-22 07:55:08,75 httpServer: http server bound to port=8000.
[DEBUG] 2018-10-22 07:55:13,74 SDK: twWs_Create: Initializing Websocket Client f
or http://192.168.1.170:80//Thingworx/WS
[DEBUG] 2018-10-22 07:55:13,74 SDK: twTlsClient_Create: Initializing TLS Client
[DEBUG] 2018-10-22 07:55:13,74 SDK: twTlsClient_Close: Disconnecting from server

[ERROR] 2018-10-22 07:55:13,74 SDK: twWs_Create: Error creating BSD socket to be
 used for the websocket
[ERROR] 2018-10-22 07:55:13,74 SDK: twApi_Initialize: Error creating websocket s
tructure, retrying

apdams
12-Amethyst
(To:apdams)

I have a config file that works. Problem now solved:

{
  "ws_servers": [{
    "host": "192.168.1.170",
    "port": 80
  }],
  "appKey": "f9efc9d8-1836-4a44-a8cb-1cb599bd4a49",
  "logger": {
    "level": "DEBUG"
  },
  "certificates": {
    "validate": false,
    "allow_self_signed": true
  },
  "ws_connection": {
    "encryption": "none",
    "verbose": true
  },
  "http_server" : {
        "host": "localhost",
        "port": 8084,    
        "ssl": false,
        "content_read_timeout": 20000,
    "authenticate": false
  }
}

SaurabhHCL
6-Contributor
(To:apdams)

{
"ws_servers": [{
"host": "pp-18102412130w.devportal.ptc.io",
"port": 443
}],
"appKey": "XXXXXXXXXXXXXXXXXXXXXXXX",
"certificates": {
"validate": false,
"cert_chain": ["certificate.cer"]
},
"logger": {
"level":"INFO",
"publish_directory":"logs",
"publish_level":"INFO",
"max_file_storage":2000000,
"auto_flush":true,
"flush_chunk_size": 16384,
"buffer_size" : 4096
},
"file": {
"virtual_dirs": [
{"logs": "logs"},
{"instruction":"instruction"}
],
"staging_dir": "C:\\Projects\\PTCDocs\\PTC_Work\\EMS\\microserver\\staging"
}
}

 

 

 

I think the host is not getting connected as I am getting the below error:

 

C:\Projects\PTCDocs\PTC_Work\EMS\microserver>wsems
[INFO ] 2018-10-25 13:07:20,446 wsems: Using config file: C:\Projects\PTCDocs\PTC_Work\EMS\microserver\etc\config.json
[FORCE] 2018-10-25 13:07:20,446 wsems: Starting up ....
[FORCE] 2018-10-25 13:07:20,459 wsems: Initializing EMS ....

pp-18102412130w.devportal.ptc.io:443-->[FORCE] 2018-10-25 13:07:20,459 main: Using config file C:\Projects\PTCDocs\PTC_Work\EMS\microserver\etc\config.json
[INFO ] 2018-10-25 13:07:20,459 wsems: Creating the WsEms proxy.
[INFO ] 2018-10-25 13:07:20,459 wsems: Starting HTTP Server.
[INFO ] 2018-10-25 13:07:20,460 wsems: Initializing the ThingWorx REST interface.
[FORCE] 2018-10-25 13:07:20,460 httpServer: starting http server port=8000
[INFO ] 2018-10-25 13:07:20,478 wsEmsProxy::initialize: Initialization complete!
[INFO ] 2018-10-25 13:07:20,479 wsems: Starting the connection.
[ERROR] 2018-10-25 13:07:20,916 SDK: Error intializing SSL connection
[ERROR] 2018-10-25 13:07:20,916 SDK: twWs_Connect: Error restarting socket. Error 126
[ERROR] 2018-10-25 13:07:26,333 SDK: Error intializing SSL connection
[ERROR] 2018-10-25 13:07:26,333 SDK: twWs_Connect: Error restarting socket. Error 126

 

Try the config file below after confirming your appKey has not expired, the default expiration when your create one is one day.

 

I added a section for

"ws_connection":

 this is not required since the EMS defaults to SSL, but might avoid confusion in the future if you switch to a non-SSL TW server

 

I removed the cert_chain setting since that may cause problems if you do not have a valid cert named certificate.cer in the EMS home directory

 

I also added a 

"http_server":

 section. I believe this is the cause of the error you are seeing. The EMS starts a local HTTP server based on this configuration. Make sure you specify an unused port number where the EMS can open a listening socket, and the user who is running the EMS has proper permission to open listening sockets. If the machine has more than one NIC, you may have to specify the actual IP address here instead of using localhost. If you are using Lua Script Resources, you will have to enter the port and IP address of the EMS in the LSR config

 

 

 

{
	"ws_servers": [{
		"host": "pp-18102412130w.devportal.ptc.io",
		"port": 443
	}],
	"ws_connection": {
		"encryption": "ssl"
	},
	"certificates": {
		"validate": false
	},

	"appKey": "XXXXXXXXXXXXXXXXXXXXXXXX",

	"http_server": {
		"host": "localhost",
		"port": 8084,
		"ssl": false
	},
	
	"logger": {
		"level": "INFO",
		"publish_directory": "logs",
		"publish_level": "INFO",
		"max_file_storage": 2000000,
		"auto_flush": true,
		"flush_chunk_size": 16384,
		"buffer_size": 4096
	},
	"file": {
		"virtual_dirs": [{
				"logs": "logs"
			},
			{
				"instruction": "instruction"
			}
		],
		"staging_dir": "C:\\Projects\\PTCDocs\\PTC_Work\\EMS\\microserver\\staging"
	}
}

 

Announcements


Top Tags