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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

WSEMS connection issues - Thingworx Utilities Asset Manager Tutorial

kbuss
6-Contributor

WSEMS connection issues - Thingworx Utilities Asset Manager Tutorial

I´m trying to get a WSEMS connection from my PC to the ThingWorx Platform (30 days hosted version, so not locally installed).

When i start the WSEMS i get this error message:

...

{"level":"INFO","timestamp":"2016-09-22T15:16:35,42","origin":"wsEmsProxy::initialize","content":"Initialization complete!"}

{"level":"INFO","timestamp":"2016-09-22T15:16:35,45","origin":"C:\Users\buss\Thingworx\ThingWorx Utilities\microserver\wsems.exe","content":"Starting the connection."}

{"level":"ERROR","timestamp":"2016-09-22T15:16:35,122","origin":"SDK","content":"twWs_Connect: Error initializing web socket.  Response code: 404"}

I downloaded the Web Socket Edge Micro Server from the Thingworx Utilities Asset Manager Tutorial (MED-61060-CD-053_SP2_Microserver-5-3-2-Win32).

The config.json file lokks like this:

{

  "ws_servers": [{

  "host": "**.***.***.***",

  "port": 80

  }],

  "http_server": {

  "port": 8000

  },

  "appKey": "******************************",

  "ws_connection": {

  "encryption": "none"

  },

  "logger": {

  "level": "INFO",

  "publish_directory": "C:\\Thingworx\\MicroServer\\edge\\logs",

  "publish_level": "INFO",

  "max_file_storage": 2000000,

  "auto_flush": true

  },

  "certificates": {

  "validate": false,

  "allow_self_signed": true

  },

  "tunnel": {

  "buffer_size": 8192,

  "read_timeout": 10,

  "idle_timeout": 300000,

  "max_concurrent": 4

  },

  "file": {

  "buffer_size": 8192,

  "max_file_size": 8000000000,

  "virtual_dirs": [{

  "tw": "C:\\Thingworx\\MicroServer\\edge\\tw"

  }, {

  "other": "C:\\Thingworx\\MicroServer\\edge\\other"

  }],

  "staging_dir": "C:\\Thingworx\\MicroServer\\edge\\staging"

  }

}

When i try it with the local trial ThingWorx platform it works (as host address: localhost), but not for this non local instance.

Am i doing something wrong? Or did i missunderstand anything of WSEMS connectivity?

Thanks for any advices

Keijo

9 REPLIES 9
Aanjan
9-Granite
(To:kbuss)

Keijo, can you try removing the http_server section, change the logger level from INFO to TRACE and post the entire logs?

kbuss
6-Contributor
(To:Aanjan)

I removed the http_server part but it doesn´t change anything.

The log file looks like this (hope it is what you wanted):

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,746","origin":"jsonConfigurator::getValueByType","content":"Key audit_target not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,755","origin":"jsonConfigurator::getString","content":"Key = publish_directory, Parent = logger"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,761","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = max_file_storage, Parent = logger"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,767","origin":"jsonConfigurator::getString","content":"Key = publish_level, Parent = logger"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,773","origin":"jsonConfigurator::getBoolean","content":"Key = auto_flush, Parent = logger"}

{"level":"FORCE","timestamp":"2016-09-29T11:28:28,778","origin":"C:\Users\buss\Thingworx\ThingWorx Utilities\microserver\wsems.exe","content":"Initializing EMS ...."}

{"level":"FORCE","timestamp":"2016-09-29T11:28:28,793","origin":"main","content":"Using config file C:\\Users\\buss\\Thingworx\\ThingWorx Utilities\\microserver\\etc\\config.json"}

{"level":"INFO","timestamp":"2016-09-29T11:28:28,795","origin":"C:\Users\buss\Thingworx\ThingWorx Utilities\microserver\wsems.exe","content":"Creating the WsEms proxy."}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,798","origin":"wsEmsProxy::wsEmsProxy","content":"Constructor called"}

