cancel
Showing results for 
Search instead for 
Did you mean: 

uploadFileServlet not found

martin80
Champ in-the-making
Champ in-the-making
Dear alfresco-experts,

I have the following setup:

Kubuntu 08.04 (yes, using the unstable KDE4.1 desktop).
MySQL5+Tomcat5.5+Sun JDK1.6, all installed from ubuntu packages using apt-get.
Alfresco 2.1 community edition

==============

My custom install manual:

gunzip alfresco-community-war-2.1.0.tar.gz
tar -xvvf alfresco-community-war-2.1.0.tar
rm -f alfresco-community-war-2.1.0.tar
cp alfresco.war /usr/share/tomcat5.5/webapps
/etc/init.d/tomcat5.5 restart

alfresco.war has been extracted in /usr/share/tomcat5.5/webapps/alfresco/

/var/log/tomcat5.5/catalina.*.log shows file permission errors. First have Alfresco log in
/var/log/alfresco/.
edit /usr/share/tomcat5.5/webapps/alfresco/WEB-INF/classes/log4j.properties
log4j.appender.File.File=/var/log/alfresco/alfresco.log
mkdir /var/log/alfresco
chown tomcat55:nogroup /var/log/alfresco
chmod 0755 /var/log/alfresco
Note that this is a bad solution, during a deployment of a new war file the log4j.properties
file will be overwritten. Unfortunately Alfresco 2.1 does not have a solution for this,
but in version 2.2 this issue is solved.

catalina.*.log still shows permission errors. We trust alfresco, so give permissions
to everything:
mcedit /etc/tomcat5.5/policy.d/50user.policy
grant codeBase "file:/var/lib/tomcat5.5/webapps/alfresco/-" {
  permission java.security.AllPermission;
};

setup a mysql database (the db_setup.sql directory can be found in the original .tar.gz):
mysql -u root -p <db_setup.sql

Install the mysql connector for tomcat:
apt-get install libmysql-java (the official GPL mysql java connector)
ln -s /usr/share/java/mysql-connector-java.jar /usr/share/tomcat5.5/common/lib/mysql-connector-java.jar

Add the xalan.jar and serializer.jar libs to the classpath by using the endorsed directory:
cp alfresco-community-war-2.1.0.tar/endorsed/* (serializer.jar and xalan.jar) to /usr/share/tomcat5.5/common/endorsed/

Configure alfresco to use the MySQL database:
cp extensions/extension/custom-repository.properties /var/lib/tomcat5.5/shared/classes/alfresco/extensions/custom-repository.properties
modify this file: switch from hsql to mysql, edit username/passwd.
Note: this file also enables you to connect to a MySQL database on a remote host.

same for custom-hibernate-dialect.properties to swith from HSQL to MySQL.

data-store in seperate partition: /media/sda4/alfresco_data
mkdir /media/sda4/alfresco_data
chown tomcat55:nogroup /media/sda4/alfresco_data
the way to configure this is by modifying
/var/lib/tomcat5.5/shared/classes/alfresco/extensions/custom-repository.properties
unfortunately appearantly there is a bug that causes the system to ignore the data-store settings in this file. There is one solution left: modify in the WEB-INF dir:
/usr/share/tomcat5.5/webapps/alfresco/WEB-INF/classes/alfresco/repository.properties
dir.root=/media/sda4/alfresco_data

now clear all logs in /var/log/apache, /var/log/tomcat5.5 and /var/log/alfresco /var/log/mysql and restart everything.

Alfresco is available at http://localhost:8180/alfresco
Login using admin/admin, uploading a file should work!

==========

And yes, it does work 🙂

Now, I want to use Apache2 for serving static content (yes, I know that this probably won't improve performance, just want to learn from it).

apt-get install modjk and apache2.

using default worker.properties file, except:

===== start /etc/../worker.properties changes:
#workers.java_home=/usr/lib/jvm/java-gcj
workers.java_home=/usr/lib/jvm/java-6-sun/bin/javac
=== end file

and added a file 'alfresco' to /etc/apache2/conf.d/:

===== start file /etc/apache2/conf.d/alfresco
JkWorkersFile /etc/libapache2-mod-jk/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
JkShmFile /var/log/apache2/jk-runtime-status

Alias /alfresco /usr/share/tomcat5.5/webapps/alfresco

JkMount /alfresco/*.jsp ajp13_worker
JkMount /alfresco/jsp/* ajp13_worker

<directory /usr/share/tomcat5.5/webapps/alfresco>
    Options Indexes followSymLinks
    DirectoryIndex index.jsp
    AllowOverride None
    Allow from all
</directory>

<directory /usr/share/tomcat5.5/webapps/alfresco/WEB-INF>
  AllowOverride None
  deny from all
</directory>

<directory /usr/share/tomcat5.5/webapps/alfresco/META-INF>
  AllowOverride None
  deny from all
</directory>
======== end file

this setup looks allright, except when I press the 'upload' button to add new content. The following error message appears in my webbrowser:

"The requested URL /alfresco/uploadFileServlet was not found on this server."

My logs:

======= start alfresco.log
21:45:42,681 WARN  [org.springframework.remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
21:45:45,731 WARN  [org.alfresco.util.OpenOfficeConnectionTester] A connection to OpenOffice could not be established.
21:45:48,911 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
21:45:49,999 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] No changes were made to the schema.
21:45:53,916 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /media/sda4/alfresco_data
21:45:54,128 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
21:45:54,355 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 0 module(s).
21:45:59,558 ERROR [org.alfresco.smb.protocol] Failed to get local domain/workgroup name, using default of WORKGROUP
21:45:59,559 ERROR [org.alfresco.smb.protocol] (This may be due to firewall settings or incorrect <broadcast> setting)
21:45:59,710 ERROR [org.alfresco.smb.protocol.netbios] NetBIOSNameServer setup error:
java.net.BindException: Permission denied
   at java.net.PlainDatagramSocketImpl.bind0(Native Method)
   at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
   at java.net.DatagramSocket.bind(DatagramSocket.java:368)
   at java.net.DatagramSocket.<init>(DatagramSocket.java:210)
   at java.net.DatagramSocket.<init>(DatagramSocket.java:261)
   at java.net.DatagramSocket.<init>(DatagramSocket.java:234)
   at org.alfresco.filesys.netbios.server.NetBIOSNameServer.openSocket(NetBIOSNameServer.java:1085)
   at org.alfresco.filesys.netbios.server.NetBIOSNameServer.run(NetBIOSNameServer.java:1611)
   at java.lang.Thread.run(Thread.java:619)
21:45:59,733 ERROR [org.alfresco.smb.protocol] Server error :
java.net.BindException: Permission denied
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
   at java.net.ServerSocket.bind(ServerSocket.java:319)
   at java.net.ServerSocket.<init>(ServerSocket.java:185)
   at java.net.ServerSocket.<init>(ServerSocket.java:141)
   at org.alfresco.filesys.smb.server.SessionSocketHandler.initialize(SessionSocketHandler.java:257)
   at org.alfresco.filesys.smb.server.NetBIOSSessionSocketHandler.createSessionHandlers(NetBIOSSessionSocketHandler.java:165)
   at org.alfresco.filesys.smb.server.SMBServer.run(SMBServer.java:495)
   at java.lang.Thread.run(Thread.java:619)
21:45:59,725 ERROR [org.alfresco.ftp.protocol] FTP Socket error
java.net.BindException: Permission denied
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
   at java.net.ServerSocket.bind(ServerSocket.java:319)
   at java.net.ServerSocket.<init>(ServerSocket.java:185)
   at java.net.ServerSocket.<init>(ServerSocket.java:141)
   at org.alfresco.filesys.ftp.FTPNetworkServer.run(FTPNetworkServer.java:407)
   at java.lang.Thread.run(Thread.java:619)
21:45:59,753 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_06-b02; maximum heap size 127.063MB
21:45:59,754 WARN  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - WARNING - maximum heap size 127.063MB is less than recommended 512MB
21:45:59,755 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (482) schema 64 - Installed version 2.1.0 (482) schema 64
===== end alfresco.log

======== start mod_jk.log
[Mon Jun 30 21:43:08.968 2008] [5386:3078571776] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:43:08.969 2008] [5387:3078571776] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:43:08.969 2008] [5388:3078571776] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:43:08.970 2008] [5389:3078571776] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:43:08.971 2008] [5390:3078571776] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:43:13.994 2008] [6196:3078104832] [info] init_jk::mod_jk.c (2775): mod_jk/1.2.25 initialized
[Mon Jun 30 21:43:14.029 2008] [6197:3078104832] [info] init_jk::mod_jk.c (2775): mod_jk/1.2.25 initialized
[Mon Jun 30 21:43:24.031 2008] [6202:3078104832] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:43:24.038 2008] [6201:3078104832] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:43:24.046 2008] [6203:3078104832] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:43:24.054 2008] [6204:3078104832] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:43:24.062 2008] [6205:3078104832] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 21:45:03.072 2008] [5361:3078432512] [info] init_jk::mod_jk.c (2775): mod_jk/1.2.25 initialized
[Mon Jun 30 21:45:03.122 2008] [5369:3078432512] [info] init_jk::mod_jk.c (2775): mod_jk/1.2.25 initialized
[Mon Jun 30 22:34:41.068 2008] [6061:3078432512] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 22:34:42.068 2008] [6062:3078432512] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
[Mon Jun 30 22:34:56.068 2008] [6063:3078432512] [warn] map_uri_to_worker::jk_uri_worker_map.c (550): Uri * is invalid. Uri must start with /
===== end mod_jk.log

=== apache error.log
[Mon Jun 30 21:45:03 2008] [notice] Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch configured – resuming normal operations
[Mon Jun 30 22:34:06 2008] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Mon Jun 30 22:34:09 2008] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Mon Jun 30 22:34:38 2008] [error] [client 127.0.0.1] File does not exist: /usr/share/tomcat5.5/webapps/alfresco/uploadFileServlet, referer: http://localhost/alfresco/faces/jsp/browse/browse.jsp
==== end apache error.log

===== part of apache access.log
127.0.0.1 - - [30/Jun/2008:22:34:25 +0200] "GET /alfresco/images/parts/greyround_07.gif HTTP/1.1" 200 73 "http://localhost/alfresco/faces/jsp/browse/browse.jsp" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0"
127.0.0.1 - - [30/Jun/2008:22:34:25 +0200] "GET /alfresco/images/parts/greyround_08.gif HTTP/1.1" 200 68 "http://localhost/alfresco/faces/jsp/browse/browse.jsp" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0"
127.0.0.1 - - [30/Jun/2008:22:34:25 +0200] "GET /alfresco/images/parts/greyround_09.gif HTTP/1.1" 200 73 "http://localhost/alfresco/faces/jsp/browse/browse.jsp" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0"
127.0.0.1 - - [30/Jun/2008:22:34:36 +0200] "POST /alfresco/uploadFileServlet HTTP/1.1" 404 352 "http://localhost/alfresco/faces/jsp/browse/browse.jsp" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0"
127.0.0.1 - - [30/Jun/2008:22:34:41 +0200] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch (internal dummy connection)"
127.0.0.1 - - [30/Jun/2008:22:34:42 +0200] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch (internal dummy connection)"
127.0.0.1 - - [30/Jun/2008:22:34:56 +0200] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch (internal dummy connection)"
====== end of apache access.log

===== start catalina.log
Jun 30, 2008 9:43:24 PM org.apache.coyote.http11.Http11BaseProtocol pause                                                   
INFO: Pausing Coyote HTTP/1.1 on http-8180
Jun 30, 2008 9:43:25 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jun 30, 2008 9:43:30 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8180
Jun 30, 2008 9:43:30 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime
Jun 30, 2008 9:45:07 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
Jun 30, 2008 9:45:08 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180
Jun 30, 2008 9:45:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1838 ms
Jun 30, 2008 9:45:08 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 30, 2008 9:45:08 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5
Jun 30, 2008 9:45:08 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 30, 2008 9:45:10 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Jun 30, 2008 9:46:06 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8180
Jun 30, 2008 9:46:06 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jun 30, 2008 9:46:06 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/77  config=null
Jun 30, 2008 9:46:06 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 30, 2008 9:46:06 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 58330 ms
======= end catalina.log

Any help on solving this issue is greatly appreciated!

Best regards,

Martin (The Netherlands)
1 REPLY 1

tpeelen
Champ in-the-making
Champ in-the-making
Hi Martin/all,

I have the same issue. I migrated from Kubuntu 7.10 to Ubuntu 8.04. Apache2, MySQL5, SUN JDK1.6 through apt-get. I imported the DB again, and put all files in place, but get a 404 from Tomcat (if requested over port 80 over Apache2)… (Alfresco doesn't work on port 8080 neither, so that's a pointer to me.)

Tjarda Peelen
the Netherlands