ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.27k stars 628 forks source link

standalone works, but can't start the cluster mode #3682

Closed cleverbrainz closed 2 years ago

cleverbrainz commented 3 years ago

Short description

Installed Enterprise Edition and standalone mode work well. But when I try to switch to cluster mode, Antmedia server stoped Used MongoDB atlas

Environment

Steps to reproduce

sudo ./change_server_mode.sh cluster mongodb+srv://username>:<password>@<url/?

Expected behavior

This url should work

http://:5080/#/cluster

Actual behavior

Antmedia server stoped

Logs

2021-10-20 09:17:47,645 [main] INFO o.s.c.s.FileSystemXmlApplicationContext - Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@41e68d87: startup date [Wed Oct 20 09:17:47 UTC 2021]; root of context hierarchy 2021-10-20 09:17:47,669 [main] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [red5.xml] 2021-10-20 09:17:47,782 [main] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [jee-container.xml] 2021-10-20 09:17:47,975 [main] INFO o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 2021-10-20 09:17:48,021 [main] INFO o.r.spring.Red5ApplicationContext - setApplicationContext: org.springframework.context.support.FileSystemXmlApplicationContext@41e68d87: startup date [Wed Oct 20 09:17:47 UTC 2021]; root of context hierarchy 2021-10-20 09:17:48,022 [main] INFO o.r.spring.Red5ApplicationContext - Red5ApplicationContext init 2021-10-20 09:17:48,023 [main] INFO o.r.spring.Red5ApplicationContext - Refreshing ApplicationContext 'red5.common': startup date [Wed Oct 20 09:17:48 UTC 2021]; parent: org.springframework.context.support.FileSystemXmlApplicationContext@41e68d87 2021-10-20 09:17:48,023 [main] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [red5-common.xml] 2021-10-20 09:17:48,132 [main] INFO o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 2021-10-20 09:17:48,207 [main] INFO org.quartz.impl.StdSchedulerFactory - Using default implementation for ThreadExecutor 2021-10-20 09:17:48,215 [main] INFO o.quartz.core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl 2021-10-20 09:17:48,215 [main] INFO org.quartz.core.QuartzScheduler - Quartz Scheduler v.2.2.3 created. 2021-10-20 09:17:48,216 [main] INFO org.quartz.simpl.RAMJobStore - RAMJobStore initialized. 2021-10-20 09:17:48,216 [main] INFO org.quartz.core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.2.3) 'Red5_Scheduler' with instanceId 'NON_CLUSTERED' Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally. NOT STARTED. Currently in standby mode. Number of jobs executed: 0 Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 6 threads. Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered. 2021-10-20 09:17:48,216 [main] INFO org.quartz.impl.StdSchedulerFactory - Quartz scheduler 'Red5_Scheduler' initialized from the specified file : '/usr/local/antmedia/conf/quartz.properties' 2021-10-20 09:17:48,216 [main] INFO org.quartz.impl.StdSchedulerFactory - Quartz scheduler version: 2.2.3 2021-10-20 09:17:48,217 [main] INFO org.quartz.core.QuartzScheduler - Scheduler Red5Scheduler$_NON_CLUSTERED started. 2021-10-20 09:17:48,472 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Initializing ExecutorService 'org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler#255990cc' 2021-10-20 09:17:48,698 [main] WARN i.antmedia.statistic.StatsCollector - Starting heartbeats for the version:2.4.0 and type:Enterprise 2021-10-20 09:17:48,771 [main] INFO o.s.j.e.a.AnnotationMBeanExporter - Registering beans for JMX exposure on startup 2021-10-20 09:17:48,771 [main] INFO o.s.j.e.a.AnnotationMBeanExporter - Bean with name 'schedulingService' has been autodetected for JMX exposure 2021-10-20 09:17:48,772 [main] INFO o.s.j.e.a.AnnotationMBeanExporter - Bean with name 'clientBroadcastStream' has been autodetected for JMX exposure 2021-10-20 09:17:48,873 [main] INFO o.s.j.e.a.AnnotationMBeanExporter - Located MBean 'schedulingService': registering with JMX server as MBean [org.red5.server:name=schedulingService,type=QuartzSchedulingService] 2021-10-20 09:17:48,884 [main] INFO o.r.spring.Red5ApplicationContext - setApplicationContext: org.springframework.context.support.FileSystemXmlApplicationContext@41e68d87: startup date [Wed Oct 20 09:17:47 UTC 2021]; root of context hierarchy 2021-10-20 09:17:48,884 [main] INFO o.r.spring.Red5ApplicationContext - Red5ApplicationContext init 2021-10-20 09:17:48,884 [main] INFO o.r.spring.Red5ApplicationContext - Refreshing ApplicationContext 'red5.core': startup date [Wed Oct 20 09:17:48 UTC 2021]; parent: ApplicationContext 'red5.common' 2021-10-20 09:17:48,884 [main] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [red5-core.xml] 2021-10-20 09:17:48,936 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Initializing ExecutorService 'rtmpScheduler' 2021-10-20 09:17:48,942 [main] INFO o.s.s.c.ThreadPoolTaskExecutor - Initializing ExecutorService 'messageExecutor' 2021-10-20 09:17:48,943 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Initializing ExecutorService 'deadlockGuardScheduler' 2021-10-20 09:17:48,969 [main] INFO o.r.s.net.rtmp.RTMPMinaTransport - RTMP will be bound to [0.0.0.0:1935] 2021-10-20 09:17:48,969 [main] INFO o.r.s.net.rtmp.RTMPMinaTransport - RTMP Mina Transport Settings Acceptor style: default I/O threads: 16 TCP no-delay: true keep-alive: false 2021-10-20 09:17:48,981 [main] INFO o.r.s.net.rtmp.RTMPMinaTransport - Traffic class modification is disabled 2021-10-20 09:17:48,981 [main] INFO o.r.s.net.rtmp.RTMPMinaTransport - Send buffer size: 65536 recv buffer size: 65536 so linger: -1 traffic class: 0 2021-10-20 09:17:49,007 [main] INFO org.red5.server.ContextLoader - ContextLoader init 2021-10-20 09:17:49,015 [main] INFO org.red5.server.ContextLoader - Loading: default.context = ${red5.root}/webapps/red5-default.xml => /usr/local/antmedia/webapps/red5-default.xml 2021-10-20 09:17:49,016 [main] INFO o.s.c.s.FileSystemXmlApplicationContext - Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@3468ee6e: startup date [Wed Oct 20 09:17:49 UTC 2021]; parent: ApplicationContext 'red5.common' 2021-10-20 09:17:49,016 [main] INFO o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from URL [file:/usr/local/antmedia/webapps/red5-default.xml] 2021-10-20 09:17:49,091 [main] INFO org.red5.server.Context - Setting parent bean factory as core 2021-10-20 09:17:49,108 [main] INFO org.red5.server.tomcat.WarDeployer - War deployer service created 2021-10-20 09:17:49,111 [main] INFO org.red5.server.tomcat.WarDeployer - Starting WarDeployer 2021-10-20 09:17:49,111 [main] INFO org.red5.server.tomcat.WarDeployer - Deploy wars without app start 2021-10-20 09:17:49,126 [main] INFO io.antmedia.datastore.db.MongoStore - uri:mongodb://mongodb+srv://username:password@url/name?retryWrites=true 2021-10-20 09:17:49,197 [main] WARN o.s.c.s.FileSystemXmlApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcat.cluster' defined in class path resource [jee-container.xml]: Cannot create inner bean 'io.antmed$ 2021-10-20 09:17:49,197 [main] INFO org.red5.server.ContextLoader - ContextLoader un-init 2021-10-20 09:17:49,197 [main] INFO org.red5.server.ContextLoader - Shutting down 2021-10-20 09:17:49,197 [main] INFO org.red5.server.ContextLoader - Unloading context default.context on shutdown 2021-10-20 09:17:49,210 [main] INFO o.s.c.s.FileSystemXmlApplicationContext - Closing org.springframework.context.support.FileSystemXmlApplicationContext@3468ee6e: startup date [Wed Oct 20 09:17:49 UTC 2021]; parent: ApplicationContext 'red5.common' 2021-10-20 09:17:49,210 [main] INFO org.red5.server.ContextLoader - Shutdown complete 2021-10-20 09:17:49,210 [main] INFO o.r.spring.Red5ApplicationContext - Closing ApplicationContext 'red5.core': startup date [Wed Oct 20 09:17:48 UTC 2021]; parent: ApplicationContext 'red5.common' 2021-10-20 09:17:49,210 [main] INFO o.r.s.net.rtmp.RTMPMinaTransport - RTMP Mina Transport stop 2021-10-20 09:17:49,212 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'deadlockGuardScheduler' 2021-10-20 09:17:49,212 [main] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'messageExecutor' 2021-10-20 09:17:49,216 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'rtmpScheduler' 2021-10-20 09:17:49,217 [main] INFO o.r.spring.Red5ApplicationContext - Closing ApplicationContext 'red5.common': startup date [Wed Oct 20 09:17:48 UTC 2021]; parent: org.springframework.context.support.FileSystemXmlApplicationContext@41e68d87 2021-10-20 09:17:49,217 [main] INFO i.antmedia.statistic.StatsCollector - Shutting down stats collector 2021-10-20 09:17:49,217 [main] INFO i.antmedia.statistic.StatsCollector - Ending analytic session 2021-10-20 09:17:49,220 [main] INFO i.antmedia.statistic.StatsCollector - Closing vertx 2021-10-20 09:17:49,221 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler#255990cc' 2021-10-20 09:17:49,221 [main] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown 2021-10-20 09:17:49,221 [main] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans 2021-10-20 09:17:49,221 [main] INFO org.quartz.core.QuartzScheduler - Scheduler Red5Scheduler$_NON_CLUSTERED shutting down. 2021-10-20 09:17:49,221 [main] INFO org.quartz.core.QuartzScheduler - Scheduler Red5Scheduler$_NON_CLUSTERED paused. 2021-10-20 09:17:49,221 [main] INFO org.quartz.core.QuartzScheduler - Scheduler Red5Scheduler$_NON_CLUSTERED shutdown complete.

Join Google Group and be a part of Ant Media Server Community.

Mohit-3196 commented 3 years ago

Hi @cleverbrainz, We have fixed the issue with regards to +srv connection for mongoDB atlas #3557 I had shared the latest snapshot with you. Please let us know, once you have tried.