frappe.publish_realtime is working on production setup. It is not working on bench start
error in bench start
20:48:10 socketio.1 | listening on *: 9001
20:48:12 socketio.1 | { Error: connect ECONNREFUSED 0.0.0.0:8000
20:48:12 socketio.1 | at Object.exports._errnoException (util.js:1012:11)
20:48:12 socketio.1 | at exports._exceptionWithHostPort (util.js:1035:20)
20:48:12 socketio.1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
20:48:12 socketio.1 | code: 'ECONNREFUSED',
20:48:12 socketio.1 | errno: 'ECONNREFUSED',
20:48:12 socketio.1 | syscall: 'connect',
20:48:12 socketio.1 | address: '0.0.0.0',
20:48:12 socketio.1 | port: 8000,
20:48:12 socketio.1 | response: undefined }
Browser Console after bench start
http://0.0.0.0:9001/socket.io/?EIO=3&transport=polling&t=1470928684822-5 net::ERR_CONNECTION_REFUSED
If the same development setup is changed to production with frappe-bench.conf files and starting services, frappe.publish_realtime starts working.