Unable to deploy on AWS with v2.16

The CloudFormation template for v2.16 is not working for me. v2.15 still works fine with the same parameters.

The logs for v2.16…

root@ip-172-31-29-245:/opt/openvidu# ./openvidu logs
Attaching to openvidu_openvidu-server_1
openvidu-server_1  |
openvidu-server_1  |
openvidu-server_1  |   =======================================
openvidu-server_1  |   =       LAUNCH OPENVIDU-SERVER        =
openvidu-server_1  |   =======================================
openvidu-server_1  |
openvidu-server_1  | ______________________________________________
openvidu-server_1  |    ____               __      ___     _
openvidu-server_1  |   / __ \              \ \    / (_)   | |
openvidu-server_1  |  | |  | |_ __   ___ _ _\ \  / / _  __| |_   _
openvidu-server_1  |  | |  | | '_ \ / _ \ '_ \ \/ / | |/ _` | | | |
openvidu-server_1  |  | |__| | |_) |  __/ | | \  /  | | (_| | |_| |
openvidu-server_1  |   \____/| .__/ \___|_| |_|\/   |_|\__,_|\__,_|
openvidu-server_1  |         | |
openvidu-server_1  |         |_|             version 2.16.0
openvidu-server_1  | ______________________________________________
openvidu-server_1  |
openvidu-server_1  | [INFO] 2020-11-29 20:06:45,005 [main] io.openvidu.server.OpenViduServer - Starting OpenViduServer on ip-172-31-29-245 with PID 14 (/openvidu-server.jar started by root in /)
openvidu-server_1  | [INFO] 2020-11-29 20:06:45,036 [main] io.openvidu.server.OpenViduServer - No active profile set, falling back to default profiles: default
openvidu-server_1  | [ERROR] 2020-11-29 20:06:45,844 [main] io.openvidu.server.config.OpenviduConfig - .env file not found at /.env
openvidu-server_1  | [INFO] 2020-11-29 20:06:46,232 [main] io.openvidu.server.OpenViduServer - Started OpenViduServer in 5.151 seconds (JVM running for 12.161)
openvidu-server_1  | [INFO] 2020-11-29 20:06:46,235 [main] io.openvidu.server.OpenViduServer -
openvidu-server_1  |
openvidu-server_1  |
openvidu-server_1  |    Configuration properties
openvidu-server_1  |    ------------------------
openvidu-server_1  |
openvidu-server_1  |    * CERTIFICATE_TYPE=selfsigned
openvidu-server_1  |    * DOMAIN_OR_PUBLIC_IP=*****
openvidu-server_1  |    * HTTPS_PORT=443
openvidu-server_1  |    * KMS_URIS=["ws://localhost:8888/kurento"]
openvidu-server_1  |    * OPENVIDU_CDR=false
openvidu-server_1  |    * OPENVIDU_CDR_PATH=/opt/openvidu/cdr
openvidu-server_1  |    * OPENVIDU_RECORDING=false
openvidu-server_1  |    * OPENVIDU_RECORDING_AUTOSTOP_TIMEOUT=120
openvidu-server_1  |    * OPENVIDU_RECORDING_COMPOSED_BASICAUTH=true
openvidu-server_1  |    * OPENVIDU_RECORDING_COMPOSED_URL=
openvidu-server_1  |    * OPENVIDU_RECORDING_CUSTOM_LAYOUT=/opt/openvidu/custom-layout
openvidu-server_1  |    * OPENVIDU_RECORDING_DEBUG=false
openvidu-server_1  |    * OPENVIDU_RECORDING_NOTIFICATION=publisher_moderator
openvidu-server_1  |    * OPENVIDU_RECORDING_PATH=/opt/openvidu/recordings
openvidu-server_1  |    * OPENVIDU_RECORDING_PUBLIC_ACCESS=false
openvidu-server_1  |    * OPENVIDU_RECORDING_VERSION=2.16.0
openvidu-server_1  |    * OPENVIDU_SECRET=*****
openvidu-server_1  |    * OPENVIDU_SESSIONS_GARBAGE_INTERVAL=900
openvidu-server_1  |    * OPENVIDU_SESSIONS_GARBAGE_THRESHOLD=3600
openvidu-server_1  |    * OPENVIDU_STREAMS_VIDEO_MAX_RECV_BANDWIDTH=1000
openvidu-server_1  |    * OPENVIDU_STREAMS_VIDEO_MAX_SEND_BANDWIDTH=1000
openvidu-server_1  |    * OPENVIDU_STREAMS_VIDEO_MIN_RECV_BANDWIDTH=300
openvidu-server_1  |    * OPENVIDU_STREAMS_VIDEO_MIN_SEND_BANDWIDTH=300
openvidu-server_1  |    * OPENVIDU_WEBHOOK=false
openvidu-server_1  |    * OPENVIDU_WEBHOOK_ENDPOINT=
openvidu-server_1  |    * OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged]
openvidu-server_1  |    * OPENVIDU_WEBHOOK_HEADERS=[]
openvidu-server_1  |
openvidu-server_1  |
openvidu-server_1  |
openvidu-server_1  | [WARN] 2020-11-29 20:06:46,237 [main] io.openvidu.server.OpenViduServer - You have set property server.port (or SERVER_PORT). This will serve OpenVidu Server on your host at port 5443. But property HTTPS_PORT (443) still configures the port that should be used to connect to OpenVidu Server from outside. Bear this in mind when configuring a proxy in front of OpenVidu Server
openvidu-server_1  | [INFO] 2020-11-29 20:06:46,237 [main] io.openvidu.server.OpenViduServer - Using /dev/urandom for secure random generation
openvidu-server_1  | [INFO] 2020-11-29 20:06:46,430 [main] io.openvidu.server.OpenViduServer - Starting OpenViduServer on ip-172-31-29-245 with PID 14 (/openvidu-server.jar started by root in /)
openvidu-server_1  | [INFO] 2020-11-29 20:06:46,431 [main] io.openvidu.server.OpenViduServer - No active profile set, falling back to default profiles: default
openvidu-server_1  | [ERROR] 2020-11-29 20:06:48,803 [main] io.openvidu.server.config.OpenviduConfig - .env file not found at /.env
openvidu-server_1  | [INFO] 2020-11-29 20:06:50,677 [main] org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 5443 (http)
openvidu-server_1  | [INFO] 2020-11-29 20:06:50,689 [main] org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-0.0.0.0-5443"]
openvidu-server_1  | [INFO] 2020-11-29 20:06:50,689 [main] org.apache.catalina.core.StandardService - Starting service [Tomcat]
openvidu-server_1  | [INFO] 2020-11-29 20:06:50,689 [main] org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.39]
openvidu-server_1  | [INFO] 2020-11-29 20:06:50,763 [main] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
openvidu-server_1  | [INFO] 2020-11-29 20:06:50,763 [main] org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 4256 ms
openvidu-server_1  | [WARN] 2020-11-29 20:06:50,974 [main] io.openvidu.server.rest.ApiRestPathRewriteFilter - Support for deprecated REST API paths enabled. Update your REST API clients to use the new paths
openvidu-server_1  | [WARN] 2020-11-29 20:06:50,975 [main] io.openvidu.server.rest.ApiRestPathRewriteFilter - Deprecated path support will be removed in a future release. You can disable old path support to test compatibility with property SUPPORT_DEPRECATED_API=false
openvidu-server_1  | [INFO] 2020-11-29 20:06:51,045 [main] io.openvidu.server.OpenViduServer - OpenVidu CDR service is disabled (may be enable with 'OPENVIDU_CDR=true')
openvidu-server_1  | [INFO] 2020-11-29 20:06:51,045 [main] io.openvidu.server.OpenViduServer - OpenVidu Webhook service is disabled (may be enabled with 'OPENVIDU_WEBHOOK=true')
openvidu-server_1  | [INFO] 2020-11-29 20:06:51,069 [main] io.openvidu.server.OpenViduServer - OpenVidu Server using one KMS: ws://localhost:8888/kurento
openvidu-server_1  | [INFO] 2020-11-29 20:06:51,228 [JsonRpcClient-hearbeatExec-e1-t0] org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket - [KurentoClient]  Connecting native client
openvidu-server_1  | [INFO] 2020-11-29 20:06:51,229 [JsonRpcClient-hearbeatExec-e1-t0] org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket - [KurentoClient]  Creating new NioEventLoopGroup
openvidu-server_1  | [INFO] 2020-11-29 20:06:52,405 [nioEventLoopGroup-2-1] org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket - [KurentoClient]  Initiating new Netty channel. Will create new handler too!
openvidu-server_1  | [WARN] 2020-11-29 20:06:52,721 [JsonRpcClient-hearbeatExec-e1-t0] org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket - [KurentoClient]  Trying to close a JsonRpcClientNettyWebSocket with channel == null
openvidu-server_1  | [WARN] 2020-11-29 20:06:52,722 [JsonRpcClient-hearbeatExec-e1-t0] org.kurento.jsonrpc.client.JsonRpcClient - [KurentoClient]  Error sending heartbeat to server. Exception: [KurentoClient]  Exception connecting to WebSocket server ws://localhost:8888/kurento
openvidu-server_1  | [INFO] 2020-11-29 20:06:52,722 [main] org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket - [KurentoClient]  Connecting native client
openvidu-server_1  | [WARN] 2020-11-29 20:06:52,722 [JsonRpcClient-hearbeatExec-e1-t0] org.kurento.jsonrpc.client.JsonRpcClient - [KurentoClient]  Stopping heartbeat and closing client: failure during heartbeat mechanism
openvidu-server_1  | [INFO] 2020-11-29 20:06:52,722 [main] org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket - [KurentoClient]  Creating new NioEventLoopGroup
openvidu-server_1  | [INFO] 2020-11-29 20:06:52,723 [nioEventLoopGroup-3-1] org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket - [KurentoClient]  Initiating new Netty channel. Will create new handler too!
openvidu-server_1  | [WARN] 2020-11-29 20:06:52,725 [main] org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket - [KurentoClient]  Trying to close a JsonRpcClientNettyWebSocket with channel == null
openvidu-server_1  | [ERROR] 2020-11-29 20:06:52,726 [main] io.openvidu.server.kurento.kms.KmsManager - KMS in ws://localhost:8888/kurento is not reachable by OpenVidu Server
openvidu-server_1  | [ERROR] 2020-11-29 20:06:52,726 [main] io.openvidu.server.kurento.kms.KmsManager - Shutting down OpenVidu Server
root@ip-172-31-29-245:/opt/openvidu#

There are a few errors and warnings that don’t happen when using v2.15… starting with [WARN] 2020-11-29 20:06:52,721 [JsonRpcClient-hearbeatExec-e1-t0] org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket - [KurentoClient] Trying to close a JsonRpcClientNettyWebSocket with channel == null

I’m not seeing any errors in cloud-init.log ot cloud-init-output.log, but let me know if you need those as well. Thanks.

Hi, I’ve tried this and you’re right. But it happens sometimes, I will try to fix it. What you can do after the deployment fails is to execute in /opt/openvidu the command:

sudo su
./openvidu restart

Regards,
Carlos

Fixed @Adam

Please, try again.

Regards,
Carlos

Looks good now. Thanks!

Hello, I tried today to follow tutorial on OpenviduPro AWS deployment and it failed several times. I’ve tried to disable rollback option in order to later access server and collect logs, but I can’t access server using ssh and my key.

You have suggested to execute some shell commands but what to do if I can’t access my server?

Can you show me what parameters are you using in your CF?

@cruizba I’m having trouble with Cloud formation too, the parameter that were working for 2.15 are failing for 2.16, i’m using c5.xlarge and letsencrypt
The AWS::CloudFormation::WaitCondition is failing - Failed to receive 1 resource signal(s) within the specified duration,
The CF params are:
AwsInstanceTypeKMS c5.xlarge -
AwsInstanceTypeOV c5.xlarge -
ElasticsearchPassword **** -
ElasticsearchUser **** -
KeyName ****** -
LetsEncryptEmail ***** -
MediaNodesStartNumber 1 -
MyDomainName **** -
OpenViduLicense **** -
OpenViduSecret **** -
OpenViduSubnet ***** -
OpenViduVPC ***** -
OwnCertCRT - -
OwnCertKEY - -
PublicElasticIP **** -
Recording local -
S3RecordingsBucketName - -
WantToDeployDemos false -
WhichCert letsencrypt -

The server keeps waiting for kibana, and then ultimately fails

Can you disable rollback in AWS and show me the logs of nginx and kibana?

sudo su
cd /opt/openvidu
docker-compose logs nginx
sudo su
cd /opt/openvidu
docker-compose logs kibana

Regards

Hi @cruizba It started working now, we were having trouble with c5.large, then after multiple failed attempts, we switched to c5.xlarge, but due to multiple restarts, letsencrypt rate limit was hit, after switching to new sub domain, it started working.
Thanks anyway

1 Like

Yes, we may need to remove this instance type from the CloudFormation. 4GB of RAM is not enough for Elasticsearch and Kibana to run properly.

is there a way to disable kibana and elasticsearch?
if not, can we point them to an external service that responds with status 200 always, will that work to keep running pro instance on c5.large?

It’s not possible right now to disable Elasticsearch and Kibana. I did not test such scenario with a “dummy service” it may work but I can’t confirm.

Anyways, OpenVidu Pro will not work properly without Elasticsearch and Kibana because a lot of functionality depends on it. For example, session history and a lot of statistics.

Ok, thanks, i’ll give it a shot maybe and see what happens