cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get main Alfresco page after install on FC5

itauthor
Champ in-the-making
Champ in-the-making
I've done a fresh install of Fedora Core 5.
I've got Tomcat 5.5.15 running OK (i.e. I can see the Tomcat page on http://localhost:8080/).
I've got MySQL 5.0.18 running OK and created the alfresco DB.

The Alfresco install all appeared to go OK
and I don't get any errors when I start Alfresco:

# /opt/alfresco/alfresco.sh start
Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:       /usr/bin/java
Using JAVA_OPTS:       -Xms128m -Xmx512m -server -XX:CompileCommand=exclude,org/apache/lucene/index/IndexReader$1,doBody

However, all I get at http://localhost:8080/alfresco is a Tomcat 404 message.

I've spent days on this now - not solidly, of course, but it's dragging on and I just want to get it up & running so that we can evaluate it.

Any help anyone can offer on this would be very welcome.
Thanks
22 REPLIES 22

dgynn
Champ in-the-making
Champ in-the-making
The location of the alfresco.log file is set in the webapps/alfresco/WEB-INF/classes/log4j.properties file.  In this file you'll see that the alfresco.log file doesn't have a path specified.  You might want to change it to something like this and create a logs directory.  Otherwise, the file will get created relative to the path of the command that launched tomcat.
log4j.appender.File.File=/home/ac/alfresco/logs/alfresco.log

Likewise, you probably want to set the location of the repository files.  The proper way to do this is described in the docs (http://wiki.alfresco.com/wiki/Repository_Configuration#New_Installations) but if you just want to get going, edit the webapps/alfresco/WEB-INF/classes/alfresco/repository.properties file and set the dir.root.
dir.root=/home/ac/alfresco/alf_data

Make sure those directories are writable by the tomcat user.  Also, you do need MySQL running, Tomcat won't start it.

itauthor
Champ in-the-making
Champ in-the-making
Thanks dgynn, I really thought this would fix things. Unfortunately not.

I had read http://wiki.alfresco.com/wiki/Repository_Configuration#New_Installations (as per the readme) and set dir.root in the webapps/alfresco/WEB-INF/classes/alfresco/repository.properties file. However, this page doesn't mention the log4j.properties file in the webapps/alfresco/WEB-INF/classes directory - so I went and set that to:

/home/ac/alfresco/logs/alfresco.log

I then made sure this directory existed and had open permissions for everyone to write to it.

I then restarted Tomcat.

This time I got:

INFO: Deploying web application archive alfresco.war
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /home/ac/alfresco/logs/alfresco.log (Permission denied)

I had assumed Alfresco would create its log file itself, but nevertheless I tried creating the file /home/ac/alfresco/logs/alfresco.log, chmod-ing it to 77 and chowning it to tomcat:tomcat.

On restarting Tomcat I get the same errors in the Tomcat log.

It's very bizarre that I can do:

ls -al /home/ac/alfresco/logs/alfresco.log
-rwxrwxrwx 1 tomcat tomcat 0 Aug  9 06:19 /home/ac/alfresco/logs/alfresco.log

and yet Tomcat complains about permissions.

itauthor
Champ in-the-making
Champ in-the-making
Success at last!

I can now see the Home Page at
http://<HOSTNAME>:8080/alfresco/faces/jsp/browse/browse.jsp

Thanks to everyone who has contributed here.

What I finally did to get it working was:

1) Changed dir.root in:

/usr/share/tomcat5/shared/classes/alfresco/extension/custom-data-location.properties

and in:

/usr/share/tomcat5/webapps/alfresco/WEB-INF/classes/alfresco/repository.properties

to:

dir.root=/opt/alfresco/alf_data

2) Changed the path to alfresco.log in:

/usr/share/tomcat5/webapps/alfresco/WEB-INF/classes/log4j.properties

to:

/opt/alfresco/logs/alfresco.log

3) Opened up the permissions on /opt/alfresco to allow anyone write permission.

4) Restarted the Tomcat service.

The problem seems to have been to do with having things located within my home directory.

However, the alfresco.log still has errors:

08:12:47,047 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
08:13:06,667 ERROR [org.alfresco.smb.protocol] Failed to get local domain/workgroup name, using default of WORKGROUP
08:13:06,708 ERROR [org.alfresco.smb.protocol] (This may be due to firewall settings or incorrect <broadcast> setting)
08:13:06,974 ERROR [org.alfresco.smb.protocol] CIFS server configuration error, Failed to get IP address(es) for the local server, check hosts file and/or DNS setup
org.alfresco.error.AlfrescoRuntimeException: Failed to get IP address(es) for the local server, check hosts file and/or DNS setup

But I'm going to ignore these for now. Right now I just want to enjoy the sensation of having finally got to the Home Page.

In summary, the main problems I was having were:


- Alfresco download
============================
Initially I was using the tomcat download, thinking this was a download for using with Tomcat. Instead it's for if you don't already have Tomcat up and running. I had Tomcat and MySQL already (thanks to Fedora Core 5) so the download I needed was the WAR version.

- Java
============================
I hadn't installed JDK 5 correctly, so my default java was 1.4 rather than 1.5.

- Location for Alfresco data and log files
============================
I had edited the .properties files, as detailed in http://wiki.alfresco.com/wiki/Repository_Configuration#New_Installations, but you need to put things in a location that you know Tomcat will be able to write to. Even though I thought I'd opened up the permissions, I discovered that I hadn't by su-ing to the logon used by Tomcat and trying to create a file in the location specified by the log4j.appender.File.File parameter in the webapps/alfresco/WEB-INF/classes/log4j.properties file. For example, I went to /usr/share/tomcat5/logs, did an ls -l to check the ownership of the files (which was tomcat:tomcat), I then did the following (as root):

su tomcat
touch /home/ac/alfresco/logs/tmp

which gave me a permission denied error. At this point I realised I should put the alfresco data and logs somewhere more appropriate for the tomcat user.


Thanks especially to "trying2alfresco" and "dgynn", whose comments allowed me to crack this!