{"level":"INFO","timestamp":"2016-09-29T11:28:28,800","origin":"C:\Users\buss\Thingworx\ThingWorx Utilities\microserver\wsems.exe","content":"Starting HTTP Server."}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,804","origin":"jsonConfigurator::getInteger","content":"Key = port, Parent = http_server"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,807","origin":"jsonConfigurator::getValueByType","content":"Parent http_server not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,811","origin":"jsonConfigurator::getString","content":"Key = host, Parent = http_server"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,815","origin":"jsonConfigurator::getValueByType","content":"Parent http_server not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,818","origin":"jsonConfigurator::getBoolean","content":"Key = ssl, Parent = http_server"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,822","origin":"jsonConfigurator::getValueByType","content":"Parent http_server not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,825","origin":"jsonConfigurator::getString","content":"Key = certificate, Parent = http_server"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,828","origin":"jsonConfigurator::getValueByType","content":"Parent http_server not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,831","origin":"jsonConfigurator::getBoolean","content":"Key = authenticate, Parent = http_server"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,835","origin":"jsonConfigurator::getValueByType","content":"Parent http_server not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,839","origin":"jsonConfigurator::getInteger","content":"Key = content_read_timeout, Parent = http_server"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,842","origin":"jsonConfigurator::getValueByType","content":"Parent http_server not found"}

{"level":"INFO","timestamp":"2016-09-29T11:28:28,846","origin":"C:\Users\buss\Thingworx\ThingWorx Utilities\microserver\wsems.exe","content":"Initializing the ThingWorx REST interface."}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,849","origin":"wsEmsProxy::initialize","content":"Method entered"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,853","origin":"jsonConfigurator::getString","content":"Key = level, Parent = logger"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,856","origin":"jsonConfigurator::getBoolean","content":"Key = verbose, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,860","origin":"jsonConfigurator::getValueByType","content":"starting http server port=_connection"}

