Article - CS325403

Remote Access Client (RAC) connection to ThingWorx server times out with error "Uncaught error: connect ETIMEDOUT"

Modified: 07-Sep-2023   


Applies To

  • ThingWorx Asset Advisor for Service 8.1 F000
  • ThingWorx Platform 9.0 to 9.4
  • Axeda - Connectivity 6.9.4
  • ThingWorx Edge MicroServer 5.4.10

Description

  • If network quality is poor, Remote Access Client (RAC) cannot connect to ThingWorx Server successfully.
    • This will cause the remote desktop connection to the edge device to fail with an error reported in tw-ra-client.log:
      • [xxxx-xx-xxTxx:xx:xx.xxx] [ERROR] main - Uncaught error: connect ETIMEDOUT <IP:PORT>
        [xxxx-xx-xxTxx:xx:xx.xxx] [ERROR] main - { ChannelError: connect ETIMEDOUT <IP:PORT>
            at AlwaysOnProtocol.channel.on._.bind (<RAC_CLIENT_ROOT>\tw-ra-client\resources\app.asar\node_modules\tw-javascript-sdk\src\js\AlwaysOnProtocol.js:154:32)
            at emitOne (events.js:116:13)
            at Channel.emit (events.js:211:7)
            at NodeWebSocket.socket.on (<RAC_CLIENT_ROOT>\tw-ra-client\resources\app.asar\node_modules\tw-javascript-sdk\src\js\Channel.js:198:14)
            at emitOne (events.js:116:13)
            at NodeWebSocket.emit (events.js:211:7)
            at NodeWebSocket.handleError (<RAC_CLIENT_ROOT>\tw-ra-client\resources\app.asar\node_modules\tw-javascript-sdk\src\js\websocket\NodeWebSocket.js:117:14)
            at emitOne (events.js:116:13)
            at WebSocket.emit (events.js:211:7)
            at ClientRequest.onerror (<RAC_CLIENT_ROOT>\tw-ra-client\resources\app.asar\node_modules\tw-javascript-sdk\node_modules\ws\lib\WebSocket.js:711:10)
          name: 'ChannelError',
          message: 'connect ETIMEDOUT <IP:PORT>' }
    • This would especially happen when the RAC client user is trying to connect to the remote desktop of an Asset via ThingWorx from a public network while ThingWorx is deployed in an internal network.
    • /TWS and /twTunnelClient URLs are accessible from the RAC client user, so it's not blocked by the Firewall, but they still could not connect to ThingWorx, which caused remote access to the Asset to fail either.
This is a printer-friendly version of Article 325403 and may be out of date. For the latest version click CS325403