Classroom Demo error 111:Connection refused

Hello,

i’m trying to run the openvidu classroom demo on my server at http://xxx.xxx.com:5443 witch i can reach from any browser even outside the lan network the server is in.

Problem is when i build the demo from another machine using:

server.port: 5442
openvidu platform url: http://xxx.xxx.com:5443

i cannot reach the application at the address https://xxx.xxx.com:5442

every time i try to build it i recive this message in the docker-compose logs nginx:

nginx_1            | 2020/07/13 12:16:33 [error] 67#67: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 93.148.207.98, server: xxx.xxx.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5442/", host: "xxx.xxx.com"
nginx_1            | 2020/07/13 12:16:33 [error] 67#67: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 93.148.207.98, server: xxx.xxx.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:5442/favicon.ico", host: "xxx.xxx.com", referrer: "https://xxx.xxx.com/"

I’m sorry for the xxx.xxx.com format but is a private domain from my agency.

If you deploy classroom demo in OpenVidu deployment an you export it in 5442 port, then it will be available from the public Internet in https://xxxxx/ because NGINX is listening in 443 port and redirect all requests to 5442 port.

Regards

Yes I figured that this morning while trying to fix.

Now when I deploy the classroom demo on my server and I go to xxx.xxx.com I get on my browser:
Bad Request
This combination of port and host requires a TLS.
Even if my domain is secure and letsencypt is generating the certificate I still get the connection refused error in nginx log.

My company is evaluating this software for some projects but so far we are unable to go past this error. Any suggestion?

You have to disable https in classroom demo if you deploy it in OpenVidu server because certificate is managed by NGINX.

Are you deploying classroom demo with https enabled?

How do i check this option? Application.properties file?

If you have server.ssl.enabled: true then you have https enabled

So i have to set it to false? hmm i see, i’ll try tomorrow at office. thanks :smiley:

Ok changing server.ssl.enabled: true made me able to land on the login page at xxx(dot)xxx(dot)com but now when i try to enter as one of the 3 account made i get an error as mentioned here Openvidu-mvc-java sample app

# ERROR: unknown URL  `https://xxx.xxx.com/api-logIn`

## OpenVidu Server does not have path  `/api-logIn ` mapped

If you are seeing this message as a result of COMPOSED recording, the problem is most likely an issue with the recording URL.
Current recording URL is  **https://xxx.xxx.com/api-logIn**
The recording service cannot access the recording layout through this URL.
Use OpenVidu configuration property  **`OPENVIDU_RECORDING_COMPOSED_URL`**  to provide a valid URL for the recording service to connect to.

There is a bug in OpenVidu that prevent you to use URLs in your application starting with /api.

Please change all URLs starting with /api for something like /classroom-api in the backend and in the front-end code.