No Internet Environment Openvidu start error

If you start openvidu while there is no internet, it fails to start and an error appears.

In the system configuration, a PC is connected to the router through an internal network.
The error is:
dig: couldn’t get address for ‘resolver1.opendns.com’: failure
dig: couldn’t get address for ‘ns1.google.com’: failure
dig: couldn’t get address for ‘ns1-1.akamaitech.net’: failure
[/usr/local/bin/discover_my_public_ip.sh] Discovery failed

What’s the problem?
The same error occurs even if I try to set the DOMAIN_OR_PUBLIC_IP item value in the .env file to 210.111.220.29 and to set the internal IP to 192.168.2.10.

What do you think is the problem? :wink: There is no internet and OpenVidu defaults are set for common cloud environments.

Try this:

  1. Define in your /opt/openvidu/.env this environment variables:
COTURN_IP=<PRIVATE_IP_REACHABLE_BY_CLIENTS>
PROXY_PUBLIC_IP=<PRIVATE_IP_REACHABLE_BY_CLIENTS>
DOMAIN_OR_PUBLIC_IP=<PRIVATE_IP_REACHABLE_BY_CLIENTS>

More info on advanced configuration parameters here

Thank you Solved.
It works fine.

1 Like

One doubt, as of now after deploying openvidu as on-premise solution when i start the service it tries to access - COTURN IP: 14.142.3.154 which i think is public ip.
If we dont have internet access then what ip we need to set for COTURN.
Also do we need to install COTURN SERVER on our local machine.
Please suggest.

What do you mean by “don’t have internet access” ?

I suppose you are talking about some kind of subnet network not reachable through public IP. Try to configure in COTURN_IP the private IP of OpenVidu Server in that network.

Regards

Yes, we have subnet network only.
IP of openvidu server is - 192.168.148.186
I have made following changes in .env file:
COTURN_IP=192.168.148.186
PROXY_PUBLIC_IP=192.168.148.186
DOMAIN_OR_PUBLIC_IP=192.168.148.186
But in logs it is coming as “io.openvidu.server.coturn.CoturnCredentialsService - COTURN IP: 14.142.3.154”
How to configure COTURN_IP and in which file changes need to be made?
Could you please help in this?

You need to add /opt/openvidu/.env the parameter COTURN_IP=192.168,148.186. Did you deployed following official deployment instructions?

Hi,
After adding paramter COTURN_IP=192.168.148.186. its not working. Do i need to seperately install coturn server on my machine?

Please help.

Hi,
what means “not working”?
Do you want to use OpenVidu only for internal communication inside your local network?

Yes. We want to setup openvidu on our private network only.

If you just want to use it inside your private network, a COTURN server should not be necessary. You would need if users behind different NATs or firewalls want to connect to each other. If I turn off our COTURN server and then start a session in our private network - all participants can hear and see each other.
Because of this I asked you what do you mean with “not working”. Are you only missing audio and video or does the complete connection fail?

We are setting up the environment in our private network but video conference can be done with client who is not in our network. After setting COTURN_IP=192.168.148.186, openvidu is trying to access COTURN on IP - 14.142.3.154
[INFO] 2022-08-22 11:26:44,915 [main] io.openvidu.server.coturn.CoturnCredentialsService - COTURN IP: 14.142.3.154.
Please help to resolve it.

OK - your OpenVidu server is part of your private network - but the server has no public IP? It only has access to the internet over a proxy or gateway?

In this case it is normal, that external clients can not participate. An external client can’t do anything with your private it. It needs an public IP where to coturn is located or were the coturn ports (mostly 3478 TCP/UDP) are redirected to your local IP.

Change you firewall/gateway settings to foward the coturn ports to your local ip - or install an external coturn server on a host with public ip and add it to the ice-servers list in your openvidu env file. This is described here and it works for me:
https://docs.openvidu.io/en/2.22.0/deployment/allow-users-behind-firewalls/

@poojakamra Did you restarted the server? The COTURN_IP should be if configured in /opt/openvidu/.env.

Answer from @DiStefano8472 is also valid, you can setup an external coturn if you have problems.

Regards,
Carlos.

After configuring COTURN_IP i have restarted the server.
But still it is not working.
Also we dont have any public server for Coturn.
So stuck with this.

When you say “not working”. What error appears in your browser side? Did you specify a reachable IP for the clients using openvidu at COTURN_IP ?

Hello, I have the same problem
When I want to reset ./openvidu reset and I don’t have internet, this error appears
i add `COTURN_IP no error but when i go to https://192.168.1.106/dashboard

i got this from browser

Unable to connect

An error occurred during a connection to 192.168.1.106.

    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer’s network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.


my .env

my .env

# OpenVidu configuration
# ----------------------
# Documentation: https://docs.openvidu.io/en/stable/reference-docs/openvidu-config/

# NOTE: This file doesn't need to quote assignment values, like most shells do.
# All values are stored as-is, even if they contain spaces, so don't quote them.

# Domain name. If you do not have one, the public IP of the machine.
# For example: 198.51.100.1, or openvidu.example.com
DOMAIN_OR_PUBLIC_IP=192.168.1.106
COTURN_IP=192.168.1.106
# OpenVidu SECRET used for apps to connect to OpenVidu server and users to access to OpenVidu Dashboard
OPENVIDU_SECRET=MY_SECRET

# Certificate type:
# - selfsigned:  Self signed certificate. Not recommended for production use.
#                Users will see an ERROR when connected to web page.
# - owncert:     Valid certificate purchased in a Internet services company.
#                Please put the certificates files inside folder ./owncert
#                with names certificate.key and certificate.cert
# - letsencrypt: Generate a new certificate using letsencrypt. Please set the
#                required contact email for Let's Encrypt in LETSENCRYPT_EMAIL
#                variable.
CERTIFICATE_TYPE=selfsigned

# If CERTIFICATE_TYPE=letsencrypt, you need to configure a valid email for notifications
LETSENCRYPT_EMAIL=user@example.com

# Proxy configuration
# If you want to change the ports on which openvidu listens, uncomment the following lines

# Allows any request to http://DOMAIN_OR_PUBLIC_IP:HTTP_PORT/ to be automatically
# redirected to https://DOMAIN_OR_PUBLIC_IP:HTTPS_PORT/.
# WARNING: the default port 80 cannot be changed during the first boot
# if you have chosen to deploy with the option CERTIFICATE_TYPE=letsencrypt
# HTTP_PORT=80

# Changes the port of all services exposed by OpenVidu.
# SDKs, REST clients and browsers will have to connect to this port
# HTTPS_PORT=443

The error you have in your browser has nothing to do with OpenVidu itself.

Can you ping your server from the browser machine? Probably that IP is not reachable somehow, or the service is deployed but ports are not correctly opened so the browser machine can’t reach OpenVidu.

I deployed openvidu ce on promise in localhost and make FQDN

Ping is fine with meet.test.org (ip : 192.168.1.106)

When internet is connected is ok but when i turn off internet and connected to modem and restart openvidu not responding

You should at least be connected in the same LAN as OpenVidu :sweat_smile:. No internet connection does not mean that you are not connected to at least, a router or a switch which let both machines to be in the same network.

1 Like