{"level":"FORCE","timestamp":"2016-09-29T11:28:28,863","origin":"httpServer","content":"starting http server port=8000"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,868","origin":"jsonConfigurator::getString","content":"Key = encryption, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,872","origin":"jsonConfigurator::getString","content":"Key = user, Parent = "}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,876","origin":"jsonConfigurator::getValueByType","content":"Key user not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,880","origin":"jsonConfigurator::getString","content":"Key = password, Parent = "}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,884","origin":"jsonConfigurator::getValueByType","content":"Key password not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,888","origin":"jsonConfigurator::getString","content":"Key = appkey, Parent = "}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,891","origin":"jsonConfigurator::getString","content":"Key = resource, Parent = "}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,895","origin":"jsonConfigurator::getValueByType","content":"Key resource not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,900","origin":"jsonConfigurator::getInteger","content":"Key = port, Parent = proxy"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,903","origin":"jsonConfigurator::getValueByType","content":"Parent proxy not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,906","origin":"jsonConfigurator::getString","content":"Key = host, Parent = proxy"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,910","origin":"jsonConfigurator::getValueByType","content":"Parent proxy not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,914","origin":"jsonConfigurator::getString","content":"Key = user, Parent = proxy"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,917","origin":"jsonConfigurator::getValueByType","content":"Parent proxy not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,921","origin":"jsonConfigurator::getString","content":"Key = password, Parent = proxy"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,924","origin":"jsonConfigurator::getValueByType","content":"Parent proxy not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,928","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = socket_read_timeout, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,932","origin":"jsonConfigurator::getValueByType","content":"Key socket_read_timeout not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,936","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = frame_read_timeout, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,939","origin":"jsonConfigurator::getValueByType","content":"Key frame_read_timeout not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,943","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = ssl_read_timeout, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,947","origin":"jsonConfigurator::getValueByType","content":"Key ssl_read_timeout not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,950","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = msg_timeout, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,954","origin":"jsonConfigurator::getValueByType","content":"Key msg_timeout not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,958","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = ping_rate, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,962","origin":"jsonConfigurator::getValueByType","content":"Key ping_rate not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,966","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = pingpong_timeout, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,969","origin":"jsonConfigurator::getValueByType","content":"Key pingpong_timeout not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,973","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = max_threads, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,977","origin":"jsonConfigurator::getValueByType","content":"Key max_threads not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,980","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = max_msg_size, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,984","origin":"jsonConfigurator::getValueByType","content":"Key max_msg_size not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,988","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = max_messages, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,992","origin":"jsonConfigurator::getValueByType","content":"Key max_messages not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:28,996","origin":"jsonConfigurator::getBoolean","content":"Key = verbose, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,0","origin":"jsonConfigurator::getValueByType","content":"Key verbose not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,4","origin":"jsonConfigurator::getBoolean","content":"Key = connect_on_demand, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,8","origin":"jsonConfigurator::getValueByType","content":"Key connect_on_demand not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,13","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = max_connect_delay, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,16","origin":"jsonConfigurator::getValueByType","content":"Key max_connect_delay not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,20","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = connect_period, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,23","origin":"jsonConfigurator::getValueByType","content":"Key connect_period not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,27","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = duty_cycle, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,32","origin":"jsonConfigurator::getValueByType","content":"Key duty_cycle not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,35","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = message_idle_time, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,39","origin":"jsonConfigurator::getValueByType","content":"Key message_idle_time not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,42","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = connect_timeout, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,45","origin":"jsonConfigurator::getValueByType","content":"Key connect_timeout not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,49","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = connect_retry_interval, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,52","origin":"jsonConfigurator::getValueByType","content":"Key connect_retry_interval not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,56","origin":"jsonConfigurator::getInteger","content":"Key = connect_retries, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,60","origin":"jsonConfigurator::getValueByType","content":"Key connect_retries not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,64","origin":"jsonConfigurator::getBoolean","content":"Key = enabled, Parent = offline_msg_store"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,67","origin":"jsonConfigurator::getValueByType","content":"Parent offline_msg_store not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,71","origin":"jsonConfigurator::getString","content":"Key = directory, Parent = offline_msg_store"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,76","origin":"jsonConfigurator::getValueByType","content":"Parent offline_msg_store not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,80","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = max_size, Parent = offline_msg_store"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,84","origin":"jsonConfigurator::getValueByType","content":"Parent offline_msg_store not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,88","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = message_chunk_size, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,92","origin":"jsonConfigurator::getValueByType","content":"Key message_chunk_size not found"}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,95","origin":"SDK","content":"twWs_Create: Initializing Websocket Client for 52.210.165.147:80\/\/Thingworx\/WS"}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,99","origin":"SDK","content":"twTlsClient_Create: Initializing TLS Client"}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,103","origin":"httpServer","content":"http server bound to port=8000."}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,106","origin":"SDK","content":"twApi_Initialize: Websocket Established after 0 tries"}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,110","origin":"SDK","content":"subscribedPropsMgr_Initialize: Initializing subscribed properties manager"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,114","origin":"jsonConfigurator::getBoolean","content":"Key = validate, Parent = certificates"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,117","origin":"jsonConfigurator::getBoolean","content":"Key = deny_self_signed, Parent = certificates"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,121","origin":"jsonConfigurator::getValueByType","content":"Key deny_self_signed not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,125","origin":"jsonConfigurator::getBoolean","content":"Key = allow_self_signed, Parent = certificates"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,129","origin":"jsonConfigurator::getString","content":"Key = client_cert, Parent = certificates"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,133","origin":"jsonConfigurator::getValueByType","content":"Key client_cert not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,136","origin":"jsonConfigurator::getString","content":"Key = key_file, Parent = certificates"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,140","origin":"jsonConfigurator::getValueByType","content":"Key key_file not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,143","origin":"jsonConfigurator::getString","content":"Key = key_passphrase, Parent = certificates"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,147","origin":"jsonConfigurator::getValueByType","content":"Key key_passphrase not found"}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,151","origin":"jsonConfigurator::getJsonEntity","content":"Key cert_chain not found"}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,155","origin":"jsonConfigurator::getJsonEntity","content":"Key validation_criteria not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,159","origin":"jsonConfigurator::getString","content":"Key = staging_dir, Parent = file"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,162","origin":"jsonConfigurator::getUnsignedInteger","content":"Key = buffer_size, Parent = file"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,166","origin":"jsonConfigurator::getDouble","content":"Key = max_file_size, Parent = file"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,169","origin":"SDK","content":"twFileManager_AddVirtualDir: Adding __staging__ to vdir list"}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,174","origin":"jsonConfigurator::getJsonEntity","content":"Key auto_bind not found"}

{"level":"INFO","timestamp":"2016-09-29T11:28:29,223","origin":"wsEmsProxy::initialize","content":"Initialization complete!"}

