Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
156 Views

Alternative ports 80, 443

alternative ports
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

 

Tags (2)
0 Kudos
7 Replies
Highlighted
156 Views

Hi Artem,

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...

0 Kudos
Highlighted
New Contributor I
156 Views

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.

0 Kudos
Highlighted
156 Views

Hi Artem,

People from our team is working on some best practice to solve your problem. Sorry for the late reply on this thread, and thanks for your patience.

0 Kudos
Highlighted
156 Views

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.

0 Kudos
Highlighted
New Contributor I
156 Views

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  

 

with

/home/.../Release-v2.1/lib

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

0 Kudos
Highlighted
New Contributor I
156 Views

Full remove of node modules, MCU

And full install - helped. We could use 443 port again

0 Kudos
Highlighted
156 Views

Hi Artem,

Great to see it solved! Thanks for your efforts and continuous feedback.

0 Kudos