Skip to content
Paul Gregoire edited this page May 15, 2019 · 7 revisions

Red5 1.1.0 won't start

This may occur if mismatched Spring framework jars are present; for instance, having Spring 4.x in lib and Spring 5.x in plugins. Remove one of the Spring version sets and restart.

Root: J:\red5
Deploy type: bootstrap
[INFO] [main] org.red5.server.Launcher - Red5 Server 1.1.0 (https://github.com/Red5)
Bootstrap exception: null
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.red5.server.Bootstrap.bootStrap(Bootstrap.java:123)
        at org.red5.server.Bootstrap.main(Bootstrap.java:51)
Caused by: java.lang.NoSuchFieldError: logger
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:212)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:154)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531)
        at org.red5.server.Launcher.launch(Launcher.java:73)
        ... 6 more
Bootstrap exit

Invocation failed

You may see this error if a library or class are compiled with JDK8 and you are running an older JDK, such as 7 or 6.

Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.red5.server.scope.Scope$ConcurrentScopeSet.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView

Red5 won't start

If you get this error message when attempting to start Red5:

Red5 server jar was found
URL list: [file:/opt/red5/red5-server.jar]
Bootstrap exception: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1875)
	at org.red5.classloading.ClassLoaderBuilder.scrubURLList(ClassLoaderBuilder.java:448)
	at org.red5.classloading.ClassLoaderBuilder.build(ClassLoaderBuilder.java:181)
	at org.red5.classloading.ClassLoaderBuilder.build(ClassLoaderBuilder.java:96)
	at org.red5.server.Bootstrap.bootStrap(Bootstrap.java:117)
	at org.red5.server.Bootstrap.main(Bootstrap.java:48)
Bootstrap exit

Replace your red5-service.jar with the latest build matching your red5-server.jar version.

UnknownHostException

This may appear in your log if EhCache cannot determine that your server is "localhost" based on its query of the operating system. This happens on linux sometimes and looks like this:

2015-01-14 15:22:06,652 [main] ERROR net.sf.ehcache.Cache - Unable to set localhost. This prevents creation of a GUID. Cause was: myred5-testbox: myred5-testbox

To resolve this, edit your /etc/hosts and add this entry:

127.0.0.1 myred5-testbox localhost

Failed to instantiate ch.qos.logback.classic.LoggerContext

This issue doesn't stop your server from working, but it is an annoyance and may prevent the app in-question from working properly.

Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.NoSuchMethodException: org.red5.logging.LoggingContextSelector.<init>(ch.qos.logback.classic.LoggerContext)
       at java.lang.Class.getConstructor0(Class.java:3082)
       at java.lang.Class.getConstructor(Class.java:1825)
       at ch.qos.logback.classic.util.ContextSelectorStaticBinder.dynamicalContextSelector(ContextSelectorStaticBinder.java:98)
       at ch.qos.logback.classic.util.ContextSelectorStaticBinder.init(ContextSelectorStaticBinder.java:72)
       at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:93)
       at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
       at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
       at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
       at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
       at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
       at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
       at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:282)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
       at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
       at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
       at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
       at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at java.lang.Thread.run(Thread.java:745)
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

To fix, find the webapp which is trying to start via the SpringFramework context listener as shown below, that will be in your web.xml. Find these two nodes and remove them.

  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:spring/applicationContext.xml</param-value>
  </context-param>

  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

Error creating bean with name 'rtmpHandler'

A property in the rtmpHandler bean no longer exists or is inaccessible.

[WARN] [main] org.springframework.context.support.FileSystemXmlApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'red5.core' defined in class path resource [red5.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rtmpHandler' defined in class path resource [red5-core.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'globalScopeConnectionAllowed' of bean class [org.red5.server.net.rtmp.RTMPHandler]: Bean property 'globalScopeConnectionAllowed' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

To fix, remove or comment out the property in the xml file.