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

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

Thanks for trying to help. In response to your questions, I found the following…
1. If I do
netstat -ln | grep 3306
I get
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN
Is that good, or bad?
2. the mysql jar is at ./common/lib/mysql-connector-java-5.0.3-bin.jar
3. I have gazillion checked the settings in custom-repository.properties, and they match the settings in the dB.
4. I can't find a file "README-mysql.txt" on my system, so I don't know what instructions to try.

Comments welcome…

mikewaters
Champ in-the-making
Champ in-the-making
That's good. its showing that "something" is listening on port 3306.
I would check that you can telnet to this port. I'm sure theres a better way, but try $ telnet localhost 3306
If you get this after a few seconds then there is no firewall issue:

Trying 127.0.0.1…
Connected to localhost.
Escape character is '^]'.
@
5.0.51a-3ubuntu5.1 JiR>}|xe, p&h\rHQ@,XZ9Connection closed by foreign host.

README_mysql.txt is in the root of the tarball alfresco-community-tomcat-2.9.0B.tar.gz
theres a README.txt too…That might have something new to try… it mentions that you have to
alter custom-hibernate-dialect.properties as well.

mikewaters
Champ in-the-making
Champ in-the-making
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

Just a comment on Mattew's post up the thread a bit - I don't think you need to install all these packages - the jar files are shipped with alfresco.

matthewboh
Champ in-the-making
Champ in-the-making
Does Alfresco want to take over the tomcat server?

I used to be able to go and get the Tomcat welcome page, but now that I've tried to install Alfresco, I get a binding error on port 8180 (which is the port I installed Tomcat 6 to)

Anyway, thanks for the help, but it looks like I have to pull everything back off and restart with the installation since Tomcat appears to be irrevocably broken!  Aaaahhhh!

Dr. Waters - interesting business - here's mine - http://www.imparisystems.com - but I'm moving over to work with businesses.

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

Thanks for your help. I tried your suggestions with the following results…

[1] When I try
telnet localhost 3306 
I (eventually) get
Trying 127.0.0.1…
Connected to localhost.
Escape character is '^]'.
@
5.0.51a-3ubuntu5.1GD`70-.@,88QkJnlUA'>CConnection closed by foreign host.
[2] I found README_mysql.txt and README.txt (operator error Smiley Happy ). I can't find any inconsistency between their contents and the way my system is set up.

Kind regards, Nigel

andre_blum
Champ in-the-making
Champ in-the-making
Guys,

Contrary to what the comments in the properties file say, the mysql-connetor-<version>.jar file is not included in the distribution.
On a debian or ubuntu, you must therefore do:

apt-get install mysql-java

Then, the problem is that no java virtual machine can find jars in /usr/share/java. What I do to solve that is create a soft link to the endorsed directory:

ln -s /usr/share/java/mysql-connector-java.jar /opt/alfresco/tomcat/common/endorsed.

This should get you out of the mysql connection issues.

greetings
Andre

matthewboh
Champ in-the-making
Champ in-the-making
Hi Andre,

Thanks, but that doesn't seem to do it for me.  I'm trying to install Alfresco 3.0 Labs on an Ubuntu Hardy Heron 8.04 running Tomcat 6.0.18 and Java 6 - I think I'm just too far ahead of the times.

I did this twice today, and followed your instructions.  BTW, it's libmysql-java for the apt-get install command - so it read like this -

sudo apt-get install libmysql-java

But both times, it hosed my Tomcat install so bad, that just deleting the .war file and removing the alfresco subdirectory from the Tomcat directory wouldn't fix it.  The easiest way was to just delete the entire Tomcat directory and install from new.

nigelevans
Champ in-the-making
Champ in-the-making
Hi Andre

Thanks for your suggestions. I did
sudo apt-get install libmysql-java
sudo ln -s /usr/share/java/mysql-connector-java.jar /opt/alfresco/tomcat/common/endorsed
but Alfresco still doesn't work, and I don't get any response from TomCat on localhost:8080.

Do you suppose I have to uninstall, and then reinstall everything, again?

Kind regards, Nigel

mikewaters
Champ in-the-making
Champ in-the-making
Oh dear - still no luck?

Scraping the barrel here but try saving the following code as /opt/alfresco/tomcat/webapps/alfresco/test.jsp while tomcat is running

Then call http://localhost:8080/alfresco/test.jsp in a browser and see what you get. If you get an exception the stack trace should give us a clue…

but on the other hand if you can connect like this (and see "Hello Mike!") then I'm totally at a loss!

Note the code does not make any assumptions about any alfresco tables or data being there - I assume that alfresco never got as far as installing the schema…?

<%@page import="java.sql.*" %>
<%
Connection connection =
    DriverManager.getConnection("jdbc:mysql://localhost:3306/alfresco", "alfresco", "alfresco");
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery("select 'Mike' from dual");
rs.next();
String  name = rs.getString(1);

statement.close();
connection.close();
%>
<HTML>
<BODY>

Hello <%=name%>!

</BODY>
</HTML>

matthewboh
Champ in-the-making
Champ in-the-making
Mike,

     Just out of curiosity, which Tomcat / Java / Alfresco versions are you running?

Thanks!