I have currently a fully working version of OpenVidu 2.14 in our data center using letsencrypt for developing and testing an app we developed using OpenVidu. We are ready for more extensive testing and we choose to instal OpenVidu2.15 and use our certificate on a different server using a the Docker deployment for a vanilla system. We got our certificates and place in the suggested folder “/opt/openvidu/owncert”. Configuration file .env modified to use owncert and open all ports, currently the ufw is disabled.
openVidu started with the expected .env not found error and a warning about SERVER_PORT (which I don’t understand):
[WARN] 2020-07-30 16:47:27,205 [main] io.openvidu.server.OpenViduServer - You have set property server.port (or SERVER_PORT). This will serve OpenVidu Server on your host at port 5443. But property HTTPS_PORT (443) still configures the port that should be used to connect to OpenVidu Server from outside. Bear this in mind when configuring a proxy in front of OpenVidu Server.
The problem is that connections to the server from client web are being rejected with “ERR_CONNECTION_REFUSED”.
Here is the configuration reflected by the openVidu start command:
openvidu-server_1 | Configuration properties
openvidu-server_1 | ------------------------
openvidu-server_1 |
openvidu-server_1 | * CERTIFICATE_TYPE=owncert
openvidu-server_1 | * DOMAIN_OR_PUBLIC_IP= xxx.xxxx.xxxx <------(will provide upon request)
openvidu-server_1 | * HTTPS_PORT=443
openvidu-server_1 | * KMS_URIS=[“ws://localhost:8888/kurento”]
openvidu-server_1 | * OPENVIDU_CDR=false
openvidu-server_1 | * OPENVIDU_CDR_PATH=/opt/openvidu/cdr
openvidu-server_1 | * OPENVIDU_RECORDING=false
openvidu-server_1 | * OPENVIDU_RECORDING_AUTOSTOP_TIMEOUT=120
openvidu-server_1 | * OPENVIDU_RECORDING_COMPOSED_URL=
openvidu-server_1 | * OPENVIDU_RECORDING_CUSTOM_LAYOUT=/opt/openvidu/custom-layout
openvidu-server_1 | * OPENVIDU_RECORDING_DEBUG=false
openvidu-server_1 | * OPENVIDU_RECORDING_NOTIFICATION=publisher_moderator
openvidu-server_1 | * OPENVIDU_RECORDING_PATH=/opt/openvidu/recordings
openvidu-server_1 | * OPENVIDU_RECORDING_PUBLIC_ACCESS=false
openvidu-server_1 | * OPENVIDU_RECORDING_VERSION=2.15.0
openvidu-server_1 | * OPENVIDU_SECRET=MITEM_SECRET
openvidu-server_1 | * OPENVIDU_SESSIONS_GARBAGE_INTERVAL=900
openvidu-server_1 | * OPENVIDU_SESSIONS_GARBAGE_THRESHOLD=3600
openvidu-server_1 | * OPENVIDU_STREAMS_VIDEO_MAX_RECV_BANDWIDTH=1000
openvidu-server_1 | * OPENVIDU_STREAMS_VIDEO_MAX_SEND_BANDWIDTH=1000
openvidu-server_1 | * OPENVIDU_STREAMS_VIDEO_MIN_RECV_BANDWIDTH=300
openvidu-server_1 | * OPENVIDU_STREAMS_VIDEO_MIN_SEND_BANDWIDTH=300
openvidu-server_1 | * OPENVIDU_WEBHOOK=false
openvidu-server_1 | * OPENVIDU_WEBHOOK_ENDPOINT=
openvidu-server_1 | * OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged]
openvidu-server_1 | * OPENVIDU_WEBHOOK_HEADERS=[]
The “netstat -lntup” gives the following: (note that 443 is missing)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 10720/nginx: master
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 867/systemd-resolve
tcp 0 0 172.17.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 172.17.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 10.65.1.202:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 10.65.1.202:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 172.17.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 172.17.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 127.0.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 10.65.1.202:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 172.17.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 127.0.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 127.0.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 10.65.1.202:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 10.65.1.202:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 127.0.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 127.0.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 172.17.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 172.17.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 10.65.1.202:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 10.65.1.202:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 127.0.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 127.0.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 172.17.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 10.65.1.202:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 127.0.0.1:3478 0.0.0.0:* LISTEN 10855/turnserver
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 964/sshd: /usr/sbin
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 10896/redis-server
tcp6 0 0 :::22 :::* LISTEN 964/sshd: /usr/sbin
tcp6 0 0 ::1:3478 :::* LISTEN 10855/turnserver
tcp6 0 0 ::1:3478 :::* LISTEN 10855/turnserver
tcp6 0 0 ::1:3478 :::* LISTEN 10855/turnserver
tcp6 0 0 ::1:3478 :::* LISTEN 10855/turnserver
tcp6 0 0 ::1:3478 :::* LISTEN 10855/turnserver
tcp6 0 0 ::1:3478 :::* LISTEN 10855/turnserver
tcp6 0 0 ::1:3478 :::* LISTEN 10855/turnserver
tcp6 0 0 ::1:3478 :::* LISTEN 10855/turnserver
tcp6 0 0 :::8888 :::* LISTEN 10805/kurento-media
tcp6 0 0 :::5442 :::* LISTEN 10678/node
tcp6 0 0 :::9090 :::* LISTEN 1120/prometheus
tcp6 0 0 :::5443 :::* LISTEN 10653/java
udp 0 0 172.17.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 172.17.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 172.17.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 172.17.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 172.17.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 172.17.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 172.17.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 172.17.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 10.65.1.202:3478 0.0.0.0:* 10855/turnserver
udp 0 0 10.65.1.202:3478 0.0.0.0:* 10855/turnserver
udp 0 0 10.65.1.202:3478 0.0.0.0:* 10855/turnserver
udp 0 0 10.65.1.202:3478 0.0.0.0:* 10855/turnserver
udp 0 0 10.65.1.202:3478 0.0.0.0:* 10855/turnserver
udp 0 0 10.65.1.202:3478 0.0.0.0:* 10855/turnserver
udp 0 0 10.65.1.202:3478 0.0.0.0:* 10855/turnserver
udp 0 0 10.65.1.202:3478 0.0.0.0:* 10855/turnserver
udp 0 0 127.0.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 127.0.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 127.0.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 127.0.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 127.0.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 127.0.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 127.0.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 127.0.0.1:3478 0.0.0.0:* 10855/turnserver
udp 0 0 127.0.0.53:53 0.0.0.0:* 867/systemd-resolve
udp6 0 0 ::1:3478 :::* 10855/turnserver
udp6 0 0 ::1:3478 :::* 10855/turnserver
udp6 0 0 ::1:3478 :::* 10855/turnserver
udp6 0 0 ::1:3478 :::* 10855/turnserver
udp6 0 0 ::1:3478 :::* 10855/turnserver
udp6 0 0 ::1:3478 :::* 10855/turnserver
udp6 0 0 ::1:3478 :::* 10855/turnserver
udp6 0 0 ::1:3478 :::* 10855/turnserver
and the “docker-compose logs -f nginx”:
nginx_1 |
nginx_1 | =======================================
nginx_1 | = INPUT VARIABLES =
nginx_1 | =======================================
nginx_1 |
nginx_1 | Config NGINX:
nginx_1 | - Http Port: 80
nginx_1 | - Https Port: 443
nginx_1 | - Allowed Access in Openvidu Dashboard: all
nginx_1 | - Allowed Access in Openvidu API: all
nginx_1 |
nginx_1 | Config Openvidu Application:
nginx_1 | - Domain name: xxx.xxxx.xxxx
nginx_1 | - Certificated: owncert
nginx_1 | - Letsencrypt Email:
nginx_1 | - Openvidu Application: true
nginx_1 | - Openvidu Application Type: CE
nginx_1 |
nginx_1 | =======================================
nginx_1 | = CONFIGURATION NGINX =
nginx_1 | =======================================
nginx_1 |
nginx_1 | Configure (will provide upon request) domain…
nginx_1 | - New configuration: owncert
nginx_1 | - Old configuration: owncert
nginx_1 | - Owmcert certificate already exists, using them…
nginx_1 |
nginx_1 | =======================================
nginx_1 | = ALLOWED ACCESS =
nginx_1 | =======================================
nginx_1 |
nginx_1 | Adding rules…
nginx_1 |
nginx_1 | Finish Rules:
nginx_1 | Openvidu Dashboard:
nginx_1 | - allow all;
nginx_1 | Openvidu API:
nginx_1 | - allow all;
nginx_1 |
nginx_1 | =======================================
nginx_1 | = START OPENVIDU PROXY =
nginx_1 | =======================================
nginx_1 |
nginx_1 | 2020/07/30 16:47:26 [emerg] 63#63: cannot load certificate “/etc/letsencrypt/live/crtc.mitem.com/fullchain.pem”: PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
nginx_1 | nginx: [emerg] cannot load certificate “/etc/letsencrypt/live/crtc.mitem.com/fullchain.pem”: PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
nginx_1 | 2020/07/30 16:48:20 [error] 11#11: *1 “/etc/nginx/html/index.html” is not found (2: No such file or directory), client: 96.86.174.45, server: , request: “GET / HTTP/1.1”, host: “crtc.mitem.com”
nginx_1 | 2020/07/30 16:48:20 [error] 11#11: *1 open() “/etc/nginx/html/favicon.ico” failed (2: No such file or directory), client: 96.86.174.45, server: , request: “GET /favicon.ico HTTP/1.1”, host: “xxxx.xxxxx.xxxxx”, referrer: “http:/xxxx.xxxx.xxxx/”
nginx_1 | 2020/07/30 16:48:38 [error] 11#11: *2 “/etc/nginx/html/index.html” is not found (2: No such file or directory), client: 76.220.16.161, server: , request: “GET / HTTP/1.1”, host: “xxxx.xxx.xxxx”
nginx_1 | 2020/07/30 16:48:42 [error] 11#11: *2 “/etc/nginx/html/index.html” is not found (2: No such file or directory), client: 76.220.16.161, server: , request: “GET / HTTP/1.1”, host: “xxxx.xxx.xxxx”
==============================================================
I am completely confused, on what I am doing wrong? Can you please help!
Thanks