Launching openvidu-js-java tutorial on AWS

Hello all,

I am trying to run openvidu-js-java tutorial on OpenVidu CE installed on AWS.
I deployed version 2.14 using CloudFormation.
It is installed on my domain with letsencrypt certs.
Tested that default Call application works on several devices.

After that I did the following:

  1. Deployed openvidu-js-java according to the instructions provided in that tutorial
  2. Removed Call application by deleting docker-compose.override.yml file
  3. Updated application.properties of the tutorial app as follows:

server.port: 5442
server.ssl.enabled: false
server.ssl.key-store: classpath:openvidu-selfsigned.jks
server.ssl.key-store-password: openvidu
server.ssl.key-store-type: JKS
server.ssl.key-alias: openvidu-selfsigned
openvidu.url: http://localhost:5443/
openvidu.secret: mysecrethere

The app starts ok on my domain and I can see login form and enter default credentials.
But when I try to login nothing happens and I see in browser console the following error:

app.js:192 POST https_link_to_my_domain_here/api-login/login 404
Login WRONG
app.js:204 {“timestamp”:“2020-06-10T16:40:27.155+0000”,“status”:404,“error”:“Not Found”,“message”:“No message available”,“path”:"/api-login/login"}

Nothing happens in the app log, no errors, and I suppose this request doesn’t reach the app because of incorrect configuration

If I try to reach this url from the browser address bar I see the following:

ERROR: unknown URL https_link_to_my_domain_here/api-login/login

OpenVidu Server does not have path /api-login/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_link_to_my_domain_here
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.

What else should I update in config files to make it work?

Thanks in advance

Seems to me that somewhere where you have to define the OpenVidu Server URL you are using as domain name “https_link_to_my_domain_here”. You must use the real domain name.

I am sorry that I didn’t clarified that in my post, but https_link_to_my_domain_here is my real domain and it is placed whenever this text is mentioned with https protocol. As a new user I cannot post links and this forum considers these config parts as links, so I had to adjust :slight_smile:

For openvidu-js-java tutorial app there is only place to define OpenVidu Server URL is its config application.properties, where I put localhost with 5443 port, as it is mentioned in docs here: https://docs.openvidu.io/en/2.14.0/deployment/deploying-openvidu-apps/#installed-natively

There is a mention in the docs that /api/ path is used by openvidu-server, so I already made some experiments, and it looks like the problem is in nginx config. As soon as I changed javascript calls paths from /api-login/ and /api-session/ to /test-login/ and /test-session/ - all required post requests reached the app. So I suppose nginx incorrectly routes requests to paths started with /api (not just /api/) to OpenVidu server and not to the app that works on http port 5442

1 Like

We will review if we can improve NGINX config to avoid problems