Sails version: 1.0.0-41
Node version: 8.9.3
NPM version: 5.5.1
DB adapter name: N/A
DB adapter version: N/A
Operating system: windows
I have begun to inexplicably receive error messages on sails start up:
error: error: A hook (`sockets`) failed to load!
verbose: verbo: Lowering sails...
silly: : Shutting down HTTP server...
silly: : HTTP server shut down successfully.
error: error: Failed to lift app: Error: Took too long to connect to the specified Redis session server.
You can change the allowed connection time by setting the `timeout` input (currently 15000ms).
at Timeout._onTimeout (C:\Users\Ishai\Documents\Stellarport\stellar-api\node_modules\machinepack-redis\machines\get-connection.js:166:66)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)
and am no longer able to start up my sails server.
Here is my sockets config:
const socketsConfig = {
adapter: 'socket.io-redis',
pubClient: redisClientProvider.get('pub'),
subClient: redisClientProvider.get('sub'),
transports: ['websocket'],
url: redisClientProvider.url(),
beforeConnect: (handshake, handleBeforeConnectResult) => {
handleBeforeConnectResult(
null,
handshake.headers.origin.indexOf('localhost') !== -1 ||
handshake.headers.origin.indexOf('lupoex.com') !== -1 ||
handshake.headers.origin.indexOf('stellarport.io') !== -1
);
}
};
I am running [email protected]. The error is originating in machinepack-redis. However, I don't understand why sails is even trying to create a client given that I am passing in the pubClient and subClient in the config.
I stepped through sails-hook-sockets and apparently, it is being called twice. Once with the clients I passed in and once without ... I can't make heads or tails of this. However, this was all working just fine yesterday...
@istrau2 Thanks for posting, we'll take a look as soon as possible.
For help with questions about Sails, click here. If you’re interested in hiring @sailsbot and her minions in Austin, click here.
@sgress454 You've been good to me in the past, maybe you have some thoughs =). I've spent a few frustrating hours on this already. Not sure what happened ... everything was working fine and all of a sudden, I can't start er up.
Nvm, looks like this was an issue on my end.
@istrau2 If you can remember from a year ago, how did you solve it with nvm? I'm having your exact problem currently.
Nvm, looks like this was an issue on my end.
Hello, how did you resolve it? I'm having the same problem.
@istrau2 How did you resolve it, I am facing the same issue
Most helpful comment
Hello, how did you resolve it? I'm having the same problem.