RED5 Installation - BUILD FAILED

Issues related to software problems.

RED5 Installation - BUILD FAILED

Postby Soleille » 2011/03/18 13:18:04

Hello !

I have Centos 5.5 and I'm trying yo install the RED5 server.

I used this tutorial :
http://trac.red5.org/wiki/Install

But I can't go beyond step 2, because when I type :
ant jar
I get these errors :

[root@myserver ivy]# ant jar
Buildfile: build.xml

init:

prepare:

compile-core:

compile-bootstrap:
[javac] Compiling 45 source files to /root/ivy/build/classes/bootstrap
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:30: cannot find symbol
[javac] symbol : class ResourceCollection
[javac] location: package org.apache.tools.ant.types
[javac] import org.apache.tools.ant.types.ResourceCollection;
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:31: package org.apache.tools.ant.types.resources does not exist
[javac] import org.apache.tools.ant.types.resources.BaseResourceCollectionWrapper;
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:32: package org.apache.tools.ant.types.resources does not exist
[javac] import org.apache.tools.ant.types.resources.FileResource;
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:34: cannot find symbol
[javac] symbol: class ResourceCollection
[javac] public class IvyResources extends IvyCacheTask implements ResourceCollection {
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:39: cannot find symbol
[javac] symbol : class BaseResourceCollectionWrapper
[javac] location: class org.apache.ivy.ant.IvyResources
[javac] private class IvyBaseResourceCollectionWrapper extends BaseResourceCollectionWrapper {
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:53: cannot find symbol
[javac] symbol : method setLocation(org.apache.tools.ant.Location)
[javac] location: class org.apache.ivy.ant.IvyResources.IvyBaseResourceCollectionWrapper
[javac] wrapper.setLocation(location);
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:58: cannot find symbol
[javac] symbol : method setProject(org.apache.tools.ant.Project)
[javac] location: class org.apache.ivy.ant.IvyResources.IvyBaseResourceCollectionWrapper
[javac] wrapper.setProject(project);
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:63: cannot find symbol
[javac] symbol : method setDescription(java.lang.String)
[javac] location: class org.apache.ivy.ant.IvyResources.IvyBaseResourceCollectionWrapper
[javac] wrapper.setDescription(desc);
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:69: cannot find symbol
[javac] symbol : method setRefid(org.apache.tools.ant.types.Reference)
[javac] location: class org.apache.ivy.ant.IvyResources.IvyBaseResourceCollectionWrapper
[javac] wrapper.setRefid(ref);
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:75: cannot find symbol
[javac] symbol : method setCache(boolean)
[javac] location: class org.apache.ivy.ant.IvyResources.IvyBaseResourceCollectionWrapper
[javac] wrapper.setCache(b);
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:85: cannot find symbol
[javac] symbol : method iterator()
[javac] location: class org.apache.ivy.ant.IvyResources.IvyBaseResourceCollectionWrapper
[javac] return wrapper.iterator();
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:89: cannot find symbol
[javac] symbol : method size()
[javac] location: class org.apache.ivy.ant.IvyResources.IvyBaseResourceCollectionWrapper
[javac] return wrapper.size();
[javac] ^
[javac] /root/ivy/src/java/org/apache/ivy/ant/IvyResources.java:103: cannot find symbol
[javac] symbol : class FileResource
[javac] location: class org.apache.ivy.ant.IvyResources
[javac] resources.add(new FileResource(a.getLocalFile()));
[javac] ^
[javac] 13 errors

BUILD FAILED
/root/ivy/build.xml:230: Compile failed; see the compiler error output for details.

Total time: 5 seconds



Then I decided to use another tutorial :
http://www.sohailriaz.com/how-to-instal ... centos-53/

But I also get an error when I type :
ant prepare
red5]# ant prepare
Buildfile: build.xml

BUILD FAILED
/usr/local/red5/build.xml:4: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the nested "antversion" element.



I don't understand these errors because I'm new to Linux. I've searched Google but didn't find any solutions...

Can you explain to me what's going wrong, and if possible what I should do ?

Thank you ! :)
Soleille
 
Posts: 6
Joined: 2011/03/18 13:11:24

RED5 Installation - BUILD FAILED

Postby pschaff » 2011/03/18 19:53:19

Welcome to the CentOS fora. Reading FAQ & Readme First is recommended for new users.

What do
Code: Select all
rpm -qa \*java\*
java -version
show?
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: RED5 Installation - BUILD FAILED

Postby Soleille » 2011/03/18 20:20:52

Hello ! :)

Here is what is returned :

