Error when using RethinkDB trying to connectt to local host


#1
Fail to create a new connection for the connection pool. Error:{"msg":"Failed to connect to localhost:28015\nFull error:\n{\"errno\":\"ECONNREFUSED\",\"code\":\"ECONNREFUSED\",\"syscall\":\"connect\",\"address\":\"127.0.0.1\",\"port\":28015}","message":"Failed to connect to localhost:28015\nFull error:\n{\"errno\":\"ECONNREFUSED\",\"code\":\"ECONNREFUSED\",\"syscall\":\"connect\",\"address\":\"127.0.0.1\",\"port\":28015}.","isOperational":true}

I followed this guide on using RethinkDB in a node.js file but I got this error without any commands run. The project can’t access the localhost port as it says.

Link to project:


#2

Your code defines multiple listeners on different ports. Try setting a single listener on a single port, like 3000 or process.env.PORT, and consistently referencing that elsewhere in your code.


#3

Good Morning Gareth,

Thank you for your response it fixed my issue! :grin:

Deniernal354