cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Alfresco on FC4

trying2alfresco
Champ in-the-making
Champ in-the-making
Hey,

I am trying to install Alfresco on FC4. I have already installed all the necessary prerequisites. (JDK, MySQL, PHP) Then I went through the installation process which went fine. Then I started Alfresco with the following command ./alf_start.sh the output that I receive is
/usr/local/alfresco-1.2.1/bin/alfrescoctl.sh : mysql  started
A mysqld process already exists
[root@localhost alfresco-1.2.1]# Using CATALINA_BASE:   /usr/local/alfresco-1.2.1/tomcat
Using CATALINA_HOME:   /usr/local/alfresco-1.2.1/tomcat
Using CATALINA_TMPDIR: /usr/local/alfresco-1.2.1/tomcat/temp
Using JRE_HOME:       /usr/local/alfresco-1.2.1/java
Using JAVA_OPTS:       -Xms128m -Xmx512m -server -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/alfresco-1.2.1/tomcat/conf/logging.properties
Starting OpenOffice service…
It does not go any further from there.  I also checked http://localhost:8080/alfresco to see if it was working. But I got the following error message.
HTTP Status 404 - /alfresco/

type Status report

message /alfresco/

description The requested resource (/alfresco/) is not available.
Apache Tomcat/5.5.12

I am guessing that the problem is with the the configuration of openoffice but I am not sure what exactly to do so ideas would be appreciated.

Thanks for all your help.
24 REPLIES 24

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

Try checking the path of your OpenOffice installation and make sure it matches what's in alfrescoctl.sh.

If it matches then you should check/post the Catalina logs.

Cheers.

–Aladdin

trying2alfresco
Champ in-the-making
Champ in-the-making
Thanks for your quick response.

I am not sure where this reference to openoffice should be cause I can't seem to find it. So i thought i would post the file.

#!/bin/sh
#
# the path to your PID file

HOSTNAME=`hostname`
MYSQL_PIDFILE=/usr/local/alfresco-1.2.1/mysql/data/$HOSTNAME.pid
TOMCAT_ROOTDIR=/usr/local/alfresco-1.2.1/tomcat
JRE_HOME=/usr/local/alfresco-1.2.1/java
#
MYSQL_START="/usr/local/alfresco-1.2.1/mysql/bin/safe_mysqld –port=3307 –sock=/usr/local/alfresco-1.2.1/mysql/data/mysql.sock –old-passwords"
MYSQL_STOP="/usr/local/alfresco-1.2.1/mysql/bin/mysqladmin –sock=/usr/local/alfresco-1.2.1/mysql/data/mysql.sock -u root -p shutdown"
MYSQL_PASSWORD=""
#
LYNX="lynx -dump"
MYSQL_STATUS=""
MYSQL_PID=""


PID=""
ERROR=0

get_pid() {
    PID=""
    PIDFILE=$1
    # check for pidfile
    if [ -f $PIDFILE ] ; then
        PID=`cat $PIDFILE`
    fi
}

get_mysql_pid() {
    get_pid $MYSQL_PIDFILE
    if [ ! $PID ]; then
        return
    fi
    if [ $PID -gt 0 ]; then
        MYSQL_PID=$PID
    fi
}

is_service_running() {
    PID=$1
    if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then
        RUNNING=1
    else
        RUNNING=0
    fi
    return $RUNNING
}

is_mysql_running() {
    get_mysql_pid
    is_service_running $MYSQL_PID
    RUNNING=$?
    if [ $RUNNING -eq 0 ]; then
        MYSQL_STATUS="mysql not running"
    else
        MYSQL_STATUS="mysql already running"
    fi
    return $RUNNING
}

start_mysql() {
    is_mysql_running
    RUNNING=$?
    if [ $RUNNING -eq 1 ]; then
        echo "$0 $ARG: mysql  (pid $MYSQL_PID) already running"
        exit
    fi
    $MYSQL_START &
    if [ $? -eq 0 ]; then
        echo "$0 $ARG: mysql  started"
        sleep 2
    else
        echo "$0 $ARG: mysql  could not be started"
        ERROR=3
    fi
}

stop_mysql() {
    NO_EXIT_ON_ERROR=$1
    is_mysql_running
    RUNNING=$?
    if [ $RUNNING -eq 0 ]; then
        echo "$0 $ARG: $MYSQL_STATUS"
        if [ "x$NO_EXIT_ON_ERROR" != "xno_exit" ]; then
            exit
        else
            return
        fi
   fi
    echo "MySQL will prompt you for the root password."
    if [ "x$MYSQL_PASSWORD" != "x" ]; then
        MYSQL_STOP="$MYSQL_STOP –password=$MYSQL_PASSWORD"
    fi
    $MYSQL_STOP
   
    is_mysql_running
    RUNNING=$?
    if [ $RUNNING -eq 0 ]; then
       echo "$0 $ARG: mysql stopped"
   else
       echo "$0 $ARG: mysql could not be stopped"
       ERROR=4
   fi
}

start_tomcat() {
   export JAVA_HOME=$JRE_HOME
   CURDIR="`pwd`"
   cd "/usr/local/alfresco-1.2.1/bin"
   ./alfresco.sh start &
   cd "$CURDIR"
}

stop_tomcat() {
   export JAVA_HOME=$JRE_HOME
   CURDIR="`pwd`"
   cd "/usr/local/alfresco-1.2.1/bin"
   ./alfresco.sh stop &
   cd "$CURDIR"
}

   


help() {
   echo "usage: $0 help"
   echo "       $0 (start|stop|restart)"
   echo "       $0 (start|stop|restart) mysql"
   echo "       $0 (start|stop|restart) tomcat"
   cat <<EOF

help       - this screen
start      - start the service(s)
stop       - stop  the service(s)
restart    - restart or start the service(s)

EOF
}

if [ "x$3" != "x" ]; then
    MYSQL_PASSWORD=$3
fi

if [ "x$1" = "xhelp" ]; then
    help
elif [ "x$1" = "xstart" ]; then
    if [ "x$2" = "xmysql" ]; then
        start_mysql
    elif [ "x$2" = "xtomcat" ]; then
        start_tomcat
    else
        start_mysql
        sleep 5
        start_tomcat
    fi
elif [ "x$1" = "xstop" ]; then
    if [ "x$2" = "xmysql" ]; then
        stop_mysql
    elif [ "x$2" = "xtomcat" ]; then
        stop_tomcat
    else
      stop_tomcat
      sleep 5
        stop_mysql
    fi
elif [ "x$1" = "xrestart" ]; then
    if [ "x$2" = "xmysql" ]; then
        stop_mysql "no_exit"
        start_mysql
    elif [ "x$2" = "xtomcat" ]; then
        stop_tomcat "no_exit"
        stop_mysql "no_exit"
        sleep 5
        start_mysql
        sleep 2
        start_tomcat
    fi
fi

exit $ERROR

Thanks again.

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

Sorry my bad. The files are set up this way:

<alfresco-install>/alf_start.sh, which calls
<alfresco-install>/bin/alfrescoctl.sh start, which calls
<alfresco-install>/bin/alfresco.sh start, which calls
<alfresco-install>/bin/start_oo.sh, which starts OpenOffice in headless mode:
#!/bin/sh
# —————————————————————————
# Start script for the OpenOffice transform service
# —————————————————————————

echo "Starting OpenOffice service…"

# Comment or uncomment the appropriate location using #
# Assumes OpenOffice is installed in /opt
<alfresco-install>/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManage
r" -nologo -headless &

# If NeoOffice on Mac OS X
#/Applications/NeoOfficeJ.app/Contents/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceMana
ger" -nologo -headless &
The OpenOffice binary should be at this location: <alfresco-install>/openoffice/program/soffice

By the way, the console will not print anything after the line:
Starting OpenOffice service…

To know what's really going on look at <alfresco-install>/tomcat/logs/catalina.out

