Error: connect ECONNREFUSED 127.0.0.1:44308 code example

Example 1: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379

sudo service redis-server status

Example 2: connect ECONNREFUSED 127.0.0.1:27017

For windows - just go to Mongodb folder (ex : C:\ProgramFiles\MongoDB\Server\3.4\bin) and open cmd in the folder and type "mongod.exe --dbpath c:\data\db"

if c:\data\db folder doesn't exist then create it by yourself and run above command again.

All should work fine by now.))

Source stackoverflow

Example 3: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379

sudo apt-get install redis-server

Example 4: Connection error: connect ECONNREFUSED 127.0.0.1:5432

database system is ready to accept connections