Bench start throw er; // Unhandled 'error' event

I am triying many time, but always give me this error when I run bench start

:08:24 socketio.1    | node:events:491
08:08:24 socketio.1    |       throw er; // Unhandled 'error' event
08:08:24 socketio.1    |       ^
08:08:24 socketio.1    | 
08:08:24 socketio.1    | Error: connect ECONNREFUSED 127.0.0.1:12006
08:08:24 socketio.1    |     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
08:08:24 socketio.1    | Emitted 'error' event on RedisClient instance at:
08:08:24 socketio.1    |     at RedisClient.on_error (/Users/mac/Develop/frappe-bench-103wi/apps/frappe/node_modules/redis/index.js:342:14)
08:08:24 socketio.1    |     at Socket.<anonymous> (/Users/mac/Develop/frappe-bench-103wi/apps/frappe/node_modules/redis/index.js:223:14)
08:08:24 socketio.1    |     at Socket.emit (node:events:513:28)
08:08:24 socketio.1    |     at emitErrorNT (node:internal/streams/destroy:157:8)
08:08:24 socketio.1    |     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
08:08:24 socketio.1    |     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
08:08:24 socketio.1    |   errno: -61,
08:08:24 socketio.1    |   code: 'ECONNREFUSED',
08:08:24 socketio.1    |   syscall: 'connect',
08:08:24 socketio.1    |   address: '127.0.0.1',
08:08:24 socketio.1    |   port: 12006
08:08:24 socketio.1    | }
+----------+------------+------------+---------+
| App      | Version    | Branch     | Commit  |
+----------+------------+------------+---------+
| erpnext  | 14.52.1    | version-14 | 7b6f25c |
| frappe   | 14.57.0    | version-14 | a403c47 |
| hrms     | 16.0.0-dev | develop    | a741b51 |
| payments | 0.0.1      | develop    | 523b184 |
+----------+------------+------------+---------+

The fact that your system is looking at port 12006 (normally 12000) probably means that you already have an instance stuck or running in the background.
Have a look at this post which offers a fix

2 Likes