red5 / red5-server Goto Github PK
View Code? Open in Web Editor NEWRed5 Server core
License: Apache License 2.0
Red5 Server core
License: Apache License 2.0
Hello,
I am using Red5 compiled from 343aa92, and I believe I found a bug that result in connections to wrong scopes, due a race condition.
I have a Red5 server with an app called video. When two Flash clients connect at the same time to a scope video/scope1, sometimes one client end up connected to scope video.
I have checked the code and found a possible cause in ScopeResolver class.
In the method resolveScope(IScope root, String path)
, the root scope is default
and the path is video/scope1
. In the first iteration of the loop, scope
will be set to video
for both connections, since scope video
was previously created by the app. In the second iteration of the loop, scope.hasChildScope(child)
will return false for both connections, and both will try to create the scope scope1
. Since the scope.children
is concurrent, only one of the connections will succeed, and set it's scope to scope1
. The other connection will fail, staying in scope video
, and since this is not the root scope the code will not throw a ScopeNotFoundException
.
I also tested with the last commit on master
, 90add06, and was able to reproduce this bug.
I will submit a pull request with a possible fix for this.
When I've uncommented RTMPS section in red5-core.xml, I met the following errors in my console:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.red5.server.Bootstrap.bootStrap(Bootstrap.java:123)
at org.red5.server.Bootstrap.main(Bootstrap.java:48)
Caused by: 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 except
ion is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rtmpsMinaIoHandler' defined in class path resource [red5-core.xml]: Error setting property values; nested
exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'rtmpConnManager' of bean class [org.red5.server.net.rtmps.RTMPSMinaIoHandler]: Bean property 'rtmpConnManager' i
s not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.red5.server.Launcher.launch(Launcher.java:67)
... 6 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rtmpsMinaIoHandler' defined in class path resource [red5-core.xml]: Error setting property values; ne
sted exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'rtmpConnManager' of bean class [org.red5.server.net.rtmps.RTMPSMinaIoHandler]: Bean property 'rtmpConnManage
r' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1493)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.red5.spring.Red5ApplicationContext.refresh(Red5ApplicationContext.java:36)
at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.afterPropertiesSet(AbstractRefreshableConfigApplicationContext.java:151)
at org.red5.spring.Red5ApplicationContext.afterPropertiesSet(Red5ApplicationContext.java:30)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 16 more
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'rtmpConnManager' of bean class [org.red5.server.net.rtmps.RTMPSMinaIoHandler]: Bean property 'rtmpConnManager' is n
ot writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1064)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:922)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:82)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:62)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1489)
... 31 more
It looks you've made some updates for RTMP section but forgot to do the same thing for RTMPS. Now I have to do it manually.
Hi,
I think correct version of logback is: 1.1.2 due to error below when using version 1.0.13
Unresolve class: ch.qos.logback.core.CoreConstants
regards,
Tam Trieu
I understand this is a java mismatch but documentation on fixing this is very lacking/missing/out of date. What is weird is that everything was working fine recently then all of a sudden this...
Please can somebody help.
I have removed (renamed) a few jars from the lib directory as I read this somewhere, but the error remains.
red5-io-1.0.4-SNAPSHOT.jar.old
red5-io-1.0.5-RELEASE.jar.old
red5-server-common-1.0.5-RELEASE.jar.old
slf4j-api-1.7.7.jar.old
slf4j-api-1.7.9.jar.old
Any idea what else to try please?
Hi,
I'm trying to migrate existing app build on Red5 < 1.0. Everything is similar, but IContext
in current version do not contain getResource
method. How can I get to the file of saved .flv stream?
Thanks
This issue is already reported here:
https://bugs.launchpad.net/ubuntu/+source/red5/+bug/1312814
Quoting the report:
To reproduce: ubuntu 14.04 LTS
sudo apt-get install red5-server
"red5-server: Depends: libtomcat6-java (>= 6.0.20-7) but it is not going to be installed"
then:
sudo apt-get install libtomcat6-java
This successfully brings in all dependencies for libtomcat6-java and installs.
Trying again after manually meeting the libtomcat6-java dependency:
sudo apt-get install red5-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libred5-java
The following NEW packages will be installed:
libred5-java red5-server
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,023 kB of archives.
After this operation, 1,372 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package libred5-java.
(Reading database ... 263596 files and directories currently installed.)
Preparing to unpack .../libred5-java_1.0~svn4374-3_all.deb ...
Unpacking libred5-java (1.0~svn4374-3) ...
Selecting previously unselected package red5-server.
Preparing to unpack .../red5-server_1.0~svn4374-3_all.deb ...
Unpacking red5-server (1.0~svn4374-3) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libred5-java (1.0~svn4374-3) ...
Setting up red5-server (1.0~svn4374-3) ...
Allowing use of questionable username.
Adding system user `_red5' (UID 119) ...
Adding new user `_red5' (UID 119) with group `nogroup' ...
Not creating home directory `/usr/share/red5'.
* Starting Flash streaming server red5-server [fail]
invoke-rc.d: initscript red5-server, action "start" failed.
dpkg: error processing package red5-server (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
red5-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
..and not available in 64bit for win:
http://wrapper.tanukisoftware.com/downloads/3.3.6/
latest wrapper version produces incompatibility features issue
here is warning:
Launching a JVM...
WrapperManager: Initializing...
WrapperManager:
WrapperManager: WARNING - Unable to load the Wrapper's native library 'wrapper.dll'.
WrapperManager: The file is located on the path at the following location but
WrapperManager: could not be loaded:
WrapperManager: S:\red5\lib\wrapper.dll
WrapperManager: Please verify that the file is readable by the current user
WrapperManager: and that the file has not been corrupted in any way.
WrapperManager: One common cause of this problem is running a 32-bit version
WrapperManager: of the Wrapper with a 64-bit version of Java, or vica versa.
WrapperManager: This is a 64-bit JVM.
WrapperManager: Reported cause:
WrapperManager: S:\red5\lib\wrapper.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
WrapperManager: System signals will not be handled correctly.
The queued data writes in FileConsumer are broken after commit 402147d
Logs:
broken: http://pastebin.com/F1i0y108
working: http://pastebin.com/3e6kdxmK
Hey,
I am trying to change the ip address to domain name.
I understood that red5 run on apache tomcat so, what is the right way to change that to domain name.
How to add a Host Name Alias? What is and where is the config file to add the aliases?
The main Idea is that I want to get access to play movie not with ip address but domain name
Thanks
Whereโs the edge and origin xml file?
Them canโt find in '/conf'.
My Red5-server version is 1.0.4.
File List
red5-edge.xml, red5-edge-core.xml
red5-origin.xml, red5-origin-core.xml
This is also mixes of Red5.getConnectionLocal() as well as not creating unique ports for different connections on the same ip.
To produce this connect using the netconnection from the Flex library, have it set the Red5 attribute. Leave that connection open. Then connect using another netconnection from the same ip and set the Red5 attribute. Then disconnect the first netconnect it will print out the attribute from the last connection and the same port for both.
Tested on a multiple OS and browsers and it happens on all of them. It was tested on the master branch as well.
Dear Red5 Developer,
Please replace the code in org.red5.server.scope.Scope at line 900 -setEnabled(false) and put it after the stop() method call in order to call the appStop correctly.
How it now ----------------------------------
/**
* Uninitialize scope and unregister from parent.
*/
public void uninit() {
log.debug("Un-init scope");
setEnabled(false); // Remove this line (line 900)
for (IBasicScope child : children.keySet()) {
if (child instanceof Scope) {
((Scope) child).uninit();
}
}
stop();
if (hasParent()) {
if (parent.hasChildScope(name)) {
parent.removeChildScope(this);
}
}
How it have to be ----------------------------------
/**
* Uninitialize scope and unregister from parent.
*/
public void uninit() {
log.debug("Un-init scope");
for (IBasicScope child : children.keySet()) {
if (child instanceof Scope) {
((Scope) child).uninit();
}
}
stop();
setEnabled(false); /// Add this line
if (hasParent()) {
if (parent.hasChildScope(name)) {
parent.removeChildScope(this);
}
}
}
Regards,
Sergey.
Maybe it might be good idea to update Tomcat to the latest version due to lots of Websocket related fixes: http://tomcat.apache.org/tomcat-7.0-doc/changelog.html ?
I can register admin user. Also I am able to login as admin. But the issue is that I am able to login to admin panel with invalid credential. Even I can login to admin panel with an invalid username or password. This means that no authentication takes place.
The expected output should be a valid authentication. But authentication never takes place.
I am using Red5 1.01 with CentOS 6.4
red5.log
2014-05-11 09:36:56,938 [NioProcessor-3] INFO org.red5.webapps.admin.Application - W3C x-category:session x-event:disconnect c-ip:14.140.176.234 c-client-id:1
2014-05-11 09:36:59,657 [NioProcessor-4] INFO o.r.s.n.r.codec.RTMPProtocolDecoder - Action connect
2014-05-11 09:36:59,658 [NioProcessor-4] INFO o.r.server.net.rtmp.RTMPConnection - Setting object encoding to AMF3
2014-05-11 09:36:59,658 [NioProcessor-4] INFO o.red5.server.net.rtmp.RTMPHandler - Connecting to: [WebScope@4682981 Depth = 1, Path = '/default', Name = 'admin']
admin.log
2014-05-11 09:37:39,153 [NioProcessor-4] INFO org.red5.webapps.admin.Application - Client with id 2 disconnected.
2014-05-11 09:37:41,487 [NioProcessor-5] DEBUG org.red5.webapps.admin.Application - Scopes: {}
2014-05-11 09:37:42,472 [NioProcessor-5] DEBUG org.red5.webapps.admin.Application - Scopes: {}
2014-05-11 09:37:
Hi,
Can red5 installed on centos6.6 or red5 built for centos6.5?
Thanks in advanced.
only initial set dataframe is stored in client broadcast stream, even when it has been updated
steps to reproduce:
I'm experiencing major CPU performance issues with version 1.0.3.
I am developing a video chat application. In this application I'm saving all streams to disk.
When the application starts running, the CPU usage is low, but as I add clients that transmit video, the CPU usage increases, until almost 100%, with only 12-15 clients. At that point, Red5's console starts to show that some packets cannot be processed ("RTMPMinaConnection - Incoming message handling failed"), I think it is because the queue is full. Once you reach this point, the server cannot be recovered and this kind of errors are obtained in increasing numbers.
I tried to solve this by increasing the value of "rtmp.executor.queue_capacity" in the configuration and the value of "fileconsumer.queue.size" and I always get the same problem. Maybe a few minutes before or a few minutes later, but I get always the same problem. This is my red5.properties file: http://pastebin.com/Yp8uaFHg
I tested it publishing only audio streams. I tried saving the streams to disk publishing with "record" flag or using the saveAs method server-side. I also tried it without saving streams to disk. I have always the same issue, with 12-15 clients the CPU reaches 100% usage and the server fails.
This is the code of my application:
Application: http://pastebin.com/m4xHL6i9
web.xml: http://pastebin.com/6K58bPJ4
red5-web.xml: http://pastebin.com/MtZpWPng
I'm running the server in Windows 8, 8GB RAM, Intel Core i5 1.70GHz.
Hello,
I install red5 on my server centos 6, and I have poor video performance, the videos are choppy.
what are the server requirements ?
Thanks
current version of red5 server (1.0.4-SNAPSHOT)
reports java.lang.ClassNotFoundException: org.red5.demos.chat.Application
on startup
Hi gurus of red5 server,
I've tried already everything, but could not solve that issue so far. I home, you can help me.
I'm facing a weird problem with live streaming from one adobe air application on mobile/deskto as streaming feed to the same application as streaming client via a red5 server. I'll try to describe the problem as close as possible:
We are opening a stream e.g. on rtmp://server/oflaDemo/24, if it does not yet exist, it is perfectly well opened, and works like a charm. If both client and server app close the stream, the next time it works flawlessly (although the stream is not so fluent as before, the quality gets worse and worse)
Often it happens, that our adobe air application tries to open live streaming, but receives the error "Netstream.Publish.BadName", and therefore cannot open the streaming at all. Of course the receiver now cannot open the stream and receives the error "Stream not found".
At server side obviously the previous stream is not closed, and therefore cannot be published again.
If our mobile app is closed by task manager, in the middle of streaming, obviously the livestream is not unpublished automatically.
Does anyone know a cure to that behavior? Thank you for your help already in advance!,
Kind regards
Christoph
Does Red5 use conventional Spring initiation and therefore is it possible to configure spring to user other filesystem locations for resource paths?
Like you would accomplish with.
<mvc:resources mapping="/files/**" location="file:/path/to/myfiles" />
Sorry, just realised this should not really be on here as an issue but any help would be appreciated.
unable to install fitcdemo, please any one help me how to install this module.
it would be nice to have build.xml in trunk for building ROOT.war
I don't see the RTSP usage in the demo, Can you please update it.
Android doesn't support RTMP, so this information will help alot.
I tried to stream to "rtsp://localhost/oflaDemo" ( transmute to RTMP using restreamer or Xuggler), but the RTSP client is not even able to stream.
Also, https://github.com/Red5/red5-server/blob/792d48b246550ce040aa7a2bddf2420295e9ba59/src/main/server/conf/red5.properties doesn't list RTSP
I give you the scenario:
I have two connections ( clientId: 0 and clientId: 1 ), both are streaming audio and video.
I'm handling the streamBroadcastClose event to know when one of them stop broadcasting and remove the stream from my app and notify all connected users.
The strange thing is when I close the window of the clientId 1, the Red5.getConnectionLocal() method inside the event streamBroadcastClose returns the connection of the client id 0. I've checked the scope connections and both still there, so I don't know why I get the connection from the other client.
After that, if I close the client id 0 window, the Red5.getConnectionLocal() method returns the right connection, the connection of the client id 0.
I've made a video so you can watch how to reproduce or how can I reproduce this error.
Here's the link: https://dl.dropboxusercontent.com/u/4155232/Red5-geconntectionlocal.mp4
The test I've made was running the Red5 1.0.4 snapshot on a Windows 7 VM.
The clients ran outside the VM on Chrome ( 39.0.2171.71 m ) on Windows 8. My flash player version is 15.0.0.239
I've made this test on Firefox and IE too. And also I've ran opening one client on each browser, inside and outside the VM. Always, the same result.
This is the GIT link of the project I'm testing with: https://github.com/hnobile/myoflademo.git
This is a simple app built in flex to test audio and video streaming.
In the client side you need to select a streamName and then connect to the server.
Once you are connected, you can see the connection client id assigned by the Red5.
I cross-submitted this issue to red5-docs, but I suspect that project isn't as closely followed as this one.
Folks - the Red5.org website links to a latest download of 1.0 from December 2012, almost 2 years out of date from the August 1.0.2 release available on Github, which I wouldn't have found out about if I hadn't been searching for the bugtracker on a whim based on the "getting started" wiki pointing to the (defunct?) trac instance.
Also, the site links to google code, which appears to no longer be the primary place where development is happening.
How does the MRTMP work is there any documents?
When a publisher closes, reconnects and republishes, subscribers that remain connected will lose stream A/V synchronization. Synchronization will will resume after a measured amount of time.
Initially the subscriber will have synchronization. When the publisher stops, the subscriber stream buffer plays out as expected.
Lets call that 'segment_1'. The netstream time shows the duration of segment_1.
The publisher reconnects and begins to re-stream. The subscriber begins to receive 'segment _2'.
Synchronization will be bad for subscriber-X until the new segment_2 duration exceeds segment_1 duration.
I was able to get the client buffer to accept the clear ping, but I was not able to reliably clear pending messages. This means 1 in 3 re-published streams the client netstream time went back to zero, but immediately returned to the end value of segment-1.
Reproduction steps
Publish a stream to any application.
Subscribed to that stream with a flash client. Watch the stream for 20 seconds.
Stop publishing the stream, but keep the subscriber connected.
Publish the stream again and speak into the mic while facing the camera and simultaneously watching the subscriber stream. Do so for more than 20 seconds.
Observe the synchronization will be broken until 20 seconds have passed.
I had to install Red5 server in Ubuntu server 14.04. Web console is working. But i am not seeing the test video in home page. So that i can check the debug message was
"Host: 192.168.5.242
Trying to connect
Net status: NetConnection.Connect.Failed
Trying to connect to war location
Net status: NetConnection.Connect.Success
Net status: NetConnection.Call.Failed "
Can u any one help me to fix the issue to work in Red5
Hi all,
The following function works in RTMP mode and generates a connect (refused) event in Flash:
public boolean connect(IConnection conn, IScope scope, Object[] params) {
return false
}
The same function does NOT work using an RTMPT connection: a connect event is NOT fired in Flash.
Replacing "return false" by "rejectClient()" does not work either. RTMPT connections DO pass through Red5's connect function, but somehow Red5 does not raise the necessary Flash events at the end.
I had installed red 1.0.3 yesterday,but I can't install the oflademo.war(r4797),
The error is ๏ผ
The application version selected does not match the server java version,
admin-r4506-java6.war and SOSample-r4326-java6.war can be installed.
SystemUtils-1.0-r4418.war can't be installed.
I had installed oflaDemo-r4472-java6.war several days ago, it's ok.
My server had installed java-1.7.0-openjdk jre-7u45-linux-x64 jdk-8u25-linux-x64 .
Anybody can give suggestions?
I found this document ,But it does't work in 1.0.4.
http://red5.googlecode.com/svn/doc/tags/0_8_0/HOWTO-Clustering.txt
How can I do this?
From @GoogleCodeExporter on March 15, 2015 16:51
Description
When embedding cue points using Adobe Media Encoder or Adobe Soundbooth, cue
points are not dispatched.
To be able to use it as internet radio station (audio only), the user need to
get the current cue-point (from a datafile?, or read the last dispatched cue?)
on connect as well, other case we would need to embedd the cuepoints (which
contain artist and song name) on a more frequent interval(each 5 second ?,
lotta data...) than just on song change.
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 28 Jan 2011 at 6:19
Copied from original issue: mondain/red5#18
Hello,
After install red5 1.0.5; I can't find service to start and impossible to connect to red 5 and install some sample.
Any issues
Greetings Red5 team
I would like to know how to run the source code and run it while debugging.
With the old Ivy project structure it was simple but now it changed.
Can you update on how to compile + run in debug this project folder ?
Thank you
From @GoogleCodeExporter on March 15, 2015 17:2
What steps will reproduce the problem?
1.create ServerStream via StreamUtils.createServerStream(app,"webtv") on server
side in method appStart
2.create SimplePlayItem via SimplePlayItem.build("mp4:1.mp4") and added to
serverStream (1.mp4 is under streams directory)
3.Restart red5
What is the expected output? What do you see instead?
Expected:
Server starts without error and could receive the stream on player like
http://www.wowza.com/resources/3.5.0/examples/LiveVideoStreaming/FlashRTMPPlayer
/player.html
Observerd:
Server starts with error:
2014-07-25 15:21:45,465 [Launcher:/liveSchedule] DEBUG
org.red5.server.scope.Scope - Adding child scope: BroadcastScope
[clientBroadcastStream=null, compCounter=0, removed=false] to Scope
[name=liveSchedule, path=/default, type=APPLICATION, autoStart=true,
creationTime=1406272905446, depth=1, enabled=true, running=false]
2014-07-25 15:21:45,465 [Launcher:/liveSchedule] DEBUG
org.red5.server.scope.Scope - Adding child scope: webtv to {}
2014-07-25 15:22:48,904 [Launcher:/liveSchedule] ERROR
org.red5.server.scope.Scope - Could not start scope Scope [name=liveSchedule,
path=/default, type=APPLICATION, autoStart=true, creationTime=1406272905446,
depth=1, enabled=true, running=false] java.lang.StackOverflowError
What version of the product are you using? On what operating system?
1.0RC2 on windows7
Please provide any additional information below.
Source Code,settings and media file are attached
Original issue reported on code.google.com by [email protected]
on 25 Jul 2014 at 7:50
Attachments:
Copied from original issue: mondain/red5#515
We are running Red5 1.0.1 on Windows. In our setup it normally consumes about 300M of heap, but from time to time memory usage starts to grow and Red5 crashes with OutOfMemory exception.
We used a tool called Plumbr to analyze memory usage. Below are a couple of typical reports that we get from the tool in case of OOM:
https://portal.plumbr.eu/shared#/incident/188474?token=Hi5zH2LjgtLAqYdn5QezvzxSuEc
https://portal.plumbr.eu/shared#/incident/188457?token=ToJm7QFliYVZCU5ezNw_0NPuRnw
Please let me know, if you need any additional information.
I'm not a Java programmer by trade and I'm using Maven for the first time instead of Ant
when I try and build webapp I get this:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.squawk:red5_squawk:war:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 75, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ line 138, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 132, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Red5 Flash Audio Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml (617 B at 3.4 KB/sec)
Downloading: http://oss.sonatype.org/content/repositories/snapshots/org/jaudiotagger/2.0.4-SNAPSHOT/maven-metadata.xml
Downloading: http://oss.sonatype.org/content/repositories/releases/org/jaudiotagger/2.0.4-SNAPSHOT/maven-metadata.xml
Downloading: http://download.java.net/maven/2/org/jaudiotagger/2.0.4-SNAPSHOT/maven-metadata.xml
Downloading: http://download.osgeo.org/webdav/geotools/org/jaudiotagger/2.0.4-SNAPSHOT/maven-metadata.xml
Downloaded: http://download.java.net/maven/2/org/jaudiotagger/2.0.4-SNAPSHOT/maven-metadata.xml (306 B at 0.6 KB/sec)
Downloading: http://oss.sonatype.org/content/repositories/snapshots/org/apache/mina/mina-integration-beans/2.0.8/mina-integration-beans-2.0.8.bundle
Downloading: http://oss.sonatype.org/content/repositories/snapshots/org/apache/mina/mina-integration-ognl/2.0.8/mina-integration-ognl-2.0.8.bundle
Downloading: http://oss.sonatype.org/content/repositories/snapshots/org/apache/mina/mina-core/2.0.8/mina-core-2.0.8.bundle
Downloading: http://oss.sonatype.org/content/repositories/releases/org/apache/mina/mina-integration-beans/2.0.8/mina-integration-beans-2.0.8.bundle
Downloading: http://oss.sonatype.org/content/repositories/releases/org/apache/mina/mina-integration-ognl/2.0.8/mina-integration-ognl-2.0.8.bundle
Downloading: http://oss.sonatype.org/content/repositories/releases/org/apache/mina/mina-core/2.0.8/mina-core-2.0.8.bundle
Downloading: http://download.java.net/maven/2/org/apache/mina/mina-integration-beans/2.0.8/mina-integration-beans-2.0.8.bundle
Downloading: http://download.java.net/maven/2/org/apache/mina/mina-integration-ognl/2.0.8/mina-integration-ognl-2.0.8.bundle
Downloading: http://download.java.net/maven/2/org/apache/mina/mina-core/2.0.8/mina-core-2.0.8.bundle
Downloading: http://repo.maven.apache.org/maven2/org/apache/mina/mina-integration-beans/2.0.8/mina-integration-beans-2.0.8.bundle
Downloading: http://repo.maven.apache.org/maven2/org/apache/mina/mina-integration-ognl/2.0.8/mina-integration-ognl-2.0.8.bundle
Downloading: http://repo.maven.apache.org/maven2/org/apache/mina/mina-core/2.0.8/mina-core-2.0.8.bundle
Downloading: http://download.osgeo.org/webdav/geotools/org/apache/mina/mina-integration-beans/2.0.8/mina-integration-beans-2.0.8.bundle
Downloading: http://download.osgeo.org/webdav/geotools/org/apache/mina/mina-integration-ognl/2.0.8/mina-integration-ognl-2.0.8.bundle
Downloading: http://download.osgeo.org/webdav/geotools/org/apache/mina/mina-core/2.0.8/mina-core-2.0.8.bundle
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.917 s
[INFO] Finished at: 2015-02-06T07:44:21+00:00
[INFO] Final Memory: 13M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project red5_squawk: Could not resolve dependencies for project org.squawk:red5_squawk:war:1.0-SNAPSHOT: The following artifacts could not be resolved: org.apache.mina:mina-integration-beans:bundle:2.0.8, org.apache.mina:mina-integration-ognl:bundle:2.0.8, org.apache.mina:mina-core:bundle:2.0.8: Could not find artifact org.apache.mina:mina-integration-beans:bundle:2.0.8 in sonatype-snapshots (http://oss.sonatype.org/content/repositories/snapshots) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
in my pom.xml I have this under repositories
<repository>
<id>sonatype-snapshots</id>
<name>Sonatype Snapshots</name>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
<repository>
<id>sonatype-releases</id>
<name>Sonatype Releases</name>
<url>http://oss.sonatype.org/content/repositories/releases</url>
</repository>
<repository>
<id>maven2-repository.dev.java.net</id>
<url>http://download.java.net/maven/2</url>
</repository>
I happen to notice if I clear ~/.m2 before building that ~/.m2/repository/org/apache/mina/mina-integration-ognl/2.0.8 there is no JAR file downloaded by maven, and it seems to getting and failing on the bundle file (I hear these are like jar's + extra metadata)
I happened to google and find this by one of your devs
http://mail-archives.apache.org/mod_mbox/mina-dev/201212.mbox/%3CJIRA.12617575.1353920015351.1708.1354820829636@arcas%3E
Which suggests a Maven issue.
I'm using mvn install -U -c
(this think forces it to look remotely) to build
Remove the groboutils library and replace with reg. java.
Example:
https://gitorious.org/jtestplatform/jtestplatform/commit/8bfee9fa93dabf398c091036ad4b7a66d17c1eae
From @GoogleCodeExporter on March 15, 2015 17:1
In org.red5.server.Client this:
ServerClientDetection detection = new ServerClientDetection();
detection.checkBandwidth(Red5.getConnectionLocal());
But it's execute before the NetConnection.Connect.Success receive by FMS and
the FMS close the connection.
I think this call must be pending and make after de
NetConnection.Connect.Success is sent.
What do you think?
Original issue reported on code.google.com by [email protected]
on 13 Aug 2013 at 6:46
Copied from original issue: mondain/red5#424
I've noticed that when i use the Red5 server in Eclipse
the name of the file it is looking for is red5.jar
The file name that is generated is red5-server.jar
Issue was found using the nightly build of 1.0.4 (as of this date) from https://builds.apache.org/job/Red5-server/changes. It may affect versions since 1.0.1 (noted at the end).
When using the red5-shutdown.bat script on windows 7, the appStop() is not being triggered.
Basic code example is as follows:
public class myApplicationTest extends org.red5.server.adapter.MultiThreadedApplicationAdapter
{
@Override public boolean appStart(IScope app) {
System.out.println("App started." ); // <== WORKS FINE
if (super.appStart(app) == false) {
return false;
}
return true;
}
@Override public void appStop(IScope app) {
System.out.println("Shut down started" ); // <== NEVER CALLED
super.appStop(app);
}
}
I believe this is an issue in 1.0.1 (and perhaps since) as well. The application logs shutdown events, and looking back to when it was in 1.0.1, I do not see any shutdown event in those logs.
*** On a related side note the reason I found this bug is that I need stream recordings to be nicely closed when Red5 is shutdown (i.e. the .ser copied to a .flv). Assuming appStop() is triggered as it should be, will Red5 automatically close all open recordings or does that need to be done manually? I would like to confirm what default behavior should/will be.
I've downloaded last version of RED5 and got an exception in logs:
[WARN] [RTMPExecutor#LKYMZ6ZDIEK1U-1] org.red5.server.net.rtmp.RTMPHandler - Scope not found
org.red5.server.exception.ScopeNotFoundException: Scope not found: SOSample in null
at org.red5.server.scope.ScopeResolver.resolveScope(ScopeResolver.java:106) ~[red5-server.jar:na]
at org.red5.server.Context.resolveScope(Context.java:154) ~[red5-server.jar:na]
at org.red5.server.net.rtmp.RTMPHandler.onCommand(RTMPHandler.java:323) ~[red5-server.jar:na]
at org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:89) [red5-server.jar:na]
at org.red5.server.net.rtmp.ReceivedMessageTask.call(ReceivedMessageTask.java:55) [red5-server.jar:na]
at org.red5.server.net.rtmp.ReceivedMessageTask.call(ReceivedMessageTask.java:1) [red5-server.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_45]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_45]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
[INFO] [RTMPExecutor#LKYMZ6ZDIEK1U-1] org.red5.server.net.rtmp.RTMPHandler - Scope SOSample not found on localhost
[WARN] [NioProcessor-8] org.red5.server.net.rtmp.RTMPConnManager - Connection not found for LKYMZ6ZDIEK1U
[WARN] [NioProcessor-8] org.red5.server.net.rtmp.RTMPMinaIoHandler - Destination connection was null, it is already disposed. Session id: LKYMZ6ZDIEK1U
[WARN] [NioProcessor-8] org.red5.server.net.rtmp.RTMPConnManager - Connection not found for LKYMZ6ZDIEK1U
From @GoogleCodeExporter on March 15, 2015 16:59
What steps will reproduce the problem?
1. Download red5-1.0.1.tar.gz
(http://red5.org/downloads/red5/1_0_1/red5-1.0.1.tar.gz)
2. Run Publisher demo
3. Connect to: rtmpe://localhost/oflaDemo
4. Start publishing (live/record/append)
5. Start playing stream in View tab
What is the expected output? What do you see instead?
In View tab should see published stream. Instead:
1. Receiving stream freezes on first (?) frame
2. In red5 logs can see that stream was not found while can see one frame sent
by publish stream.
3. Publishing still works.
For RTMP (rtmp://localhost/oflaDemo) everything is ok.
What version of the product are you using? On what operating system?
1.0.1 from link above.
Please provide any additional information below.
Logs.
Connection:
RED5
[INFO] [NioProcessor-5] org.red5.server.net.rtmp.codec.RTMPProtocolDecoder -
Action connect
[INFO] [NioProcessor-5] org.red5.server.net.rtmp.RTMPConnection - Setting
object encoding to AMF3
[INFO] [NioProcessor-5] org.red5.server.net.rtmp.RTMPHandler - Connecting to:
[WebScope@5eb087fc Depth = 1, Path = '/default', Name = 'oflaDemo']
[INFO] [NioProcessor-5] org.red5.demos.oflaDemo.Application - W3C
x-category:session x-event:connect c-ip:127.0.0.1 c-client-id:2
[INFO] [NioProcessor-5] org.red5.demos.oflaDemo.Application - oflaDemo
appConnect
Flash client
21:25:18:426 - Connecting to rtmpe://localhost/oflaDemo
21:25:18:481 - Asynchronous code error - ReferenceError: Error #1069
21:25:18:481 - NetConnection.Connect.Success
21:25:18:515 - Asynchronous code error - ReferenceError: Error #1069
21:25:18:568 - Asynchronous code error - ReferenceError: Error #1069
21:25:18:598 - Asynchronous code error - ArgumentError: Error #1063
Publishing:
RED5
[INFO] [NioProcessor-5] org.red5.server.stream.ClientBroadcastStream - Provider
connect
[INFO] [NioProcessor-5] org.red5.server.stream.ClientBroadcastStream - Stream
start
[INFO] [NioProcessor-5] org.red5.server.stream.ClientBroadcastStream - Provider
connect
[INFO] [NioProcessor-5] org.red5.demos.oflaDemo.Application - W3C
x-category:stream x-event:publish c-ip:127.0.0.1
x-sname:d7674804-d596-444d-bb0f-d5f61224493f x-name:stream13620817075151
Flash client
21:26:16:344 - Publish - NetStream.Publish.Start
Viewer
RED5
[INFO] [NioProcessor-5] org.red5.server.stream.StreamService - Stream not
found: streamId=3, connection=RTMPMinaConnection from 127.0.0.1 : 45559 to
localhost (in: 762223 out: 140297)
[INFO] [NioProcessor-5] org.red5.server.net.rtmp.RTMPHandler - Remembering
client buffer on stream: 2000
[INFO] [NioProcessor-5] org.red5.server.net.rtmp.RTMPHandler - Remembering
client buffer on stream: 2000
[INFO] [pool-4-thread-2] org.red5.demos.oflaDemo.Application - W3C
x-category:stream x-event:play c-ip:127.0.0.1
x-sname:a987d7f9-5570-4874-a28c-17cd95a653e7
[INFO] [NioProcessor-5] org.red5.server.stream.ClientBroadcastStream - Consumer
connect
[INFO] [pool-4-thread-1] org.red5.demos.oflaDemo.Application - W3C
x-category:stream x-event:play c-ip:127.0.0.1
x-sname:a987d7f9-5570-4874-a28c-17cd95a653e7 x-name:stream13620817075151
Flash client
21:27:34:348 - Playback - NetStream.Play.Reset
21:27:34:349 - Playback - NetStream.Play.Start
21:27:34:623 - Playback - NetStream.Video.DimensionChange
21:27:39:398 - Playback - NetStream.Play.InsufficientBW
21:27:44:726 - Playback - NetStream.Play.InsufficientBW
21:27:50:550 - Playback - NetStream.Play.InsufficientBW
21:27:55:310 - Playback - NetStream.Play.InsufficientBW
21:28:00:639 - Playback - NetStream.Play.InsufficientBW
21:28:05:898 - Playback - NetStream.Play.InsufficientBW
21:28:11:222 - Playback - NetStream.Play.InsufficientBW
Original issue reported on code.google.com by [email protected]
on 4 Mar 2013 at 8:34
Copied from original issue: mondain/red5#356
After writing a custom application and adding the red5 jars (which I shouldn't need to do as spring loads the red5-server jar and red5-service jars), spring throws this error. Any help or maybe insight to see if this is a bug, the mailing list couldn't identify the cause leading me to think it is a bug. My red5-web.xml is after the error.
[INFO] [Launcher:/Red5 WebCams] org.red5.server.Context - Setting parent bean factory as core
Exception in thread "Launcher:/Red5 WebCams" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'web.scope' defined in ServletContext resource [/WEB-INF/red5-web.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.red5.server.Server' to required type 'org.red5.server.api.IServer' for property 'server'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.red5.server.Server] to required type [org.red5.server.api.IServer] for property 'server': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.red5.server.tomcat.TomcatLoader$2.run(TomcatLoader.java:668)
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.red5.server.Server' to required type 'org.red5.server.api.IServer' for property 'server'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.red5.server.Server] to required type [org.red5.server.api.IServer] for property 'server': no matching editors or conversion strategy found
at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:474)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:511)
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.1.xsd">
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/red5-web.properties" />
</bean>
<bean id="web.context" class="org.red5.server.Context" autowire="byType" />
<bean id="web.scope" class="org.red5.server.scope.WebScope" init-method="register">
<property name="server" ref="red5.server" />
<property name="parent" ref="global.scope" />
<property name="context" ref="web.context" />
<property name="handler" ref="web.handler" />
<property name="contextPath" value="${webapp.contextPath}" />
<property name="virtualHosts" value="${webapp.virtualHosts}" />
</bean>
<bean id="web.handler" name="application" class="red5Connection.ConnectionHandler" />
</beans>
If the value sent in setAttribute is of type Object the sync is triggered only the first time.
After that if one of the fields of the object is modified, the object is seen as being unmodified and no sync event is triggered.
I can also track this issue down starting with Red5 1.0.1
Getting this issue for each of the apps:
2014-07-23 13:04:17,404 [0.0.0.0-startStop-1] INFO o.a.c.c.C.[.[0.0.0.0].[/vod] - No Spring WebApplicationInitializer types detected on classpath
2014-07-23 13:04:25,576 [0.0.0.0-startStop-1] INFO o.a.c.c.C.[.[0.0.0.0].[/] - No Spring WebApplicationInitializer types detected on classpath
2014-07-23 13:04:33,562 [0.0.0.0-startStop-1] INFO o.a.c.c.C.[.[0.0.0.0].[/installer] - No Spring WebApplicationInitializer types detected on classpath
2014-07-23 13:04:41,803 [0.0.0.0-startStop-1] INFO o.a.c.c.C.[.[0.0.0.0].[/live] - No Spring WebApplicationInitializer types detected on classpath
Server starts up but these issues affect startup speed by slowing it significantly.
Are they crucial at all?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.