cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Install Via Custom RPM

rednevals
Champ on-the-rise
Champ on-the-rise
I have created an RPM for installing Alfresco. It pulls the installer from a local Nexus repository. At the end of the postinstallScriptlet, it does a "service alfresco start":

service alfresco start &> ${installDir}/alfresco-start.out

The output seems to indicate that is started, but it actually didn't… alfresco-start.out:


    Tomcat started.
    /opt/pet-cms-alfresco/alfresco/tomcat/scripts/ctl.sh : tomcat started

I have to run the same command again after the RPM install completes to get things up and running.

I even tried changing that to run the alfresco startup script directly and get the same results:


    ${installDir}/alfresco/alfresco.sh start &> ${installDir}/alfresco-start.out

Any ideas?
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
Alfresco takes some time to start up for the first time.  Are you simply being impatient?

rednevals
Champ on-the-rise
Champ on-the-rise
No, I don't think its a matter of time. The start-up when run from inside the RPM results in the following output:


Apr 21, 2015 1:00:49 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.6.
Apr 21, 2015 1:00:49 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Apr 21, 2015 1:00:49 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 0.9.8y 5 Feb 2013)
Apr 21, 2015 1:00:49 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Apr 21, 2015 1:00:49 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Apr 21, 2015 1:00:49 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8443"]
Apr 21, 2015 1:00:49 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1055 ms
Apr 21, 2015 1:00:49 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 21, 2015 1:00:49 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.53
Apr 21, 2015 1:00:49 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /opt/pet-cms-alfresco/alfresco/tomcat/conf/Catalina/localhost/solr4.xml
Apr 21, 2015 1:00:49 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' did not find a matching property.


Waiting any amount of time after the RPM install completes, and Alfresco is still not running. I know that it can take up to 15 minutes with a fresh install. So patients is not the problem. Running the same startup command again works as expected.This is being done as root in each case.

Now I am looking at some environmental difference between the two runs, inside/outside RPM. Attached are the environments. I have been looking at the diff and cannot see what night be causing this. Has anyone else tried to package the Alfresco installer in this way?

I did some further experimentation and added a 60 second sleep after the start-up. The Alfresco start-up got further, but still did not complete. This made me wonder if I could throw the startup into the background, so that it would continue to run as the RPM install completed.

service alfresco start &> ${installDir}/alfresco-start.out &


This did not work either.

Is there something that I can monitor, waiting for the start-up to finish, before exiting the RPM?

rednevals
Champ on-the-rise
Champ on-the-rise
If anyone is interested, I found the solution. I had to use nohup to allow the start to complete as a background task.

nohup service alfresco start >${installDir}/alfresco-start-std.out 2>${installDir}/alfresco-start-err.out &