node.js - Sails-mysql refuses to register a connection -


i have sails application on aws instance dependancies installed no apparent issues. however, each time try launch app getting following error.

error: adaptererror: connection registered 

i have not managed lift sails yet on instance , sails-mysql freshly installed no connections should registered.

i have taken following steps deploy app..

  • set mysql rds instance (eu-west)
  • created , set ubuntu amd-64 t2.micro ec2 instance (eu-west)
  • installed prerequisites (git, nvm, nodejs, sails, etc.)
  • cloned sails project
  • installed dependencies sails
  • correctly configured connection settings sails use rds instance.

i know connection settings correct have been able run sails on local machine connection rds instance , consistently lift without issues.

i able connect rds instance using sequelpro no problems.

i have had issues dependencies in past have managed fix issues , have not had of them on local machine or ec2 instance.

after searching while have come across few users have had similar issues have managed fix them waterline's teardown methods, however, unsure how achieve this.

i have done best provide information possible , massively appreciated.

sails version: 0.12.11

thank in advance.

i managed fix issue carrying out following:

  • switched environment production in config/bootstrap.js

  • in connections.js add connecttimeout: 20000 make sure request not time out before connection made.

    eg. process.env.node_env = 'development'

  • ensure security group inbounds rules rds allows connections security group associated ec2 instance.

type: mysql/aurora

protocol: tcp

port range: 3306

source: < security group id >

following above points meant overcame issue handshake timeouts when communicating rds.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -