# Our Web content under Docker does not connect with Openvidu Server

**URL:** <https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [August 4, 2020, 10:33am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715 "2020-08-04T10:33:12Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 4, 2020, 10:33am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/1 "2020-08-04T10:33:12Z")

</div>

Hello,  
I am updating the web content of my video portal from OpenVidu 2.12.0 to version 2.15.0. For this I have converted the original web content to a Docker image and have configured the file /opt/openvidu/docker-compose.override.yml to start this web content.  
Now when I intend to start a video conference through my web content, I always get an error message stating:

\<No connection to OpenVidu Server. This may be a certificate error at “http: // localhost: 5443”  
Click OK to navigate and accept it. if no certificate warning is shown, then check that your OpenVidu server is up and running at “http: // localhost: 5443”\>

Then I do not access to the media resources and never open the video meeting.

If I return the docker-compose.override.yml file to the original, then the demo call works fine.

The web environment than we want to update, on version 2.12.0 without docker is also working correctly.

Could you shed some light on the reason for this error?

Thank you very much and greetings.

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [August 4, 2020, 11:18am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/2 "2020-08-04T11:18:41Z")

</div>

Have you followed these instructions to deploy your own dockerized application along OpenVidu? [https://docs.openvidu.io/en/latest/deployment/deploying-openvidu-apps/#with-docker](https://docs.openvidu.io/en/latest/deployment/deploying-openvidu-apps/#with-docker)

---

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 4, 2020, 4:27pm UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/3 "2020-08-04T16:27:23Z")

</div>

Hi Pablo, thanks for your reply.  
Yes, I followed that information during startup, but it seems that the situation is more complicated, I will try to explain my environments.

Initially we set up a development environment for a video-service application on OpenVidu 2.12.0, installing on an AWS environment following the instructions of the link [https://docs.openvidu.io/en/2.12.0/deployment/](https://docs.openvidu.io/en/2.12.0/deployment/) deploying-aws /; This installation turned out without Docker, with Nginx as the web server where the values of OPENVIDU\_SERVER\_URL and OPENVIDU\_SERVER\_SECRET are configured on the document /var/www/html/js/app.js,

Now we intended to mount a more current environment for production, with the web content that we have in development, but we found that the 2.15.x installations are based on Docker. Therefore, a Docker-nginx container has been mounted where we have loaded the development web content, configuring it as follows:

The configuration of the connection variables with the Openvidu server in js / app.js is maintained.

var OPENVIDU\_SERVER\_URL = “http: // localhost: 5443”  
var OPENVIDU\_SERVER\_SECRET = “MyOpenviduPass”;

We copy the web content and the nginx configuration into the container, through a dockerfile file to create the image:  
Web content in / usr / share / nginx / html /  
Nginx configuration in /etc/nginx/conf.d/default.conf  
server {  
listen 5442;  
listen [::]: 5442;  
…

After obtaining the Docker image with the Web content, we edit docker-compose.override.yml to start this container along with the rest for the Openvidu service …

/ opt / openvidu # ./openvidu start  
Creating openvidu\_nginx\_1 … done  
Creating openvidu\_kms\_1 … done  
Creating openvidu\_openvidu-server\_1 … done  
Creating openvidu\_smartic\_1 … done  
Creating openvidu\_redis\_1 … done  
Creating openvidu\_coturn\_1 … done  
Attaching to openvidu\_openvidu-server\_1

But when trying to access the video service, you always get the indicated error message.

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [August 4, 2020, 10:40pm UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/4 "2020-08-04T22:40:37Z")

</div>

Can you share with us your .env configuration and your docker-compose.override.yml? It seems like your application can’t resolve localhost, Maybe you’re not running your app with `network_mode: host`.?

---

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 5, 2020, 7:35am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/5 "2020-08-05T07:35:29Z")

</div>

Hello!  
Yes, I put here a copy of this files…

I can see that the web content calls the library openvidu-browser-2.12.0.js. To update it to version 2.15.0, in this part it is enough to load and call the library openvidu-browser-2.15.0.js ?, Are there other changes to the web content part to update the version?

js# ls -l  
total 1676  
-rw-rw-r-- 1 www-data www-data 64889 Aug 4 12:04 app.js  
-rw-r–r-- 1 www-data www-data 64844 Jul 30 16:18 app.js.orig  
-rw-rw-r-- 1 www-data www-data 127133 May 20 09:16 html2canvas.js  
-rw-rw-r-- 1 www-data www-data 2813 Jul 28 09:53 javascript.js  
-rw-rw-r-- 1 www-data www-data 11290 Jul 28 09:53 modal-loading.js  
-rw-rw-r-- 1 www-data www-data 150941 Jul 28 09:53 moment.js  
-rw-rw-r-- 1 www-data www-data 1282417 Jul 28 09:53 openvidu-browser-2.12.0.js

---

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 5, 2020, 7:37am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/6 "2020-08-05T07:37:39Z")

</div>

Here is the docker-compose.override.yml content, (I tried with lots of changes in it configuration, but always get the same results):

version: ‘3.1’

services:  
# --------------------------------------------------------------  
#  
# Change this if your want use your own application.  
# It’s very important expose your application in port 5442  
# and use the http protocol.  
#  
# Default Application  
#  
# Openvidu-Smartic Version: 1.0.0  
#  
# --------------------------------------------------------------  
smartic:  
image: openvidu-smartic  
restart: on-failure  
network\_mode: host  
environment:  
- SERVER\_PORT=5442  
- OPENVIDU\_URL=http://localhost:5443  
- OPENVIDU\_SECRET={OPENVIDU\_SECRET} - CALL\_OPENVIDU\_CERTTYPE={CERTIFICATE\_TYPE}  
# - OPENVIDU\_SERVER\_URL=http://localhost:5443  
# - OPENVIDU\_SERVER\_SECRET={OPENVIDU\_SECRET} # - CALL\_OPENVIDU\_CERTTYPE={CERTIFICATE\_TYPE}

---

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 5, 2020, 7:47am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/7 "2020-08-05T07:47:26Z")

</div>

I can’t send you a .env file copy by here, I get the message “Sorry, new users can only put 2 links in a post”

Please, How can i send you a .env file copy?

Thanks

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [August 5, 2020, 9:24am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/8 "2020-08-05T09:24:00Z")

</div>

You can paste it here in the post. By using “`” character. In this way it is more readable. Example:

` ` ```  
DOMAIN\_OR\_PUBLIC\_IP=XXX.XXX.XXX  
OPENVIDU\_SECRET=xxxxx  
…

` ` ```

Also, It’s all services running? What is the output of `docker ps` ?

---

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 5, 2020, 9:42am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/9 "2020-08-05T09:42:47Z")

</div>

Here is the docker ps output

# docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES  
a77eae381d07 openvidu/openvidu-proxy:3.0.0 “/bin/sh -c /usr/loc…” 4 minutes ago Up 4 minutes openvidu\_nginx\_1  
a3cde12cd3e5 openvidu-smartic “/docker-entrypoint.…” 4 minutes ago Up 4 minutes openvidu\_smartic\_1  
6ace905acbed openvidu/openvidu-redis:1.0.0 “docker-entrypoint.s…” 4 minutes ago Up 4 minutes openvidu\_redis\_1  
ae8118f6020f openvidu/openvidu-server:2.15.0 “/bin/bash -c 'expor…” 4 minutes ago Up 4 minutes openvidu\_openvidu-server\_1  
4789b1260831 kurento/kurento-media-server:6.14.0 “/entrypoint.sh” 4 minutes ago Up 4 minutes (healthy) openvidu\_kms\_1  
2124b3f5cd6c openvidu/openvidu-coturn:1.0.0 “/bin/sh -c /usr/loc…” 4 minutes ago Up 4 minutes openvidu\_coturn\_1

---

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 5, 2020, 9:45am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/10 "2020-08-05T09:45:13Z")

</div>

And the resume of .env is…

DOMAIN\_OR\_PUBLIC\_IP=[css.reunionporvideo.com](http://css.reunionporvideo.com)  
OPENVIDU\_SECRET=MyOpenviduPass

CERTIFICATE\_TYPE=letsencrypt

# If CERTIFICATE\_TYPE=letsencrypt, you need to configure a valid email for notifications

LETSENCRYPT\_EMAIL=mjlopez@smartic.es

# Whether to enable recording module or not

OPENVIDU\_RECORDING=false

# Use recording module with debug mode.

OPENVIDU\_RECORDING\_DEBUG=false

# Openvidu Folder Record used for save the openvidu recording videos. Change it

# with the folder you want to use from your host.

OPENVIDU\_RECORDING\_PATH=/opt/openvidu/recordings

# System path where OpenVidu Server should look for custom recording layouts

OPENVIDU\_RECORDING\_CUSTOM\_LAYOUT=/opt/openvidu/custom-layout

OPENVIDU\_RECORDING\_PUBLIC\_ACCESS=false

OPENVIDU\_RECORDING\_NOTIFICATION=publisher\_moderator

OPENVIDU\_RECORDING\_AUTOSTOP\_TIMEOUT=120

OPENVIDU\_STREAMS\_VIDEO\_MAX\_RECV\_BANDWIDTH=1000

OPENVIDU\_STREAMS\_VIDEO\_MIN\_RECV\_BANDWIDTH=300

OPENVIDU\_STREAMS\_VIDEO\_MAX\_SEND\_BANDWIDTH=1000

OPENVIDU\_STREAMS\_VIDEO\_MIN\_SEND\_BANDWIDTH=300

OPENVIDU\_WEBHOOK=false

OPENVIDU\_WEBHOOK\_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged]

OPENVIDU\_SESSIONS\_GARBAGE\_INTERVAL=900

OPENVIDU\_SESSIONS\_GARBAGE\_THRESHOLD=3600

OPENVIDU\_CDR=false

# Path where the cdr log files are hosted

OPENVIDU\_CDR\_PATH=/opt/openvidu/cdr

---

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 5, 2020, 9:46am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/11 "2020-08-05T09:46:34Z")

</div>

Also I can the web site runing but when i try to stablish a videoreunion, i have the openvidu-server conection error

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [August 5, 2020, 11:29am UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/12 "2020-08-05T11:29:16Z")

</div>

I see thah OpenVidu api is accessible via [https://css.reunionporvideo.com](https://css.reunionporvideo.com). It seems like you’re using openvidu-browser directly via browser, am I right?.

In the source code that you’re using in [https://css.reunionporvideo.com](https://css.reunionporvideo.com) at `app.js` I see a wrong variable:  
 ![imagen](https://global.discourse-cdn.com/free1/uploads/openvidu/original/1X/ad05ca9af14477b34dacf6251f864b1235ee8d95.png)

If it’s the browser the one who’s communicating with OpenVidu, this url can’t be `http://localhost:5443`. With this url, when the webpage is loaded by a client in his own browser, the browser will try to communicate to `http://localhost:5443`, so the browser is trying to communicate to OpenVidu as it is in his own machine!!

