Article - CS263600

"Connect: Error initializing web socket. Response code: 404" when attempting to connect EdgeMicro Server(EMS) to ThingWorx Server

Modified: 31-Dec-2019   

Applies To

  • ThingWorx Platform 7.0 to 8.2
  • ThingWorx Edge MicroServer 4.1 to 5.4


  • On EdgeMicro Server(EMS) connect to ThingWorx Server "Connect: Error initializing web socket. Response code: 404
  • Fail to establish successful websocket handshake with EMS
  • Following the SteamSensor example
  • Failing to connect without HTTPS
  • EMS throws "SDK: twMessaging::handleMessage: Response ID 21 has code 160: Unable to dispatch [ uri = /Things/<ThingName>/Services/TunnelCommandFromEdge/]: Unable to Invoke Service TunnelCommandFromEdge on <Thingname> : Tunnel xxxx-xxxx-XXX-xx not found
  • Lua Script Resource (LSR) failed to initialize when launching the luaScriptResource.exe 
This is a PDF version of Article CS263600 and may be out of date. For the latest version click