アーティクル - CS339610
インストール後、ThingWorx Flow ログインページが「502 Bad Gateway」または「504 Gateway Timeout」エラーで読み込まれない
修正日: 09-Feb-2026
適用対象
- ThingWorx Platform 9.1 to 9.5
- Nginx
説明
- ThingWorx Flow ホームページにアクセスできませんでした
- ThingWorx Flowモジュールはオンラインですが、ログインを試みると
502 Bad Gateway nginxが返されます - Web ブラウザでF12 /開発者ツールを使用すると、 currentUser API 呼び出しで以下のエラーが返されることが示されます。
Failed to load resource: the server responded with a status of 504 (Gateway Timeout) - HTTP 504 Gateway Timeout
- ログインウィンドウが表示されない
- 自己署名証明書を使用している場合、ThingWorx Flow にアクセスできません
- WebブラウザでF12 /開発者ツールを使用すると、 fetchconfigがステータス502を返すことがわかります。
- ログインページにアクセスしようとすると
504 Gateway timeoutが表示される - trigger_error-xxxx.logには以下のエラーが含まれています:
{"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.965Z","level":"error","message":"Error deleting from message table"} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.965Z","level":"error","message":"Login failed for user '<user_name>'."} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.965Z","level":"error","message":"Error: Login failed for user '<user_name>'. at Login7TokenHandler.onErrorMessage (D:\\ThingWorxFlow\\modules\\trigger\\node_modules\\tedious\\lib\\token\\handler.js:239:19) at Readable.<anonymous> (D:\\ThingWorxFlow\\modules\\trigger\\node_modules\\tedious\\lib\\token\\token-stream-parser.js:26:33) at Readable.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Readable.push (internal/streams/readable.js:223:10) at next (internal/streams/from.js:88:29) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:93:5)"} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.966Z","level":"error","message":"Error updating subscriptions"} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.966Z","level":"error","message":"Login failed for user '<user_name>'."} {"module":"flow-trigger","timestamp":"YYYY-MM-DDThh:mm:ss.966Z","level":"error","message":"Error: Login failed for user '<user_name>'. at Login7TokenHandler.onErrorMessage (D:\\ThingWorxFlow\\modules\\trigger\\node_modules\\tedious\\lib\\token\\handler.js:239:19) at Readable.<anonymous> (D:\\ThingWorxFlow\\modules\\trigger\\node_modules\\tedious\\lib\\token\\token-stream-parser.js:26:33) at Readable.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Readable.push (internal/streams/readable.js:223:10) at next (internal/streams/from.js:88:29) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:93:5)"} - Flow のホスト名と URL 経由で ThingWorx Flow にアクセスできますが、 ThingWorx Composer > Flow > Connectorの ThingWorx Composer URL からはアクセスできず、以下のエラーが発生します。
404 page not found error
- システム > サブシステム > ワークフロー サブシステムからValidateFlowSetup を実行するときにエラーが発生しました
[FLOW-API-02] - Failed to connect to Flow. Ensure that you are accessing ThingWorx via Nginx URL. Ensure that all Flow services are running and are healthy. In case of self-signed certificate, make sure that correct CN is provided. [FLOW-OAUTH-02] - Failed to connect to Flow OAuth service. Check whether Flow keys are imported in ThingWorx KeyStore. For more information, refer to the 'Troubleshooting Your Installation' topic in the Help Center
- ThingWorx Flow ログ ファイル,,,\ThingWorxFlow\.pm2\logs\ flow-api-error-0.logにエラー メッセージが表示されます:
TypeError: Cannot read property 'statusCode' of undefined at /opt/ThingWorxFlow/modules/ux/dist/helpers/twxUserHelper.js:25:285 at Request._callback (/opt/ThingWorxFlow/modules/ux/dist/helpers/twxUserHelper.js:8:977) at self.callback (/opt/ThingWorxFlow/modules/ux/node_modules/request/request.js:185:22) at Request.emit (events.js:314:20) at Request.onRequestError (/opt/ThingWorxFlow/modules/ux/node_modules/request/request.js:881:8) at ClientRequest.emit (events.js:314:20) at ClientRequest.onConnect (/opt/ThingWorxFlow/modules/ux/node_modules/tunnel-agent/index.js:168:23) at Object.onceWrapper (events.js:421:26) at ClientRequest.emit (events.js:314:20) at Socket.socketOnData (_http_client.js:508:11) at Socket.emit (events.js:314:20) at addChunk (_stream_readable.js:297:12) at readableAddChunk (_stream_readable.js:272:9) at Socket.Readable.push (_stream_readable.js:213:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23) Uncaught exception: TypeError: Cannot read property 'statusCode' of undefined
最新バージョンはこちらを参照ください CS339610