thaliproject / CI

CI project for testing mobile devices
MIT License
2 stars 3 forks source link

ECONNREFUSED when starting coordination tests #97

Open evabishchevich opened 7 years ago

evabishchevich commented 7 years ago

We have strange behaviour on CI when coordination test can't start because of ECONNREFUSED error. Looks like all devises are on the same wifi.

Logs: https://github.com/ThaliTester/TestResults/tree/9953060646c88db_Add_listening_to_connectivity_events_when_app_starts_evabishchevich/ thali02 and thali04 devices

czyzm commented 7 years ago

It seems that clients sometimes try to connect to coordination server before the server is started. Look at the timestamps from the logs above.

Coordination server start:

2016-12-28 10:52:58 - INFO HttpServer: 'listening on *:3000'

Device that didn't connect from node thali02 (it tries to connect 20 seconds before server is started):

,12-28 11:52:38.054  9061  9217 I jxcore-log: 2016-12-28 10:52:38 - INFO CoordinatedClient: 'Connecting to coordination server on http://***'
12-28 11:52:38.054  9061  9217 I jxcore-log: 
,12-28 11:52:38.094  9061  9217 I jxcore-log: 2016-12-28 10:52:38 - ERROR CoordinatedClient: 'connection error: 'Error: websocket error', description: 'Error: connect ECONNREFUSED', stack: 'Transport.prototype.onError@/data/data/com.test.thalitest/files/www/jxcore/node_modules/engine.io-client/lib/transport.js:62:13
czyzm commented 7 years ago

The fix is incorrect. The server waits for signal from node to start itself so the timeout for delaying node code execution is not helping. We need to prepare other solution.

andrew-aladev commented 7 years ago

Please verify server-address.js and ssid of wifi network for client.