[root@myserver ~]# rpm -qa \*java\*
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
tzdata-java-2011b-1.el5
java-1.6.0-openjdk-devel-1.6.0.0-1.16.b17.el5
java-1.6.0-openjdk-1.6.0.0-1.16.b17.el5

[root@myserver ~]# java -version
java version "1.6.0_17"
OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)


Thank you ! :)
Soleille
 
Posts: 6
Joined: 2011/03/18 13:11:24

Re: RED5 Installation - BUILD FAILED

Postby pschaff » 2011/03/18 20:40:46

OK - you have the recommended Java version and it is being used. I neglected to ask about "ant". The links you posted were describing Source Installs for it, but it is a core package:
Code: Select all
# yum info ant
Loaded plugins: allowdowngrade, downloadonly, fastestmirror, priorities
Loading mirror speeds from cached hostfile
...
Available Packages
Name       : ant
Arch       : x86_64
Version    : 1.6.5
Release    : 2jpp.2
Size       : 2.3 M
Repo       : base
Summary    : Ant build tool for java
URL        : http://ant.apache.org/
License    : Apache Software License
Description: Ant is a platform-independent build tool for java. It's used by
           : apache jakarta and xml projects.

What are you using for "ant"? The core package works with gcc-java and not Sun Java.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: RED5 Installation - BUILD FAILED

Postby Soleille » 2011/03/18 21:06:26

I don't know if I will be able to give the necessary information about ant. This is what I have :
Code: Select all
# yum info ant
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Excluding Packages in global exclude list
Finished
Installed Packages
Name       : ant
Arch       : x86_64
Version    : 1.6.5
Release    : 2jpp.2
Size       : 6.2 M
Repo       : installed
Summary    : Outil de construction ant pour java
URL        : http://ant.apache.org/
License    : Apache Software License
Description: Ant est un syst? multi-plateforme de compilation pour Java.
           : Il est utilis?ans les projets apache jakarta et xml.


In "Description", it says the same thing as you (Description: Ant is a platform-independent build tool for java. It's used by apache jakarta and xml projects).

If I type "ant -v", I get :
Code: Select all
# ant -v
Apache Ant version 1.6.5 compiled on January 6 2007
Buildfile: build.xml does not exist!
Build failed


I looked at what I did (I typed "history") and here is the way I installed ant :
Code: Select all
yum install ant subversion

Then, when I saw it didn't work, I tried this way :
Code: Select all
wget http://mir2.ovh.net/ftp.apache.org/dist//ant/binaries/apache-ant-1.8.2-bin.tar.bz2
tar jxvf apache-ant-1.8.2-bin.tar.bz2
mkdir /usr/local/ant
mv apache-ant-1.8.1 /usr/local/ant



Thank you ! :)
Soleille
 
Posts: 6
Joined: 2011/03/18 13:11:24

Re: RED5 Installation - BUILD FAILED

Postby pschaff » 2011/03/18 21:28:56

I think you need ant built for the later Java, but I am neither a Java nor an ant expert. All I find in the usual repos, besides the base package, is
Code: Select all
ant.noarch                     1.6.5-4jpp                       jpackage-generic


See the Jpackage Repo. If that does not work, build from source or better SRPM (a google on ant "src.rpm" may help there), or otherwise find a package that is a match for your Java version.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: RED5 Installation - BUILD FAILED

Postby Soleille » 2011/03/18 21:46:17

Ok, I will try it tomorrow. Thank you for your help. :)
Soleille
 
Posts: 6
Joined: 2011/03/18 13:11:24

Re: RED5 Installation - BUILD FAILED

Postby pschaff » 2011/03/18 21:50:06

You are welcome. Please update the thread with your new results.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: RED5 Installation - BUILD FAILED

Postby Soleille » 2011/03/19 10:52:10

Well, I did the install again, choosing the newest Ant and Red5 files.

I finally get the white and red page with links for Demos, etc. But there are a few problems. There are errors when I use the demo applications and if I leave SSH or simple type Ctrl + c after starting the Red5 server, everything stops working.

Here is what I did :

Code: Select all

1. Install Java using yum. (The -y flag provides a ?yes? answer to all prompts.)

yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel

2. Install the Apache ant binary. I downloaded the most recent release one directly from Apache?s archives.
    The version installed using yum (and default repositories) will not compile Red5.

cd /usr/src
wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.8.2-bin.tar.bz2
tar jxvf apache-ant-1.8.2-bin.tar.bz2
mv apache-ant-1.8.2 /usr/local/ant

3. Set important Java environment variables.

export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/lib/jvm/java
export PATH=$PATH:/usr/local/ant/bin
export CLASSPATH=.:$JAVA_HOME/lib/classes.zip

