# No connection to OpenVidu Server and 401 Unauthorized

**URL:** <https://openvidu.discourse.group/t/no-connection-to-openvidu-server-and-401-unauthorized/615>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [April 29, 2020, 8:04am UTC](https://openvidu.discourse.group/t/no-connection-to-openvidu-server-and-401-unauthorized/615 "2020-04-29T08:04:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelordona1](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@michaelordona1](https://openvidu.discourse.group/u/michaelordona1)\
**Post date:** [April 29, 2020, 8:04am UTC](https://openvidu.discourse.group/t/no-connection-to-openvidu-server-and-401-unauthorized/615/1 "2020-04-29T08:04:34Z")

</div>

Hi! I am new to WebRTC and trying to build web conferencing web app.  
I am running my OpenVidu Server in my Windows computer using Docker.  
I also read the Troubleshooting/FAQs section for windows users. I followed the instructions and  
I am able to see the OpenVidu dashboard by logging in, ran the test and web cam worked.

Then in my app.js, I followed the insecure-js tutorial on how to use /api/sessions to create session and a confirmation box appeared about “No connection to OpenVidu Server. This may be a certificate error at [https://192.168.99.100:4443](https://192.168.99.100:4443)”. It threw error code: 401 unauthorized. I even pressed OK button and redirected me to [https://192.168.99.100:4443/accept-certificate](https://192.168.99.100:4443/accept-certificate)  
and the only thing I can see was ‘accept-cert’ text and nothing happened.

My web cam shouldn’t be working during testing right?  
Here’s my code:

> $.ajax({  
> type: “POST”,  
> url: OPENVIDU\_SERVER\_URL + “/api/sessions”,  
> data: JSON.stringify({customSessionId:sessionId}),  
> header: {  
> “Authorization”:"Basic " + btoa("OPENVIDUAPP: " + OPENVIDU\_SERVER\_SECRET),  
> “Content-Type”:“application/json”  
> },  
> //callback  
> })

I’m sorry I’m confused.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [April 29, 2020, 1:51pm UTC](https://openvidu.discourse.group/t/no-connection-to-openvidu-server-and-401-unauthorized/615/2 "2020-04-29T13:51:58Z")

</div>

If you are using Docker for Windows (instead of Docker Toolbox), please start your docker container with this command:

```auto
docker run -p 4443:4443 --rm -e OPENVIDU_SECRET=MY_SECRET openvidu/openvidu-server-kms:2.13.0

```

And let us know it it works.

---

<div class="post-metadata">

**Author:** ![michaelordona1](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@michaelordona1](https://openvidu.discourse.group/u/michaelordona1)\
**Post date:** [April 30, 2020, 4:00am UTC](https://openvidu.discourse.group/t/no-connection-to-openvidu-server-and-401-unauthorized/615/3 "2020-04-30T04:00:18Z")

</div>

Hi! I tried the command but unfortunately it won’t let me access the OpenVidu Server Dashboard and the page says localhost refused to connect.

 ![image](https://global.discourse-cdn.com/free1/uploads/openvidu/original/1X/f30b9cc5dc029d92291feca028e6d93645817728.png)

I turned off my firewall but I was not able to access the OpenVidu Server Dashboard.

Thank you very much for the assistance.

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [May 1, 2020, 2:48pm UTC](https://openvidu.discourse.group/t/no-connection-to-openvidu-server-and-401-unauthorized/615/4 "2020-05-01T14:48:46Z")

</div>

Let’s start again.

Do you have Docker Toolbox (based on Virtual box), Docker for Windows or Docker for Mac?

If you are using Docker Toolbox, can you execute the following command?

`docker-machine ip default`

You have to use the value returned by the command as the OpenVidu IP. It is typically `192.168.99.100` (but can be different).

Can you show us the logs shown when you start openvidu docker container?

Can you show us what happen if you open the url:

[https://localhost:4443/dashboard](https://localhost:4443/dashboard)

https://\<OPENVIDU\_IP\>:4443/dashboard

Thanks

---

<div class="post-metadata">

**Author:** ![Ravi\_Prayoga](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/ravi_prayoga/32/818_2.png) [@Ravi\_Prayoga](https://openvidu.discourse.group/u/Ravi_Prayoga)\
**Post date:** [August 13, 2020, 12:42pm UTC](https://openvidu.discourse.group/t/no-connection-to-openvidu-server-and-401-unauthorized/615/5 "2020-08-13T12:42:32Z")

</div>

i run openVidu with mvn -Dopenvidu.url=https://192.168.99.100:4443/ package exec:java . but i have Error resolving version for plugin ‘openvidu.url=https://192.168.99.100’ from the repositories [local (C:\Users\Acer.m2\repository), central ([https://repo.maven.apache.org/maven2](https://repo.maven.apache.org/maven2))]: Plugin not found in any plugin repository on comandline. can you help me, I am very confused about it.

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [August 13, 2020, 1:56pm UTC](https://openvidu.discourse.group/t/no-connection-to-openvidu-server-and-401-unauthorized/615/6 "2020-08-13T13:56:00Z")

</div>

If you do not plan to fork or improve OpenVidu and you just want to use it, please follow the instructions to deploy it dockerized.

Regards