{"level":"INFO","timestamp":"2016-09-29T11:28:29,228","origin":"C:\Users\buss\Thingworx\ThingWorx Utilities\microserver\wsems.exe","content":"Starting the connection."}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,232","origin":"jsonConfigurator::getInteger","content":"Key = connect_retry_interval, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,238","origin":"jsonConfigurator::getValueByType","content":"Key connect_retry_interval not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,242","origin":"jsonConfigurator::getInteger","content":"Key = max_connect_delay, Parent = ws_connection"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,247","origin":"jsonConfigurator::getValueByType","content":"Key max_connect_delay not found"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,251","origin":"SDK","content":"twApi_Connect: Delaying 12 milliseconds before connecting"}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,255","origin":"SDK","content":"twTlsClient_Reconnect: Re-establishing SSL context"}

{"level":"DEBUG","timestamp":"2016-09-29T11:28:29,259","origin":"SDK","content":"twTlsClient_Connect: Connecting to server"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,263","origin":"SDK","content":"twWs_Connect: Connected to 52.210.165.147:80"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,267","origin":"SDK","content":"twWs_Connect: Sent request:\nGET \/Thingworx\/WS HTTP\/1.1\r\nUser-Agent: ThingWorx C SDK\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nHost: 52.210.165.147\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Key: HxVpNh1xkU1y6v69P2kFVw==\r\nMax-Frame-Size: 8192\r\nappKey: ae053a53-cee1-4b54-aebb-88fbfb28d25e\r\n\r\n"}

{"level":"TRACE","timestamp":"2016-09-29T11:28:29,273","origin":"SDK","content":"twWs_Connect: Got Response from Server:\n\nHTTP\/1.1 404 \r\nVia: 1.1 SRV-CERBERUS\r\nConnection: Keep-Alive\r\nProxy-Connection: Keep-Alive\r\nContent-Length: 1016\r\nDate: Thu, 29 Sep 2016 09:28:28 GMT\r\nContent-Type: text\/html;charset=utf-8\r\nX-Content-Type-Options: nosniff\r\nX-XSS-Protection: 1; mode=block\r\nX-FRAME-OPTIONS: SAMEORIGIN\r\nContent-Language: en\r\n\r\n<!DOCTYPE html><html><head><title>Apache Tomcat\/8.5.4 - Error report<\/title><style type=\"text\/css\">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}<\/style> <\/head><body><h1>HTTP Status 404 - \/Thingworx\/WS<\/h1><div class=\"line\"><\/div><p><b>type<\/b> Status report<\/p><p><b>message<\/b> <u>\/Thingworx\/WS<\/u><\/p><p><b>description<\/b> <u>The requested resource is not available.<\/u><\/p><hr class=\"line\"><h3>Apache Tomcat\/8.5.4<\/h3><\/body><\/html>\n"}

{"level":"ERROR","timestamp":"2016-09-29T11:28:29,288","origin":"SDK","content":"twWs_Connect: Error initializing web socket.  Response code: 404"}

Keijo Buss

In addtion to what Ravi Anjan have said , I have few more suggestions and I would request to give a try and then you can comments with all your finding about this issue and we can work to get this resolved.

Are you using domain name or IP address of your cloud instance ?

I would suggest using IP address instead of domain name.

Furthermore , use the minimum setting to connect to Thingworx platform and let me know if you are still facing the issue .

Example for minimum setting in confij.json looks like this :

{

  "ws_servers": [{

  "host": "localhost",

  "port": ------

  }],

  "appKey": "--------------------------------------------------"

}

kbuss
6-Contributor
(To:rupadhyay)

I´m using the IP address and also tried  the config.json with minimum settings. But this also didn´t work.

Aanjan
9-Granite
(To:kbuss)

Is that behind a proxy server or do you have an external firewall? With the 404 response you're getting and the apparent html response, any chance this is behind a reverse proxy server?

kbuss
6-Contributor
(To:Aanjan)

I don´t think there is a proxy server but an external firewall.

Maybe a stupid question:

for the "ws_servers" host address i use the IP address for the Thingworx platform that is given on the Developer Dashboard, is that correct?

Yes , using IP address instead of host-address is perfectly fine.

Keijo , we have "twWs_Connect: Error initializing web socket.  Response code: 404"}.

An error occurred while initializing the websocket. Check your websocket configuration parameters

for validity.

I would also request to check out this particular thread and see if its helpful :

Unable to connect to local Thingworx server

I would suggest going through the following discussion and see if it helps you.

Thingworx connection failed with error - 110

Top Tags