4. You should also add them to bashrc so they?re available the next time you log in.

echo 'export ANT_HOME=/usr/local/ant' >> /etc/bashrc
echo 'export JAVA_HOME=/usr/lib/jvm/java' >> /etc/bashrc
echo 'export PATH=$PATH:/usr/local/ant/bin' >> /etc/bashrc
echo 'export CLASSPATH=.:$JAVA_HOME/lib/classes.zip' >> /etc/bashrc

5. Install subversion with yum. If you did a base install of CentOS, subversion will not be preinstalled.
yum -y install subversion

6. Check out the Red5 source.
cd /usr/src
svn co http://red5.googlecode.com/svn/java/server/tags/0_9_1 red5-0.9.1.svn

7. Build Red5 with ant.
mv red5-0.9.1.svn /usr/local/
cd /usr/local/red5-0.9.1.svn
ant prepare
ant dist

8. Configuration and start
Start Red5 with dist/red5.sh

9. Create a startup script (optional):
/etc/init.d/red5

#!/bin/bash
# chkconfig: 2345 80 80
# description: Red5 streaming server
# processname: red5
. /etc/rc.d/init.d/functions
[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5
RETVAL=0
case "$1" in
   start)
   echo -n "Starting red5: "
        cd /usr/local/red5-0.9.1.svn
        /usr/local/red5-0.9.1.svn/dist/red5.sh >/dev/null 2>/dev/null &&
        RETVAL=$?
        if [ $RETVAL -eq 0 ]; then
                echo $! > /var/run/red5.pid
                touch /var/lock/subsys/red5
        fi
        [ $RETVAL -eq 0 ] && success $"red5 startup" || failure $"red5 startup"
        echo
   ;;
        stop)
   echo -n $"Stopping down red5: "
        killproc -p /var/run/red5.pid
        RETVAL=$?
        echo
   [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/red5
        ;;
        restart)
        $0 stop
        $0 start
        ;;
        status)
        status red5 -p /var/run/red5.pid
        RETVAL=$?
        ;;
        *)
        echo $"Usage: $0 {start|stop|restart|status}"
        RETVAL=1
esac
exit $RETVAL


10. Set permissions on the script.
chmod a+x /etc/init.d/red5
chkconfig red5 on


STARTING THE SERVER when in the red5 directory :
./dist/red5.sh



After typing ./dist.red5.sh , I get many lines and the last ones are :
[INFO] [Launcher:/installer] org.red5.server.service.Installer - Installer service created
oflaDemo appStart


During the start, I get a few errors :
[WARN] [main] org.springframework.beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'enableRmiAdapter' being accessed! Ambiguous write methods found next to actually used [public void org.red5.server.jmx.JMXAgent.setEnableRmiAdapter(java.lang.String)]: [public void org.red5.server.jmx.JMXAgent.setEnableRmiAdapter(boolean)]
[WARN] [main] org.springframework.beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'enableSsl' being accessed! Ambiguous write methods found next to actually used [public void org.red5.server.jmx.JMXAgent.setEnableSsl(java.lang.String)]: [public void org.red5.server.jmx.JMXAgent.setEnableSsl(boolean)]
[WARN] [main] org.springframework.beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'enableMinaMonitor' being accessed! Ambiguous write methods found next to actually used [public void org.red5.server.jmx.JMXAgent.setEnableMinaMonitor(java.lang.String)]: [public void org.red5.server.jmx.JMXAgent.setEnableMinaMonitor(boolean)]
Mar 19, 2011 11:46:24 AM net.sf.ehcache.Cache
SEVERE: Unable to set localhost. This prevents creation of a GUID. Cause was: stock.ovh.net: stock.ovh.net
java.net.UnknownHostException: stock.ovh.net: stock.ovh.net

[ERROR] [main] net.sf.ehcache.Cache - Unable to set localhost. This prevents creation of a GUID. Cause was: stock.ovh.net: stock.ovh.net
java.net.UnknownHostException: stock.ovh.net: stock.ovh.net


What did I do wrong in your opinion ?

Thank you ! :)
Soleille
 
Posts: 6
Joined: 2011/03/18 13:11:24

Re: RED5 Installation - BUILD FAILED

Postby pschaff » 2011/03/20 13:46:02

Can't say anything with certainty except that you have pushed beyond the normal boundaries of CentOS with the source install, probably done as root, and that you seem to have some sort of network/DNS issues. Is "stock.ovh.net" familiar to you?

Pretty good start on a HowTo if you figure out the remaining bits.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Next

Return to CentOS 5 - Software Support

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest