ECONNREFUSED - Unable to connect site to Flywheel

This is a new issue, within the past week, I’ve been unable to connect sites to Flywheel. In the area where the push/pull icons are supposed to be, there is a message about connecting to Flywheel. I go to Flywheel and sign in and then get redirected to Local and it restarts the local machine but still tells me I need to connect to Flywheel.

I checked my local-by-flywheel.log and this is what I see:

Jul 8, 2019, 6:35 PM EDT - error: [main/index] Error: connect ECONNREFUSED *IP-ADDRESS*     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)

Jul 8, 2019, 6:35 PM EDT - error: [main/index]  
{ 
   message: 'connect ECONNREFUSED *IP-ADDRESS*',
   stack:  'Error: connect ECONNREFUSED *IP-ADDRESS*\n    at TCPConnectWrap.afterConnect [as 
oncomplete] (net.js:1113:14)',
   errno: 'ECONNREFUSED',
   code: 'ECONNREFUSED',
   syscall: 'connect',
   address: '*IP-ADDRESS*', port: 2376 
}

Jul 8, 2019, 6:38 PM EDT - warn: [FlywheelAPI] Encountered 401 error. Logging out.

Jul 8, 2019, 6:38 PM EDT - info: [FlywheelAPI] Flushing FlyAPI credentials.

Jul 8, 2019, 6:38 PM EDT - warn: [renderer/App] StatusCodeError: 401 - {"error":"Bad credentials."}

at new StatusCodeError (C:\Users\*****\AppData\Local\Programs\local-by-flywheel\resources\app.asar\node_modules\request-promise-core\lib\errors.js:32:15)
at Request.plumbing.callback (C:\Users\*****\AppData\Local\Programs\local-by-flywheel\resources\app.asar\node_modules\request-promise-core\lib\plumbing.js:104:33)
at Request.RP$callback [as _callback] (C:\Users\******\AppData\Local\Programs\local-by-flywheel\resources\app.asar\node_modules\request-promise-core\lib\plumbing.js:46:31)
at Request.self.callback (C:\Users\******\AppData\Local\Programs\local-by-flywheel\resources\app.asar\node_modules\request\request.js:185:22)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at Request.<anonymous> (C:\Users\******\AppData\Local\Programs\local-by-flywheel\resources\app.asar\node_modules\request\request.js:1161:10)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at IncomingMessage.<anonymous> (C:\Users\******\AppData\Local\Programs\local-by-flywheel\resources\app.asar\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at IncomingMessage.EventEmitter.emit (domain.js:442:20)
at endReadableNT (_stream_readable.js:1092:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

Any thoughts? I have something on my local that I need to push to a client site asap. Thanks!

Hey @flexicodes

I think we figured this out elsewhere – but for the benefit of the Community forums – this turned out to be an issue with the date and time configuration of the operating system.

Basically the authentication tokens were being rejected due to the time settings.

As a first step in troubleshooting this, I recommend opening the Date and Time settings for the computer and trying to have them be “auto-synced” (this term may be different depending on the operating system).

For example, on a Windows machine, here’s what my settings look like, but toggling some of them can help “reset” the time settings for the computer and get them back in sync with the servers.

Thanks @ben.turner!

You’re correct we got this fixed up and it was definitely a weird one to track down but fortunately you stay with me and the issue and we got it solved.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.