I hope this helps. Cheers.

–Aladdin

trying2alfresco
Champ in-the-making
Champ in-the-making
Here is part of the Catalina log. Don't know if this is a problem that has been encountered before. I'm not sure what to make of it so would definately appreciate some insight.

Jun 1, 2006 1:26:00 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Portable Runtime which allows optimal performance in production environments was not found on the java.library.path: /usr/local/alfresco-1.2.1/java/lib/i386/server:/usr/local/alfresco-1.2.1/java/lib/i386:/usr/local/alfresco-1.2.1/java/../lib/i386
Jun 1, 2006 1:26:00 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 1, 2006 1:26:00 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1110 ms
Jun 1, 2006 1:26:00 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 1, 2006 1:26:00 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.12
Jun 1, 2006 1:26:00 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 1, 2006 1:26:01 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Jun 1, 2006 1:26:19 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jun 1, 2006 1:26:19 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Jun 1, 2006 1:26:19 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 1, 2006 1:26:19 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 1, 2006 1:26:19 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 19068 ms
Jun 1, 2006 1:52:18 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Portable Runtime which allows optimal performance in production environments was not found on the java.library.path: /usr/local/alfresco-1.2.1/java/lib/i386/server:/usr/local/alfresco-1.2.1/java/lib/i386:/usr/local/alfresco-1.2.1/java/../lib/i386
Jun 1, 2006 1:52:19 PM org.apache.coyote.http11.Http11BaseProtocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8080
   at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
   at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:137)
   at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
   at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
   at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:762)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:488)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:508)

steve
Champ in-the-making
Champ in-the-making
Hi,

The reason Alfresco is not working has nothing to do with Openoffice - Openoffice is an optional component and does not cause Alfresco to not start correctly if it is not present or running.

What your log file indicates is that you already have a process bound to the port that Tomcat wants to use - port 8080.

SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8080

If you either stop the application that is already using port 8080, or change the port that the Alfresco Tomcat uses then everything should work fine.

Hope this helps,

Steve

trying2alfresco
Champ in-the-making
Champ in-the-making
Hey,

In order to change the Tomcat port do I change it in /conf/server.xml is there anywhere else that I need to change.

steve
Champ in-the-making
Champ in-the-making
Hi,

That is the correct place.
You can also enable compression on the http connection. I use the following:

compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"        compressableMimeType="text/html,text/xml,text/css,application/excel,application/msword,application/powerpoint,application/rtf"

Hope this helps,

Steve

trying2alfresco
Champ in-the-making
Champ in-the-making
Hey Steve,

Thanks for your quick replies. I changed the port from 8080 to 8081. Now here is what I am getting in my log file.

Jun 2, 2006 10:45:36 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Portable Runtime which allows optimal performance in production environments was not found on the java.library.path: /usr/local/alfresco-1.2.1/java/lib/i386/server:/usr/local/alfresco-1.2.1/java/lib/i386:/usr/local/alfresco-1.2.1/java/../lib/i386
Jun 2, 2006 10:45:37 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8081
Jun 2, 2006 10:45:37 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1175 ms
Jun 2, 2006 10:45:37 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 2, 2006 10:45:37 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.12
Jun 2, 2006 10:45:37 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 2, 2006 10:45:38 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Jun 2, 2006 10:45:51 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jun 2, 2006 10:45:51 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Jun 2, 2006 10:45:51 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Jun 2, 2006 10:45:51 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 2, 2006 10:45:52 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 14998 ms
Jun 2, 2006 10:45:52 AM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(Unknown Source)
   at java.net.ServerSocket.bind(Unknown Source)
   at java.net.ServerSocket.<init>(Unknown Source)
   at org.apache.catalina.core.StandardServer.await(StandardServer.java:343)
   at org.apache.catalina.startup.Catalina.await(Catalina.java:600)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:560)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

steve
Champ in-the-making
Champ in-the-making
Hi,

You will have to change all the ports in the 'server.xml' file because they all will be in use by your other Tomcat instance…

Steve