cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Installation on Ubuntu

nigelevans
Champ in-the-making
Champ in-the-making
Hi Folks

I'm trying (well, failing, mostly) to install Alfresco on Ubuntu. I've spent 2 days scouring web & forums for fixes, and have now got to the point where I don't get any error messages in any of the Alfresco/Tomcat logs when I do
sudo ./alfresco.sh start
from /opt/alfresco. But when I try and access alfresco from my browser at "http:\\<serverIpAddress>:8080\alfresco" the browser times out.

I am using Ubuntu 8.04, and "alfresco-community-tomcat-2.9.0B.tar.gz". I have followed the installation guide in the forums for installing on Ubuntu 7 [and 8], so I am using MySQL.

After trying to access "http:\\<serverIpAddress>:8080\alfresco" I get the following errors reported in catalina.out…
INFO: Deploying web application archive alfresco.war
13:33:48,498 User:System WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
13:33:55,923 User:System ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usageQuotaProtector' defined in
class path resource [alfresco/usage-services-context.xml]: Invocation of init method failed; nested exception is
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction;
nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for
transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
. . .
        … 57 more
13:33:55,950 User:System ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to
listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usageQuotaProtector' defined in
class path resource [alfresco/usage-services-context.xml]: Invocation of init method failed; nested exception is
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction;
nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for
transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
. . .
        … 57 more
13:33:55,959 User:System ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to
listener instance of class org.alfresco.web.app.ContextListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usageQuotaProtector' defined in
class path resource [alfresco/usage-services-context.xml]: Invocation of init method failed; nested exception is
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction;
nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for
transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
. . .
        … 57 more
29-Jun-2008 13:33:55 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
29-Jun-2008 13:33:55 org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
29-Jun-2008 13:34:01 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
29-Jun-2008 13:34:02 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
29-Jun-2008 13:34:02 org.apache.catalina.startup.Catalina start
INFO: Server startup in 63292 ms
I'd be very grateful if anyone could suggest a solution to get alfresco working on my system.

Kind regards,
Nigel
(Linux newbie)
34 REPLIES 34

spabla
Champ in-the-making
Champ in-the-making
The default http port is 8080, I see you used 8090. Another question what JDK/JVM version did you use? If you used 1.6x, then try 1.5x.

Sarvjit

mikeh
Star Contributor
Star Contributor
Looks more like the database couldn't be contacted. Check it's listening on the default port and it's not firewalled off locally.

Mike

nigelevans
Champ in-the-making
Champ in-the-making
Hi Sarvjit

Thanks for your prompt reply. I'm afraid I made a typo - I WAS using port 8080 (I have now edited my original post).
The default http port is 8080, I see you used 8090. Another question what JDK/JVM version did you use? If you used 1.6x, then try 1.5x.
Java reports the following version.
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
So I guess I need to try version 1.5.

Kind regards,
Nigel

nigelevans
Champ in-the-making
Champ in-the-making
Hi Mike

Thanks for your post.
Looks more like the database couldn't be contacted. Check it's listening on the default port and it's not firewalled off locally.
I think MySQL is configured to listen on the default port 3306 (not sure how to verify this). I am using eBox, so I have created a network service for this port - that should prevent the firewall from blocking it. I then emptied out the alf_data directory, dropped the database, and created a fresh alfresco database. I then rebooted the server. However, I still get a timeout on :8080\alfresco, and I get the same error messages in catalina.log, as per my original post.

Kind regards,
Nigel

matthewboh
Champ in-the-making
Champ in-the-making
Nigel - you still listening to this thread?  I'm trying to install Alfresco on Ubuntu as well and starting to go through the steps.

Right now, I'm installing some of the other applications that are needed with alfresco - so I've installed hibernate, log4j, lucene, and imagemagick but trying right now to find out if the Bouncy Castle Cryptography Extension can be substituted for the Sun version since there's no package for Ubuntu hardy

So, so far I've done

sudo apt-get install libhibernate-commons-annotations-java liblucene2-java liblog4j1.2-java imagemagick

I'm going to try it with libgnucrypto-java and I'll keep updating this entry

nigelevans
Champ in-the-making
Champ in-the-making
Hi matthew

Yes, I'm still here… And Alfresco still doesn't work on my system! I think the problem is that Tomcat can't connect to MySQL. I have seen several posts that suggest that the Alfresco installation will fail on systems that already have MySQL installed. Since I am installing on a LAMP server, then this may be the cause of the problem. But I can't find out why, or how to fix it.

Kind regards, Nigel

matthewboh
Champ in-the-making
Champ in-the-making
I've actually given up - it ended up breaking everything else on my system that was running under Tomcat, so I think the idea is to either start with one of their distro's that they recommend or with a completely naked system.

It seems as though it's looking for certain files to be in certain places and I have a feeling that it takes over the Tomcat server on the box, so you can't have other applications running on it.  I'll let you know if I try it on another box.

nigelevans
Champ in-the-making
Champ in-the-making
Hi matthew

Thanks for your comments. I'm inclined to give up, too. Not just because I can't get the installation to work, but because I'm concerned that if the database ever got mangled, then it might prove impossible (or beyond me, at least) to recover the data. It looks like the boring old shared drive is here to stay!

mikewaters
Champ in-the-making
Champ in-the-making
Bit late maybe, but I have been running 2.1CE and the trunk from a few months ago on Ubuntu Hardy with no insurmountable problems.

If MikeH is right and alfresco can't connect to the db then there are a few things to check

1. is mysql up and running? I guess so if you can log in and drop the db. To be sure try $ netstat -ln | grep 3306
2. make sure you have the mysql jar in the right place - mine is at ./common/lib/mysql-connector-java-5.0.3-bin.jar
3. double check the settings in custom-repository.properties and make sure you can log into the db with the alfresco username and password.
You have to uncomment the database  section and the mysql section and make sure the username and password match what is set up in the db

# Sample database connection properties
db.username=alfresco
db.password=alfresco
db.pool.initial=10
db.pool.max=100

and

# MySQL connection (This is default and requires mysql-connector-java-5.0.3-bin.jar, which ships with the Alfresco server)

db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost/alfresco

in
./tomcat/shared/classes/alfresco/extension/custom-repository.properties

4. were there any errors when you followed the instructions in README-mysql.txt?

good luck!