Hello. Our process uses some ports, by default it is: 3001,3004,8080.
3001,3004 - are for application and can be easily be changed, but we tryed to change erizo port 8080 to 443
config.nuve.testErizoController = 'localhost:443'; // default value: 'localhost:8080' config.erizoController.port = 443; //default value: 8080
To allow to change prots less then 1024 we used
sudo apt-get install libcap2-bin sudo setcap cap_net_bind_service=+ep /home/xxx/.nvm/v0.10.26/bin/node
but we recieved error like:
module.js:356 Module._extensions[extension](this, filename); ^ Error: libmcu.so: cannot open shared object file: No such file or directory at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/home/oracle/Release-v2.0/mcu/erizoJS/erizoJSController.js:1:75) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)
Another log information is in attachment;448503
So, what we did wrang and how to change ports?
The problem got out when we made
sudo setcap -r /home/xxx/.nvm/v0.10.26/bin/node
According to the error info you provided, it looks like some Node package is missing from the installation.
Could you help do some further investigation on this and provide more details? It does not seem to be a port change issue...
Yes of cause I wiil help as I can.
No - all node modules are ok. that Error exists only when use setcap(and port 443). When remove it - all goes ok.
We also tryed to rebind ports with
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080
But in that case we couldn't connect to 443 because getTocken in base64 returned 8080 port.
So we don't know how to change 8080 to 443 - because 8080 - is closed in some private networks and 443 - is practically always opened.
We tested the approach of "sudo
setcap cap_net_bind_service=+ep /home/xxx/.nvm/v0.10.26/bin/node", it works fine for configuring the port to 443. But anyway in case the libmcu.so is missing, remember to make the MCU library be able being found by putting the MCU library path into /etc/ld.so.conf.d.
In new version 2.1 we try to bind erizo to 443 port, but faced with the similar problem.
1) We made
sudo setcap cap_net_bind_service=+ep ~/.nvm/v0.10.33/bin/node
2) create file
sudo vim /etc/ld.so.conf.d/mcu.conf
3) Start mcu
and it creates huge number of files erizo-.... with text:
webrtc_mcu: error while loading shared libraries: libuv.so.0.10: cannot open shared object file: No such file or directory
And to stop creating new files we have
to kill node ./../erizoAgent/erizoAgent.js -I 1
Stop scripts don't kill it.
PS libuv.so.0.10 - exists in lib direcory.
When we remove setcap - all well again
Log folder with one of wrang file: 453525