could you please share more information on the configuration, is it a --production installation, does it have DNS multitenant on? Have you checked your firewall settings (if applicable) if this might be blocking this call?
Thanks for you reply. I’m using a EC2 Ubuntu instance hosted at Amazon Web Services. It is a production installation with DNS mutitenant OFF. I made sure incoming TCP port 9000 was open to all traffic sources (0.0.0.0/0 and ::/0) in instance security group settings.
and add below the code in socketio.js if cipher mismatch error occur
var app = require('express')();
//var server = require('https').Server(app);
var cookie = require('cookie')
var fs = require('fs');
let options = {
key: fs.readFileSync("path/to/ssl/key"),
cert: fs.readFileSync("path/to/ssl/.crt file")
};
var server = require('https').Server(options,app);
.
.......
It seems that socketio in the browser is trying to GET on port 9000, while under https it is served without port.
For example my site is on https:// erp .example. com. Socketio in the browser is polling on https:// erp. example.com:9000, while it should be polling on https: //erp. example.com.
bench setup socketio;
sudo supervisorctl restart all; # Or stop and start "bench" some other way.
It seems to work now
A good check if socketio is doing its job is to like a post in Social.
It’s quick and easy since you can (stupidly) like your own post.
Go to the “Social” module, create a post then click on the heart. If you have to refresh the page to get it to turn red then SocketIO is still misconfigured. Otoh, if it turns red after a moment, you can be sure you’ve got SocketIO firing on all cylinders.
I tried your solution, but it didn’t work. Seems to be a problem because I have enabled https (and maybe because it is on a subdomain?). I think an update to socketio.js in apps/frappe is required to solve this.
sudo -A bench setup supervisor;
sudo -A supervisorctl restart all;
bench setup socketio;
sudo -A supervisorctl restart all;
sudo -A service nginx stop;
sudo -A service nginx start;
Did you have a look at : ${BENCH}/logs/node-socketio.error.log ??
Did you reboot?
Did you R your browser page to force a full complete reload?
Error: listen EADDRINUSE: address already in use :::9000
at Server.setupListenHandle [as _listen2] (net.js:1313:16)
at listenInCluster (net.js:1361:12)
at Server.listen (net.js:1447:7)
at Object.<anonymous> (/home/erpmwp/frappe-bench/apps/frappe/socketio.js:26:8)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1340:8)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 9000
}
However I’m not sure if this is from now or from during the setup.