I deployed my nodejs 10.16.3 app to ubuntu 18.04 from my win10 PC development. After starting the app with pm2 start /ebs/myapp/index.js on ubuntu, there is an error about sequelize (5.19.1) database connection:
$cat index-error.log
Unable to connect to the database: { SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5433
at connection.connect.err (/ebs/myapp/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:170:24)
at Connection.connectingErrorHandler (/ebs/myapp/node_modules/pg/lib/client.js:174:14)
at Connection.emit (events.js:198:13)
at Socket.reportStreamError (/ebs/myapp/node_modules/pg/lib/connection.js:72:10)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
name: 'SequelizeConnectionRefusedError',
parent:
{ Error: connect ECONNREFUSED 127.0.0.1:5433
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5433 },
original:
{ Error: connect ECONNREFUSED 127.0.0.1:5433
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 5433 } }
The postgres (11.5) is running on the same host and I can access it via command line with success.
pm2 log file also indicates that the nodejs app is listening on port 3000. This app front is a nginx reverse proxy which likely has nothing to do with this error.
Here is the db connection string:
const Sql = require("sequelize");
const db = new Sql('mydb', 'postgres', `${process.env.DB_PASSWORD}`, {
host: 'localhost',
dialect: 'postgres',
port:5433,
} );
Why the sequelize connection is refused?
Update: postgresql log:
$ cat postgresql-11-main.log
2019-10-07 20:24:27.712 UTC [665] postgres#emps ERROR: syntax error at or near "psql" at character 1
2019-10-07 20:24:27.712 UTC [665] postgres#emps STATEMENT: psql
;
ubuntu#:/var/log/postgresql$ cat postgresql-11-main.log.1
2019-10-04 09:10:49.214 UTC [22809] LOG: received fast shutdown request
2019-10-04 09:10:49.221 UTC [22809] LOG: aborting any active transactions
2019-10-04 09:10:49.292 UTC [22809] LOG: background worker "logical replication launcher" (PID 22816) exited with exit code 1
2019-10-04 09:10:49.298 UTC [22811] LOG: shutting down
2019-10-04 09:10:49.435 UTC [22809] LOG: database system is shut down
2019-10-04 09:11:11.561 UTC [1084] LOG: listening on IPv4 address "127.0.0.1", port 5432
2019-10-04 09:11:11.567 UTC [1084] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-10-04 09:11:11.628 UTC [1096] LOG: database system was shut down at 2019-10-04 09:10:49 UTC
2019-10-04 09:11:11.648 UTC [1084] LOG: database system is ready to accept connections
2019-10-04 09:11:12.196 UTC [1134] [unknown]#[unknown] LOG: incomplete startup packet
2019-10-04 09:11:17.827 UTC [1282] [unknown]#[unknown] LOG: incomplete startup packet
2019-10-04 09:13:42.106 UTC [1084] LOG: received fast shutdown request
2019-10-04 09:13:42.110 UTC [1084] LOG: aborting any active transactions
2019-10-04 09:13:42.114 UTC [1084] LOG: background worker "logical replication launcher" (PID 1102) exited with exit code 1
2019-10-04 09:13:42.115 UTC [1097] LOG: shutting down
2019-10-04 09:13:42.138 UTC [1084] LOG: database system is shut down
2019-10-04 09:13:46.533 UTC [3040] LOG: listening on IPv4 address "127.0.0.1", port 5432
2019-10-04 09:13:46.535 UTC [3040] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-10-04 09:13:46.566 UTC [3041] LOG: database system was shut down at 2019-10-04 09:13:42 UTC
2019-10-04 09:13:46.577 UTC [3040] LOG: database system is ready to accept connections
2019-10-04 09:13:47.110 UTC [3048] [unknown]#[unknown] LOG: incomplete startup packet
2019-10-04 09:13:52.713 UTC [3082] [unknown]#[unknown] LOG: incomplete startup packet
The logs of your PostgreSQL server say that it is launched at the default port 5432. But in your app you'r trying to connect to 5433.
Try this connection instead:
const Sql = require("sequelize");
const db = new Sql('mydb', 'postgres', `${process.env.DB_PASSWORD}`, {
host: 'localhost',
dialect: 'postgres',
port: 5432, // instead of 5433
} );
Related
I have a nodejs app containerized as a linux container which uses the kafka-node library.
Kafka runs on the host machine which runs windows with:
Zookeeper port : 2181
Kafka broker port : 9092
I run the the nodejs container with the following command:
docker container run --network host --name nm name:1.0
In order to connect with the host's kafka I am using the following command:
client = new kafka.KafkaClient({kafkaHost: "localhost:9092"});
But this throws :
Error: connect ECONNREFUSED 127.0.0.1:9092
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1126:14) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 9092
}
When I change the connect command to :
client = new kafka.KafkaClient({kafkaHost: "host.docker.internal:9092"});
I am getting :
TimeoutError: Request timed out after 30000ms
at new TimeoutError (/usr/src/app/node_modules/kafka-node/lib/errors/TimeoutError.js:6:9)
at Timeout._onTimeout (/usr/src/app/node_modules/kafka-node/lib/kafkaClient.js:491:14)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7) {
message: 'Request timed out after 30000ms'
}
Can someone advise what I am doing wrong ?
UPDATE
When switching to a linux host machine, the above localhost methodology runs just fine .
Same problem here, but I can solve
You must set the environment variable KAFKA_ADVERTISED_HOST_NAME with your domain host.docker.internal:9092 in Kafka broker
My example:
version: '3'
services:
zookeeper:
image: wurstmeister/zookeeper
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
hostname: 'kafka-internal.io'
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka-internal.io
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
Now I can connect inside container using kafka-internal.io:9092 :)
Not the best answer but switching to a Linux host should make the first methodology (localhost:IP) run just fine .
My node js application is throwing a connection timeout in order to connect with Redis instance. I have tried to spin up redis instance as a separate deployment as well as memory store redis instance as well. As a deployment in a pod, I use normal nodeport and tried to access this instance using cluster ip. The ip was in the Config Map.
I tried to ping the ip of memory store as well as cluster ip of redis deployment on gke, from the pod of the node js application, but it did not connect.
As deployment of redis instance also got internal ip: 10.0.231.4
Nothing worked
Memory Store :
gcloud redis instances describe my-redis --region=us-central1
Response:
authorizedNetwork: projects/xxxxx/global/networks/xxxxx
createTime: '2019-09-03T13:39:36.050896298Z'
currentLocationId: us-central1-a
host: 10.0.48.3
locationId: us-central1-a
memorySizeGb: 2
name: projects/xxxxx/locations/us-central1/instances/transact-redis
persistenceIamIdentity: serviceAccount:xxxxxxxxxxx-compute#developer.gserviceaccount.com
port: 6379
redisVersion: REDIS_4_0
reservedIpRange: 10.0.48.0/29
state: READY
tier: BASIC
From cloud shell also, I tried to telnet to 10.0.48.3 on 6379 port. It failed as well.
Here is the log:
2019-09-04 17:20:01.164 CEST at Socket.emit (events.js:209:13)
2019-09-04 17:20:01.164 CEST at emitErrorNT (internal/streams/destroy.js:91:8)
2019-09-04 17:20:01.164 CEST at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
2019-09-04 17:20:01.164 CEST at processTicksAndRejections (internal/process/task_queues.js:77:11) {
2019-09-04 17:20:01.164 CEST errno: 'ETIMEDOUT',
2019-09-04 17:20:01.164 CEST code: 'ETIMEDOUT',
2019-09-04 17:20:01.164 CEST syscall: 'connect',
2019-09-04 17:20:01.164 CEST address: '10.0.48.3',
2019-09-04 17:20:01.164 CEST port: 6379
2019-09-04 17:20:01.164 CEST}
2019-09-04 17:20:06.565 CESTContainer called exit(1).
Any idea how to make it work? Thanks in advance.
Remember that you can connect to your Redis instance from Google Kubernetes Engine clusters that are in the same region and use the same network as your instance.
By the same token, you cannot connect to a Cloud Memorystore for Redis instance from a Google Kubernetes Engine cluster without VPC-native/IP aliasing enabled.
My hypothesis would be that you may either have the cluster on a different zone, not configured your VPC for internal connections, or are on different VPCs. Have you tried this setup to connect Redis to a GKE instance?
Keep me posted on any progress!
I have a node.js server that tries to connect to mongodb (working with mongoose):
mongoose.connect('mongodb://127.0.0.1:27017/ordry', {useNewUrlParser: true, useFindAndModify: false, useCreateIndex: true}).then(result =>{ // 127.0.0.1:27017
console.log("Successfully connected to db!");
}).catch(error =>{
console.log("Error connecting to the database!")
})
Although mongodb is up and running, the connection fails.
I get the following logs:
Thu Jul 18 13:24:50.124 [initandlisten] options: { dbpath: "/home/pi/mongodb/" }
Thu Jul 18 13:24:50.166 [initandlisten] waiting for connections on port 27017
Thu Jul 18 13:24:50.166 [websvr] admin web console waiting for connections on port 28017
Thu Jul 18 13:25:45.647 [initandlisten] connection accepted from 127.0.0.1:50188
1 (1 connection now open)
Thu Jul 18 13:25:45.742 [conn1] end connection 127.0.0.1:50188 (0 connections now open)
EDIT Logs from Node.js:
[nodemon] starting `node ./server/server.js`
{ MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [MongoError: Server at 127.0.0.1:27017 reports maximum wire version 0, but this version of the Node.js Driver requires at least 2 (MongoDB 2.6)]
at Pool.<anonymous> (/home/pi/Desktop/Ordry API/node_modules/mongodb-core/lib/topologies/server.js:431:11)
at Pool.emit (events.js:198:13)
at connect (/home/pi/Desktop/Ordry API/node_modules/mongodb-core/lib/connection/pool.js:557:14)
at callback (/home/pi/Desktop/Ordry API/node_modules/mongodb-core/lib/connection/connect.js:109:5)
at runCommand (/home/pi/Desktop/Ordry API/node_modules/mongodb-core/lib/connection/connect.js:140:7)
at Connection.messageHandler (/home/pi/Desktop/Ordry API/node_modules/mongodb-core/lib/connection/connect.js:334:5)
at Connection.emit (events.js:198:13)
at processMessage (/home/pi/Desktop/Ordry API/node_modules/mongodb-core/lib/connection/connection.js:364:10)
at Socket.<anonymous> (/home/pi/Desktop/Ordry API/node_modules/mongodb-core/lib/connection/connection.js:533:15)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'MongoNetworkError',
errorLabels: [ 'TransientTransactionError' ],
[Symbol(mongoErrorContextSymbol)]: {} }
Conclusion
I am a bit unsure why it is not working here - especially as everything worked fine on windows.
I am using Raspbian on my Raspberry Pi 3b+.
Any help would be appreciated.
usually this happens because you didn't start mongod process before you try starting mongo shell.
1) Delete mongod.lock file from C:\Program
Files\MongoDB\Server\4.0\data
2) Start mongod server
In another terminal - start mongo shell
1) mongo
The error message you get:
reports maximum wire version 0, but this version of the Node.js Driver requires at least 2 (MongoDB 2.6)
Is warning you to upgrade your MongoDB version to 2.6 at least, because it's not supported by the drivers used by the wire library which MongoDB depends on.
It seems that the version of MongoDB (2.4) provided by Raspbian is not supported anymore, so the best way to run a MongoDB server os a Raspberry Pi is to install another Linux distribution like Ubuntu or Arch Linux.
I want to make simple restful API. I am using docker to do this. Here is my Dockerfile:
FROM mongo:3.2
EXPOSE 3000
RUN apt-get update; apt-get install curl -y
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs
ADD . .
CMD node app.js
My docker-compose.yml looks like this:
version: '2'
services:
db:
build: ../images/mongodb
ports:
- "27017:27017"
- "3000:3000"
my app.js file looks like this:
var express = require('express')
var app = express()
var mongoose = require('mongoose');
mongoose.Promise = global.Promise;
mongoose.connect('mongodb://127.0.0.1:27017/sample');
app.get('/', function (req, res) {
res.send('Hello World!')
})
app.listen(3000, function () {
console.log('Example app listening on port 3000!')
})
When run docker-compose up --build, I am having and error:
db_1 | Example app listening on port 3000!
db_1 |
db_1 | events.js:160
db_1 | throw er; // Unhandled 'error' event
db_1 | ^
db_1 | MongoError: failed to connect to server [127.0.0.1:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
db_1 | at Pool.<anonymous> (/node_modules/mongodb-core/lib/topologies/server.js:327:35)
db_1 | at emitOne (events.js:96:13)
db_1 | at Pool.emit (events.js:188:7)
db_1 | at Connection.<anonymous> (/node_modules/mongodb-core/lib/connection/pool.js:274:12)
db_1 | at Connection.g (events.js:291:16)
db_1 | at emitTwo (events.js:106:13)
db_1 | at Connection.emit (events.js:191:7)
db_1 | at Socket.<anonymous> (/node_modules/mongodb-core/lib/connection/connection.js:177:49)
db_1 | at Socket.g (events.js:291:16)
db_1 | at emitOne (events.js:96:13)
db_1 | at Socket.emit (events.js:188:7)
db_1 | at emitErrorNT (net.js:1281:8)
db_1 | at _combinedTickCallback (internal/process/next_tick.js:80:11)
db_1 | at process._tickCallback (internal/process/next_tick.js:104:9)
I have tried to go in docker machine with docker run -it mongo:3.2 /bin/bash
root#67062897d4f0:/# mongo
MongoDB shell version: 3.2.12
connecting to: test
2017-03-23T07:01:07.587+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: errno:111 Connection refused
2017-03-23T07:01:07.588+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:229:14
root#67062897d4f0:/# mongod
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] MongoDB starting : pid=29 port=27017 dbpath=/data/db 64-bit host=67062897d4f0
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] db version v3.2.12
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] git version: ef3e1bc78e997f0d9f22f45aeb1d8e3b6ac14a14
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1t 3 May 2016
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] allocator: tcmalloc
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] modules: none
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] build environment:
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] distmod: debian81
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] distarch: x86_64
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] target_arch: x86_64
2017-03-23T07:01:12.025+0000 I CONTROL [initandlisten] options: {}
2017-03-23T07:01:12.029+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=8G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2017-03-23T07:01:12.222+0000 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2017-03-23T07:01:12.222+0000 I CONTROL [initandlisten]
2017-03-23T07:01:12.223+0000 I CONTROL [initandlisten]
2017-03-23T07:01:12.223+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2017-03-23T07:01:12.223+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2017-03-23T07:01:12.223+0000 I CONTROL [initandlisten]
2017-03-23T07:01:12.228+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2017-03-23T07:01:12.228+0000 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2017-03-23T07:01:12.283+0000 I NETWORK [initandlisten] waiting for connections on port 27017
^C2017-03-23T07:01:13.447+0000 I CONTROL [signalProcessingThread] got signal 2 (Interrupt), will terminate after current cmd ends
2017-03-23T07:01:13.448+0000 I FTDC [signalProcessingThread] Shutting down full-time diagnostic data capture
2017-03-23T07:01:13.453+0000 I CONTROL [signalProcessingThread] now exiting
2017-03-23T07:01:13.453+0000 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets...
2017-03-23T07:01:13.453+0000 I NETWORK [signalProcessingThread] closing listening socket: 5
2017-03-23T07:01:13.453+0000 I NETWORK [signalProcessingThread] closing listening socket: 6
2017-03-23T07:01:13.453+0000 I NETWORK [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
2017-03-23T07:01:13.453+0000 I NETWORK [signalProcessingThread] shutdown: going to flush diaglog...
2017-03-23T07:01:13.453+0000 I NETWORK [signalProcessingThread] shutdown: going to close sockets...
2017-03-23T07:01:13.453+0000 I STORAGE [signalProcessingThread] WiredTigerKVEngine shutting down
2017-03-23T07:01:13.586+0000 I STORAGE [signalProcessingThread] shutdown: removing fs lock...
2017-03-23T07:01:13.586+0000 I CONTROL [signalProcessingThread] dbexit: rc: 0
Can someone please help me solve this ?
Amazing, I'm so glad I found this thread. I am going to add some keywords to it for other people.
If you get this error message, you could be running MongoDB on your local machine while trying to access it from inside a Docker container. The reason is that inside the Docker container, localhost or 127.0.0.1 refers to a different interface than your true local machine.
Error Output:
MongoError: failed to connect to server [127.0.0.1:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
at Pool.<anonymous> (/app/node_modules/mongodb-core/lib/topologies/server.js:329:35)
at emitOne (events.js:96:13)
at Pool.emit (events.js:191:7)
at Connection.<anonymous> (/app/node_modules/mongodb-core/lib/connection/pool.js:280:12)
at Object.onceWrapper (events.js:293:19)
at emitTwo (events.js:106:13)
at Connection.emit (events.js:194:7)
at Socket.<anonymous> (/app/node_modules/mongodb-core/lib/connection/connection.js:187:49)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at emitErrorNT (net.js:1284:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
name: 'MongoError',
message: 'failed to connect to server [127.0.0.1:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]' }
Possible Fixes:
Enable remote connections from your MongoDB, and use your public IP to access it from inside the Docker Container.
Run MongoDB from inside the Container, and then you can refer to it with localhost.
Run another Docker Container, and enable remote connections on it. Investigate bind_ip in the MongoDB config file. Make sure you secure your database with auth credentials. Spend some time ensuring it is secure.
Remote connections are disabled by default in MongoDB, ie: going through a Docker container incorrectly.
Here is a helpful resource: https://hub.docker.com/_/mongo/
The issue I believe is that using CMD node app.js only starts node and not the database. Normally when creating this kind of simple app you use two containers. One for mongo one for node, as you aren't using a custom config for mongo or node you could just use images and map the code in your current folder to the /opt/ directory in the container, meaning all you need is a compose file and potentially don't need any Dockerfile's
Disclaimer obviously this isn't good enough for production, at some point you will probably want to use a Dockerfile for your app as it's best to start node as a user instead of root and put the files in a meaningful directory. But if all you want to do is use as a sandbox this should do.
Your docker compose would look like
version: "2"
services:
db:
image: mongo:3.2
ports:
- 27017
app:
image: node
links:
- db
volumes:
- '.:/opt/'
command: node /opt/app.js
ports:
- 3000:3000
If you want to go full in and specify a Dockerfile for each.
/docker-files/app/Dockerfile
# take from the latest node build
FROM node
# Make a directory /opt/app
RUN mkdir /opt/app
# Set work dir to /opt/app
WORKDIR /opt/app
# Do all your npm install etc....
CMD node app.js
/docker-files/db/Dockerfile
FROM mongo:3.2
# Do some fancy mongo stuff.
/docker-compose.yml
version: "2"
services:
db:
build:
context: docker-files/db
dockerfile: Dockerfile
ports:
- 27017
app:
build:
context: docker-files/app
dockerfile: Dockerfile
links:
- db
volumes:
- '.:/opt/app'
ports:
- 3000:3000
For docker-compose, you need to use a tag networks to link one container node with other. Look:
version: '2'
networks:
app-tier:
driver: bridge
services:
mongodb:
image: 'mongodb:latest'
networks:
- app-net
myapp:
image: 'YOUR_APPLICATION_IMAGE'
networks:
- app-net
I'm trying to get redis running locally. It works fine sometimes, but sometimes I have this problem when starting it. It appears to start fine, but then I can't make any connections to it or use the command line tool. I can't understand why there would be no errors when starting redis, it says its running on 6379, but won't respond on that port.
Toms-MBP:tinder-art tomchambers$ redis-server
[86521] 23 Apr 18:37:22.427 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[86521] 23 Apr 18:37:22.429 * Increased maximum number of open files to 10032 (it was originally set to 256).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.8.19 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 86521
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[86521] 23 Apr 18:37:22.431 # Server started, Redis version 2.8.19
[86521] 23 Apr 18:37:22.432 * DB loaded from disk: 0.000 seconds
[86521] 23 Apr 18:37:22.432 * The server is now ready to accept connections on port 6379
Toms-MBP:tinder-art tomchambers$ redis-cli monitor
Error: Server closed the connection
^CToms-MBP:tinder-art tomchambers$ node app.js
Connecting to local redis
Connecting to local redis
Server started 3000
Redis error: [Error: Ready check failed: Redis connection to 127.0.0.1:6379 failed - read ECONNRESET]
Redis error: [Error: Redis connection to 127.0.0.1:6379 failed - read ECONNRESET]
Redis error: [Error: Ready check failed: Redis connection to 127.0.0.1:6379 failed - read ECONNRESET]
Redis error: [Error: Redis connection to 127.0.0.1:6379 failed - read ECONNRESET]
Redis error: [Error: Ready check failed: Redis connection gone from end event.]
Redis error: [Error: Ready check failed: Redis connection gone from end event.]
Redis error: [Error: Ready check failed: Redis connection gone from end event.]
Redis error: [Error: Ready check failed: Redis connection gone from end event.]
Redis error: [Error: Ready check failed: Redis connection gone from end event.]