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 your persistence. I created the Java file, as you suggested. But when I try and open http://localhost:8080/alfresco/test.jsp, I just get the "The server at … is taking too long to respond." message, as usual.

I have seen other posts that suggest that when TomCat is running, you get a banner page at http://localhost:8080. But I just get the "The server at … is taking too long to respond." message. I think this implies that TomCat isn't running properly. Maybe I need too fix that first. But I don't know how to.

I am concluding that I don't have sufficient Linux skills to run Alfresco.

Kind regards, Nigel

mikeh
Star Contributor
Star Contributor
Are you still getting the same exception?
nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection

It's worrying when you say "Alfresco takes over Tomcat and breaks it" (to paraphrase) as we're certainly not doing that intentionally. It sounds like a fundamental permissions issue though.

Mike

mikewaters
Champ in-the-making
Champ in-the-making
Mike,

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

Thanks!

I used the 2.9b tomcat bundle - not sure exactly what tomcat minor version that is, but definitely 5.5.x I also have JDK 1.5.0_12, all on Ubuntu Hardy 8.04…

matthewboh
Champ in-the-making
Champ in-the-making
Apparently, Tomcat changes the directory structure between 5.5 and 6 and I have a feeling it's looking for something and not finding it correctly.

It's difficult for me to continue installing it.  I've tried 2.1, 2.9b and 3 and it's got to be an issue with either Tomcat 6 or Java 6. 

MikeH - I say it's trying to take over the Tomcat server because every time I install the alfresco.war file, I get all these errors concerning binding to the port that I've installed Tomcat to.  The first installation, I had Tomcat installed to port 8180, and I was getting the binding errors.  The easiest way for me to fix the issue was to delete Tomcat off my system, then reinstall Tomcat.  The second installation, I set the Tomcat port to 8080, and now I'm getting binding errors to port 8080. I'll try to reinstall Alfresco and make sure that the permissions are set.

I'm currently running OpenbravoERP on the system with no problems!

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

Good idea to check the logs… I now get a different error, so we must be making progress! I get lots of errors about Java running out of heap, like this
16:55:17,810 User:System ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:441)
        at org.alfresco.repo.importer.ImporterBootstrap.onBootstrap(ImporterBootstrap.java:663)
… lots of at blah, blah …
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.OutOfMemoryError: Java heap space
So I have tried to increaqse the heap space, by changing /etc/init.d/alfresco as follows
#
# Alfresco init script for Ubuntu
# 2 nov 2007 Joost Horward
#

export ALFRESCO_HOME=/opt/alfresco
export CATALINA_BASE=/opt/alfresco/tomcat
export CATALINA_HOME=/opt/alfresco/tomcat
export PIDFILE=/var/run/alfresco
export LOGFILE=/var/log/alfresco/alfresco.log

# Set any default JVM values
export JAVA_OPTS='-Xms512m -Xmx512m -Xss64k -server -Djava.io.tmpdir=/var/lib/alfresco/tmp'
… etc …
But I still get same out of heap errors in the log, and the server timeout error message on localhost:8080/alfresco
Maybe I need to change memory settings somewhere else?

Kind regards, Nigel

matthewboh
Champ in-the-making
Champ in-the-making
Nigel,

Just add the next two lines to (wherever you have tomcat installed)/bin/catalina.sh:
# —– Change memory settings ———————-
JAVA_OPTS="$JAVA_OPTS "-Xmx256M" "-Xms384M

and see if that helps things

nigelevans
Champ in-the-making
Champ in-the-making
Hi Matthew

Thanks for your suggestion. I tried it. Now I get (only) the following entry in catalina.out
Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified
Kind regards, Nigel

matthewboh
Champ in-the-making
Champ in-the-making
How much memory do you have on that machine?

rbergstrom
Champ in-the-making
Champ in-the-making
Hi Matthew

Thanks for your suggestion. I tried it. Now I get (only) the following entry in catalina.out
Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified
Kind regards, Nigel

Nigel:

If you used the settings in the previous post, the maximum heap size (-Xmx) is set lower than the initial heap size (-Xms) which would cause a problem.  Reverse them. Smiley Happy

// RAB

nigelevans
Champ in-the-making
Champ in-the-making
I think there is only 512MB RAM in my server. Maybe that isn't enough?

As suggested, I reversed the memory settings. Now I get the following messages in calalina.out.
19-Aug-220:46:30,191 User:System INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /var/lib/alfresco/alf_data
20:46:30,296 User:System INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
20:46:31,750 User:System INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
20:46:32,753  ERROR [smb.protocol.mailslot] HostAnnouncer error
java.io.IOException: Operation not permitted
        at java.net.PlainDatagramSocketImpl.send(Native Method)
        at java.net.DatagramSocket.send(DatagramSocket.java:612)
        at org.alfresco.filesys.netbios.NetBIOSDatagramSocket.sendDatagram(NetBIOSDatagramSocket.java:160)
        at org.alfresco.filesys.netbios.NetBIOSDatagram.SendDatagram(NetBIOSDatagram.java:396)
        at org.alfresco.filesys.smb.mailslot.TcpipNetBIOSHostAnnouncer.sendAnnouncement(TcpipNetBIOSHostAnnouncer.java:215)
        at org.alfresco.filesys.smb.mailslot.HostAnnouncer.run(HostAnnouncer.java:313)
20:46:32,803  ERROR [smb.protocol.mailslot]  Check <broadcast> setting in file-servers.xml
20:46:33,241 User:System WARN  [alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
20:46:32,803  ERROR [smb.protocol.mailslot]  Check <broadcast> setting in file-servers.xml
20:46:33,241 User:System WARN  [alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
20:46:33,278 User:System INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_06-b02; maximum heap size 381.063MB
20:46:33,279 User:System WARN  [service.descriptor.DescriptorService] Alfresco JVM - WARNING - maximum heap size 381.063MB is less than recommended 512MB
20:46:33,280 User:System INFO  [service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.9.0 (B 683) schema 116 - Installed version 2.9.0 (B 683) schema 116
19-Aug-2008 20:46:46 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
19-Aug-2008 20:46:46 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
19-Aug-2008 20:46:46 org.apache.catalina.startup.Catalina start
INFO: Server startup in 88461 ms
008 20:45:18 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
19-Aug-2008 20:45:18 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2727 ms
19-Aug-2008 20:45:18 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
19-Aug-2008 20:45:18 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
19-Aug-2008 20:45:18 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
19-Aug-2008 20:45:20 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
20:46:09,787 User:System WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
20:46:20,639 User:System INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
20:46:22,748 User:System INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
20:46:30,191 User:System INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /var/lib/alfresco/alf_data
20:46:30,296 User:System INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
Any suggestions?

Kind regards, Nigel