It should be:

```auto
var OPENVIDU_SERVER_URL="https://css.reunionporvideo.com"

```

I think that’s why your app is complaining about:

```auto
<No connection to OpenVidu Server. This may be a certificate error at “http: // localhost: 5443”
Click OK to navigate and accept it. if no certificate warning is shown, then check that your OpenVidu server is up and running at “http: // localhost: 5443”>

```

---

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 5, 2020, 12:28pm UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/13 "2020-08-05T12:28:57Z")

</div>

Thank you very much, I did not understand correctly this variable!

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [August 5, 2020, 1:06pm UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/14 "2020-08-05T13:06:07Z")

</div>

Is your deployment working?

---

<div class="post-metadata">

**Author:** ![emeneses](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/emeneses/32/843_2.png) [@emeneses](https://openvidu.discourse.group/u/emeneses)\
**Post date:** [August 5, 2020, 2:25pm UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/15 "2020-08-05T14:25:57Z")

</div>

Yes, Its working yet!!. Thanks…

---

<div class="post-metadata">

**Author:** ![vipin\_mishra](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vipin_mishra/32/32_2.png) [@vipin\_mishra](https://openvidu.discourse.group/u/vipin_mishra)\
**Post date:** [August 5, 2020, 3:04pm UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/16 "2020-08-05T15:04:28Z")

</div>

nice @cruizba  
it looks today you are in the mood 😅 😅

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [August 5, 2020, 3:12pm UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/17 "2020-08-05T15:12:48Z")

</div>

Haha, somedays things seems to works :). I’ll update soon (this week) [openvidu.io](http://openvidu.io) docs, with troubleshooting section for nginx and deployment common problems.

Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![vipin\_mishra](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vipin_mishra/32/32_2.png) [@vipin\_mishra](https://openvidu.discourse.group/u/vipin_mishra)\
**Post date:** [August 5, 2020, 3:15pm UTC](https://openvidu.discourse.group/t/our-web-content-under-docker-does-not-connect-with-openvidu-server/1715/18 "2020-08-05T15:15:22Z")

</div>

oh nice man  
seen the guidelines look’s nice  
[https://openvidu.discourse.group/guidelines](https://openvidu.discourse.group/guidelines)  
congratulations to openvidu team
