TurnKey Linux Virtual Appliance Library

TKLPatch for Alfresco 3.3g Community Edition

 

Hi all! I finally finished my Alfresco TKLPatch. Please try it and give some feedback. It's to be applied to the turnkey-core-beta-lucid-x86 image. I hope you enjoy it. 
 

Features:

Alfresco Community Edition 3.3g  (Alfresco/Share)
Both http and https access.
Port 80->8080 and 443->8443 redirection (For a cleaner url)
CIFS Access. (You can access the Alfresco repo as a shared drive)
FTP Access. (You can access the Alfresco repo via ftp client)
Postfix MTA (To send invitations and other emails)
Document Preview configured in Share.
Separte log for alfresco in /var/log/tomcat6/alfresco.log
 

What it does:

 
1) Activate the partner repository. This is because swftools package is in the partner repository. swftools is a suite of script that Alfresco uses to make transformations from pdf to swf for document previews. 
 
echo deb http://archive.canonical.com/ lucid partner >> /etc/apt/sources.list.d/sources.list
 
2) Update packages information
 
apt-get update
 
3) Install required packages. Note that this stack is using openjdk. I'm not a big fan of it, but as it was certified to run with openjdk, I changed from the sun-jdk to this one. OpenOffice is installed to do document transformations (from doc, xls, ppt to pdf). Imagemagick is for images transformations. 
 
apt-get install openjdk-6-jdk tomcat6 mysql-server libmysql-java openoffice.org-core openoffice.org-java-common imagemagick swftools postfix openoffice.org-impress openoffice.org-calc openoffice.org-writer
 
4) Tune jvm memory settings. This is based on recommendations in the Alfresco Installer Guide pdf. Settings are tuned for a 768MB VM, which I think it should be the minimum memory for this app, which is memory heavy. I'm also setting the MySQL Hibernate Dialect as a jvm param.
 
echo JAVA_HOME="/usr/lib/jvm/java-6-openjdk/" >> /etc/environment
source /etc/environment
echo JAVA_OPTS=\"\${JAVA_OPTS} -Xms512m -Xmx512m\" >> /etc/default/tomcat6
echo JAVA_OPTS=\"\${JAVA_OPTS} -XX:MaxPermSize=128M\" >> /etc/default/tomcat6
echo JAVA_OPTS=\"\${JAVA_OPTS} -Dhibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect\" >> /etc/default/tomcat6
 
5) Create directory (/opt/alfresco/) and download Alfresco wars. 
 
mkdir -p /opt/alfresco && cd /opt/alfresco
wget -O alfresco-community-war-3.3g.tar.gz http://dl.alfresco.com/release/community/build-2860/alfresco-community-war-3.3g.tar.gz?dl_file=release/community/build-2860/alfresco-community-war-3.3g.tar.gz
 
6) Untar wars and delete deleted tar.gz to save space. 
 
tar xf alfresco-community-war-3.3g.tar.gz
rm alfresco-community-war-3.3g.tar.gz
 
7) Create Alfresco database:
mysql -u root < /opt/alfresco/extras/databases/mysql/db_setup.sql
 
8) Create Alfresco repository directory
 
mkdir -p /srv/alfresco/alf_data
 
9) Set symlinks to wars and mysql jar. The first two symlinks makes tomcat deploy both alfresco and share wars on startup. The last symlink is to add the mysql java connector to the classpath of tomcat. 
 
ln -s /opt/alfresco/alfresco.war /var/lib/tomcat6/webapps/
ln -s /opt/alfresco/share.war /var/lib/tomcat6/webapps/
ln -s /usr/share/java/mysql-connector-java.jar /var/lib/tomcat6/shared/
10) Set hostname to alfresco. 
 
HOSTNAME=alfresco
echo "$HOSTNAME" > /etc/hostname
sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts
11) Setup initial configurations and required permissions, so that tomcat can read and write files from the repository directory and the additional config files. The alfresco-global.properties file is overlayed on /var/lib/tomcat6/shared/classes/ with the following changes:
 
dir.root=/srv/alfresco/alf_data   (To point to the created directory)
ooo.exe=/usr/bin/soffice        (pointing to openoffice)
ooo.enabled=true
img.root=/usr/bin             (activating imagemagick)
img.exe=/usr/bin/convert
swf.exe=/usr/bin/pdf2swf    (activating swftools)
mail.host=localhost       (activating outbound mail)
mail.port=25
mail.smtp.auth=false
cifs.enabled=true         (CIFS settings)
cifs.serverName=alfresco
cifs.tcpipSMB.port=1445
cifs.netBIOSSMB.namePort=1137
cifs.netBIOSSMB.datagramPort=1138
cifs.netBIOSSMB.sessionPort=1139
ftp.enabled=true   (FTP Settings)
ftp.port=2121
Note the ports: as only root user can bind to ports under 1024, the ports have been configured over that value and are being redirected using iptables as recommended on the Alfresco Wiki (see http://wiki.alfresco.com/wiki/File_Server_Subsystem#Running_SMB.2FCIFS_f... for more info). More info in the next step. Also added 21 port redirection to 2121 and 80->8080 and 443->8443 on the iptables rules as a bonus to easy access.
 
12) Setup logging (to have a nice individual log for alfresco). This file is overlayed by the patch.
nano /var/lib/tomcat6/shared/classes/alfresco/extension/custom-log4j.properties
 
log4j.rootLogger=error, File
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=/var/log/tomcat6/alfresco.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
 
13) Activate iptables for port redirections. Applied the nat redirection rules as explained in Alfresco Wiki. Then saved them to /etc/iptables.rules and created a script to reload them on boot. This files are overlayed by the patch (/etc/iptables.rules and /etc/network/if-pre-up.d/iptablesload)
 
echo 1 > /proc/sys/net/ipv4/ip_forward
modprobe iptable_nat
iptables -F
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443
iptables -t nat -A PREROUTING -p tcp --dport 445 -j REDIRECT --to-ports 1445
iptables -t nat -A PREROUTING -p tcp --dport 139 -j REDIRECT --to-ports 1139
iptables -t nat -A PREROUTING -p udp --dport 137 -j REDIRECT --to-ports 1137
iptables -t nat -A PREROUTING -p udp --dport 138 -j REDIRECT --to-ports 1138
iptables -t nat -A PREROUTING -p tcp --dport 21 -j REDIRECT --to-ports 2121
iptables-save > /etc/iptables.rules

nano /etc/network/if-pre-up.d/iptablesload
#!/bin/sh
iptables-restore < /etc/iptables.rules
exit 0

chmod +x /etc/network/if-pre-up.d/iptablesload
14) Enable Apache SSL access: Following apache tomcat documentation (see http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html), created the key and modified the /etc/tomcat6/server.xml file to use the key. This config is overlayed by the patch (.keystore and server.xml files).
 
cd /var/lib/tomcat6/
/usr/lib/jvm/java-6-openjdk/bin/keytool -genkey -alias tomcat -keyalg RSA
Enter keystore password:  
Re-enter new password: 
What is your first and last name?
  [Unknown]:  
What is the name of your organizational unit?
  [Unknown]:  Turnkey
What is the name of your organization?
  [Unknown]:  
What is the name of your City or Locality?
  [Unknown]:  
What is the name of your State or Province?
  [Unknown]:  
What is the two-letter country code for this unit?
  [Unknown]:  
Is CN=Unknown, OU=Turnkey, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
  [no]:  yes
Enter key password for <tomcat>
(RETURN if same as keystore password): 

nano /etc/tomcat6/server.xml

   <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               keystoreFile=".keystore" keystorePass="changeit"
               clientAuth="false" sslProtocol="TLS" />
15) Applied required permissions so that tomcat behaves like a pony.  
 
chown -R tomcat6:tomcat6 /var/lib/tomcat6 /srv/alfresco
 
16) Overlayed a nice usage.txt for confconsole.
 
That's all folks!
 

Known Issues:

- Message No root 'Web Projects' folder exists (is WCM enabled ?) in logs: see http://issues.alfresco.com/jira/browse/ALF-3085
 
- The site name is not substituted in share invitation mails:  "Invitation to join {0} site". An alfresco bug. See discussion under http://issues.alfresco.com/jira/browse/ALF-959
 
- Alfreso url in DesktopActions and Alfreso.url points to http://alfresco. I didn't find a way that alfresco pick up the configuration files settings pointing to the ip. It seems like a bug, and I was recommended to open an Issue. See http://forums.alfresco.com/en/viewtopic.php?f=9&t=28340 for more info.
 
Please make your tests and be free to post here any new issues arising. 

If anyone has problems, please provide sufficient detail

I'm unable to help you get started without some more info (e.g., /var/log/apache2/alfresco.log and /var/log/apache2/catalina.out)?

I must warn you Alfresco takes a lot of time to start, as Alfresco is a heavy app. Also, its very important the memory, this TKLPatch is memory-optimized for 768MB. How much memory did you assign to the VM? Less memory than that would result in memory allocation errors and Alfresco won't start.

Doubts

Hai!

This is Prasad from Hyderabad in India.

I have a doubt plz clarrify that.

How to deploy java (or) JSP application in alfresco?

Plz send me reply as an mail as soon as possible.

Thanks & Regards

J. Prasad

I can't get this script to work

Hi;

I can't get this to work. I don't understand how to run this script. Trying to install Alfresco on bare metal Intel Quad Core 1.6 G, 4 Gig RAM, 500GB HD.

This is NOT a virtual machine.

I tried to make Alfresco work several years ago and just gave up on it. Nobody seemed to have a way to consistently get it installed. I often wonder why they don't just STOP trying to develop a new trick pony  and just get the install fixed.

Any help you can give me will be greatly appreciated!

Regards,
Ken Jameson
kmj@mahlan.com

(813) 305-1399


Jeremy's picture

I think you're doing it wrong!

This is a TKL Patch. It is designd to patch the TKL Core beta ISO (which is based on Ubuntu 10.04). You then install the ISO which should basically be Alfresco pre-installed and configured as documented above.

To patch the ISO you will need to have TKLPatch installed on another machne (TKL Core is suggested as a base system but should run on most Linux distros - personally I use an Ubuntu 10.04 desktop). Theoretically it should probably still work on an installed 10.04 server system but as you have discovered it may run into problems when you have MySQL or other services already installed and running. It may be hard to troubleshoot as there are too many unknowns when your system is already operational.

I would assume that Adrian tested before posting but I haven't tested this patch yet, so I guess there is still a possibility that there is a bug. If so then Adrian (and/or others) will probably need some more info to track it down, like the exact steps you have taken, the exact place where the patch/install/boot fails and the exact error messages you are getting.

No problem

Ken, as JedMeister explained clearly, this patch is not to be run on an installed system, but to patch TKL Core. Once the TKL Guys (Liraz or Alon) validates it, it could become an official Appliance, and you would be able to download and install an Alfresco in just a few clicks. 

As I'm installing alfresco wars on ubuntu's tomcat, there's no need for alfresco.sh (which basically it's an script to start Alfresco bundled tomcat). In this case alfresco starts when the system's tomcat start, and stops when tomcat stops. No /var/www as this would be Apache's HTTP server home and not Tomcat's home. (Which is in /var/lib/tomcat6/webapps/). 

I would recommend you to download and install Alfresco-Community-3.3g-Linux-x86-Install (138 MB) if you need a production system right now, as this TKLPatch and TKL Core are in beta state. Basically you need to:

mkdir -p /opt/alfresco && cd /opt/alfresco
wget <alfrescolinuxinstallurl>
tar xf alfresco.tar.gz
mysql -u root #and create database alfresco with user/pass
nano tomcat/shared/classes/alfresco-global.properties  #to set your config
./alfresco.sh start

You can follow this guide http://www.howtoforge.com/how-to-install-alfresco-community-3.3-on-ubuntu-server-10.04-lucid-lynx and if you run into any issue, you can send me a message and I'll help you get it running. 

I've been there where you are, Alfresco is not nice to install and configure, and it's easy to finish frustrated. But they are working to make things easier. At least this last release it's easier to install that 3b Lab edition. 

Keep an eye on turnkey linux as this project will help you build an infrastructure fast and easy, and if the patch gets aproved, you'll have an instant alfresco appliance to use!

 

P.S.: I must add that I tested this TKLPatch several times before posting, but if there's something I missed, I'm open for making corrections. But I really need feedback from community.

Alfresco in Partner Repository

What about using the Alfresco package in the partner repository as opposed to the 3.3g version downloaded via the wget in the patch file?

enable partner repository

then

apt-cache show alfresco-community

and then

sudo apt-get install alfresco-community

This might make some things a bit easier.  I'm a bit stuck figuring out what to do now but it seems to be the prefered approach to installing apps?

Can't find that one on the partner repo

Hi Rudiger, I did look up if Alfresco had a package in the partner repos, as I've heard of it some time ago. This would be a prefered approach for the appliance, yes, but it seems that the package is not there. At least not for me:

apt-cache show alfresco-community
W: Unable to locate package alfresco-community
E: No packages found

PS: I did found right now a PPA containing this package https://launchpad.net/~alfresco-isv/+archive/ppa/+packages . I could update the TKLPatch with this version but I would have to test it first. Have you test the patch I posted? What issues do you have with the one you are proposing?

Still can't get this to install on a naked Ubuntu 10.04 system

I still can't get this script to work on a naked Ubuntu 10.04 system.


Jeremy's picture

Redundant comment - see Ken's post below

It's called a patch because it is designed to patch an ISO not run as a script! It does contain a configuration script, but it is more than that.

Seriously you're making this way harder than it needs to be! Adrian's patch is for Turnkey Linux (TKL), to create a TKL Alfresco appliance ISO. The explanation is for transparency. Please ensure you are patching a TKL ISO and installing from that patched TKL ISO before making any further complaints about the patch "not working".

Not being able to run an Afresco instalation script is probably better suited to the Instalation section of the Alfresco forums. I repeat: this is not an Alfresco instalation script, it is a TKL patch, to be applied to a TKL ISO using the TKLPatch application! It is not intended to be run as a script.

If you wish to try Adrian's patch please follow these instructions:

1) Install TKLPatch on a compatible system - let's assume Ubuntu 10.04 (I use desktop but server is fine) running as root. Note: if you are using a 64 bit system as a base then you will need to install from source (git or tarball), otherwise add the repo and use apt.

2) Download TKL Core Lucid beta ISO - this is the minimalist base (Core) Turkey Linux OS (based on Ubuntu Lucid). Let's assume you use home as your working directory ie /root

3) Download Adrian's TKL Alfresco patch (again working in /root).

4) Patch the ISO. At the command prompt (still in /root) type:

tklpatch turnkey-core-beta-lucid-x86.iso alfresco.tar.gz

5) Burn the patched ISO to CD (if planning to install to bare metal - although personally I'd advise testing in a VM first). Don't mistakenly burn the original ISO, the patched one will have 'patched' added to the ISO name.

6) Install TKL Alfresco from CD (or from ISO in a VM) following the prompts (very similar to installing Ubuntu 10.04 Server), reboot when required and you should be greated with the TKL Config Console (it won't look exactly the same, but similar).

IMO it doesn't get much easier than that! Adrian stated that he has tested it numerous times so it should work fine (your point about the required components becoming unavailable in the future is redundant assuming TKL devs release this as an appliance).

If you want further help please post the exact steps you have taken, the exact place where the patch/install/boot fails and the exact error messages you are getting.

Got it!

Thanks guys. I've got Alrefsco 3.3g up and running and it once it loads it screams.

TurnKey Core system has saved me a load of time. Installs in less than 15 minutes. Getting Alfresco up using this method takes another hour. I'll get my notes together in case someone needs them.

A few questions:

  • How is the best way to forward a Word doc / PDF , etc.?
  • Is there a reason not to leave this sitting on top of TKL?
  • Should I wait until the next version of TKL is released? Move to a full Ubuntu 10.4?

Jeremy's picture

Glad you got it sorted

Sorry about the irrelevant post I just made above, I've been working on it for a while and only just realised you'd got it working and posted back.

Assuming this patch is accepted by the TKL Devs it will be added to the TKL library and released as a standalone appliance like the others.

To attach your notes you will need to start a new thread. Or cut and paste into a new post on this thread.

Liraz Siri's picture

Very impressive TKLPatch!

Sorry for the late reply. We're swamped trying to push out the new backup and migration service. Just found a critical bug in one of the open source components we're using and came back online to file an urgent bug report.

What a treat to to see Adrian released the TKLPatch for Alfresco. I'll be playing with it later, but I've taken a quick look and this looks very impressive. This is probably one of the most complex TKLPatches that have been submitted to date.

Everybody give Adrian a big round of applause. Thanks to him Alfresco will make it into the next release batch.

PS: I took the liberty to clean up the confusing train wreck that had become of this thread. Ken, glad you got Alfresco working, but it was really hard to follow your stream of consciousness posts. It would be easier to help you if you kept future posts short and to the point.

Thanks Liraz

I was worried that no official TKL members commented the thread! I've worked on this one a lot, to make it work as expected. I hope you can try it and give some feedback. I'm preparing some other interesting patchs for the weekend ;)

Liraz Siri's picture

Sometimes we lag behind but we never miss anything

Releasing backup and migration is taking up most of our attention right now so chalk up any delays in giving you feedback to that. I wish there were more hours in the day!

Don't be discouraged by the delays on our end, especially since you seem to know what you're doing. Rest assured we are very excited and grateful to have you on board helping to push the project forward. Competent developers from the community are like gold dust for an open source project like TurnKey.

Problem with starting mysql in Alfresco TKLPatch in turnkey-core

Hi All

I installed the new (fixed for MySQL) TKLPatch with

  184  apt-get install git-core
  185  git clone git://github.com/turnkeylinux/tklpatch.git
  187  apt-get install squashfs-tools genisoimage tar gzip
  188  cd tklpatch/
  191  apt-get install make
  192  make install
  194  whereis tklpatch
  197  /usr/local/bin/tklpatch turnkey-core-beta-lucid-x86.iso alfresco.tar.gz

BUT  I still get an error!  See part of the output below:

 

2010-08-03 21:48:54 (197 KB/s) - `alfresco-community-war-3.3g.tar.gz' saved [114028662/114028662]

+ tar xf alfresco-community-war-3.3g.tar.gz
+ rm alfresco-community-war-3.3g.tar.gz
+ service mysql start
 * Starting MySQL database server mysqld                                 [fail]
Removing `local diversion of /sbin/initctl to /sbin/initctl.distrib'
 

Any suggestions?

I am using turnkey-core-beta-lucid-x86.iso as VM within which I am running TKLpatch.

Thanks for your help!

Rudi

Liraz Siri's picture

Turn on debugging + try installing tklpatch from the archive

Since you're already inside TurnKey Core it would be easiest to just install TKLPatch from the archive like this:
apt-get update
apt-get install tklpatch
If you're still having trouble after that try turning on debugging, like this:
export TKLPATCH_DEBUG=y

Turned on debuging for TKL Patch. Still :( with MySQL

Thanks. Turned on debug level info for TKLinux Patch.

 Still don't seem to get a patched ISO out of this process.

I end up with the directories

turnkey-core-beta-lucid-x86.rootfs
turnkey-core-beta-lucid-x86.cdroot
 

Here are couple of extracts from the output of running:

root@core ~# /usr/local/bin/tklpatch turnkey-core-beta-lucid-x86.iso alfresco.tar.gz

Setting up libdbd-mysql-perl (4.012-1ubuntu1) ...
Setting up mysql-client-core-5.1 (5.1.41-3ubuntu12.6) ...
Setting up mysql-client-5.1 (5.1.41-3ubuntu12.6) ...
Setting up mysql-server-core-5.1 (5.1.41-3ubuntu12.6) ...
Setting up mysql-server-5.1 (5.1.41-3ubuntu12.6) ...
 * Starting MySQL database server mysqld                                                               [fail]

Setting up libstlport4.6ldbl (4.6.2-7) ...

And the very last output from the script

HTTP request sent, awaiting response... 200 OK
Length: 114028662 (109M) [application/x-gzip]
Saving to: `alfresco-community-war-3.3g.tar.gz'

100%[====================================================================>] 114,028,662  525K/s   in 3m 32s  

2010-08-04 05:16:26 (524 KB/s) - `alfresco-community-war-3.3g.tar.gz' saved [114028662/114028662]

+ tar xf alfresco-community-war-3.3g.tar.gz
+ rm alfresco-community-war-3.3g.tar.gz
+ service mysql start
 * Starting MySQL database server mysqld                                                               [fail]
+ rm turnkey-core-beta-lucid-x86.rootfs/sbin/initctl
+ chroot turnkey-core-beta-lucid-x86.rootfs dpkg-divert --local --rename --remove /sbin/initctl
Removing `local diversion of /sbin/initctl to /sbin/initctl.distrib'
+ rm -f /etc/debian_chroot
+ [[ -f turnkey-core-beta-lucid-x86.rootfs/etc/resolv.conf.bak ]]
+ mv turnkey-core-beta-lucid-x86.rootfs/etc/resolv.conf.bak turnkey-core-beta-lucid-x86.rootfs/etc/resolv.conf
root@core ~#

I need to go to work now, so I'll try again later a pipe the whole lot to a file for further analysis. Maybe if I install mysql in the virtual host (Also based on turnkey-core-beta-lucid-x86.iso) I might gain some clues.

Liraz Siri's picture

Are you running mysql on the system running tklpatch?

You can't run mysql inside the chroot if you're already running it outside of the chroot because it will try to bind to port 3306 twice. That won't work.

So before running tklpatch, try running this command:

stop mysql
If that doesn't work you can investigate why mysql isn't running like this:
tklpatch-chroot *.rootfs

# inside the chroot mysql refuses to start
start mysql 
cd /var/log/mysql
tail -f error.log

Success stopping mysql in the host worked

Success! Stopping mysql in the host worked.

I have a patched Alfresco ISO based in the TKLPatch. Seems to work well.  Thank you very much.

I am going to spend some time giving this a test drive.

Will also see what the situation is with the Alfresco Package in the Partner repository.

I will also create another TKLPatch to enable public web access via our corporate proxy. None of the TurnKey Iso's can get updates as they need a package called cntlm installed and configured.

Thanks for testing!

 

I'm glad you successfully patched the iso. Be sure to publish here any issue you may found, beside the ones I've already posted. 

Typo

if you install "openjdk" -> replace "java-6-sun" with "java-6-openjdk"

for /etc/environment

and by call keytool

Thanks Sören!

Corrected both typos, when I was writing the doc, I was using sun's jdk. After the change, I did'nt update the notes. 

Worked for me!

Hello Adrian,

Thank you for this. All is well. I created my patched iso. Booted a new vm from the iso. Choose the install option rebooted and logged into Alfresco. Excellent!

Thanks again,

Pierre

You're welcome!

Please if you get into any issue, feel free to post it here. 

imap

I am not able to get imap working. All I can find is that I need to enable the feature in:

alfresco-global.properties
 

I found these:

/opt/alfresco/extensions/extension/alfresco-global.properties
/var/lib/tomcat6/shared/classes/alfresco-global.properties
/var/lib/tomcat6/webapps/alfresco/WEB-INF/classes/alfresco-global.properties.sample
/var/lib/tomcat6/webapps/alfresco/WEB-INF/classes/alfresco/module/test/alfresco-global.properties
/var/lib/tomcat6/webapps/alfresco/WEB-INF/classes/alfresco/module/tests/alfresco-global.properties
 

I think this is the one:

/var/lib/tomcat6/shared/classes/alfresco-global.properties
 

I changed this:

#imap.server.enabled=true
#imap.server.port=143
#imap.server.host=localhost
 

to this:

imap.server.enabled=true
imap.server.port=143
imap.server.host=alfresco

and I also tried:

imap.server.enabled=true
imap.server.port=143
imap.server.host=192.168.55.58

 

And rebooted but I still can't get Thunderbird to see the imap folders.

Can someone tell me what to do please.

Thanks,

Pierre

EDIT: I think it may have something to do with iptables but I don't understand how they work.

Yes!

Sorry for the late response. You're close on your assumption, as I explained in step 11, only root user can bind to ports under 1024, and we're not running alfresco as root for security reasons. So, you should:

1. Bump the port setting in alfresco-global.properties to a higher value. A suggest 1143 so that it's easy to remember. 

2. Add a new iptables rule for port redirection, redirecting all petitions from port 143 to 1143. Issue the following commands as root:

iptables -t nat -A PREROUTING -p tcp --dport 143 -j REDIRECT --to-ports 1143
iptables-save > /etc/iptables.rules

3. Config you're email client using port 143 and try again. 

I've never used this feature of Alfresco. Please try this settings and comment if they worked for you. If not, I'll check alfresco docs to see if I can help.

imap

Hi Adrian,

I tried, no go. With all the changes I made yesterday in my efforts to get it working I thought it best to reinstall from iso for a clean start. I then made the suggested iptables changes but it still did not work. I tried Outlook Express imap client and Thunderbird from two different machines on my lan.

I don't know if it's related but this error is repeating in the log:

16:17:05,124 WARN  [org.alfresco.web.ui.common.component.evaluator.BaseEvaluator] Error during ActionInstanceEvaluator evaluation of org.alfresco.web.action.evaluator.RegenerateRenditionsEvaluator@1f6ad64: 08160051 No root 'Web Projects' folder exists (is WCM enabled ?)

There are no Alfresco log entries for the failed imap connections.

Searching the web it looks like Alfresco imap support is buggy but I did have it working somewhat when I tried running Alfresco server on windows, but I don't want to go back there!

Any other idea's that I might try?

Thanks,

Pierre

Liraz Siri's picture

Not sure WCM is related to IMAP but we could try enabling it...

Just to be clear, I doubt the WCM error message has anything to do with broken IMAP functionality, but one way to find out would be to enabe WCM and see if it has any effect.

I googled around a bit for "is WCM enabled" and the error message looks like a known issue:

You will notice the following error message in the application server stack
User:admin WARN [component.evaluator.BaseEvaluator] Error during ActionInstanceEvaluator evaluation of org.alfresco.web.action.evaluator.RegenerateRenditionsEvaluator@1397d6: 04280002 No root 'Web Projects' folder exists (is WCM enabled ?)

To be noticed after installing WCM on the same instance the warning disappears.

It's been fixed in the development version (3.4.0) but for the stable release (3.3.0) you may need to enable WCM (short for Web Content Management) which is an add-on to Alfresco's core Document Management capabilities.

http://wiki.alfresco.com/wiki/Downloading_and_Installing_WCM

Liraz Siri's picture

Ideas for debugging this

Stumbling around blindly in the dark is no fun. Issues like these are much easier to get a handle on once you understand what is going on.

Use netstat: Try to use netstat to see if Alfresco is listening on 1143 and on what IP address. It shouldn't be localhost, otherwise you're not going to be able to access it from the outside:

netstat -atnp

Use a sniffer: If the service is up and running and Thunderbird still doesn't work, try running a sniffer like wireshark on the client to see its communications with the server. Right click on a packet and select "Follow TCP stream" to see the session back and forth. I use Wireshark a lot when I'm debugging stuff. A nice alternative you can use on the server is tcpick, which can save network traffic to files:

tcpick -wRub -i eth0

Or to the console / stdout (you'll want to be more selective to reduce the noise, hence the port):

tcpick -yP -i eth0 "port 1143"

Logging level: I'm not familiar with how to do this for Alfresco specifically but many applications have the ability to increase the logging level so you're getting verbose debugging messages that help shed light into what's going on.

imap success

Thanks Liras! I used netstat -atnp and noticed:
127.0.1.1:1143 and
:::2121

I assumed ::: means any ip address while 1143 was attaching to 127.0.1.1 only!

I had noticed 127.0.1.1 in the /etc/hosts file. So I remmed it out and added the .58 below.

/etc/hosts

127.0.0.1 localhost
#127.0.1.1 alfresco
192.168.55.58 alfresco alfresco.fcn.local

tcp6 0 0 :::22 :::* LISTEN 967/sshd
tcp6 0 0 192.168.55.58:1143 :::* LISTEN 1043/java
tcp6 0 0 :::8443 :::* LISTEN 1043/java
tcp6 0 0 :::50500 :::* LISTEN 1043/java
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 1043/java
tcp6 0 0 :::1445 :::* LISTEN 1043/java
tcp6 0 0 :::50501 :::* LISTEN 1043/java
tcp6 0 0 :::50502 :::* LISTEN 1043/java
tcp6 0 0 :::50503 :::* LISTEN 1043/java
tcp6 0 0 :::50504 :::* LISTEN 1043/java
tcp6 0 0 :::2121 :::* LISTEN 1043/java
tcp6 0 0 :::50505 :::* LISTEN 1043/java
tcp6 0 0 :::50506 :::* LISTEN 1043/java
tcp6 0 0 :::50508 :::* LISTEN 1043/java
tcp6 0 0 :::34189 :::* LISTEN 1043/java
tcp6 0 0 192.168.55.58:1143 192.168.55.51:50265 TIME_WAIT -
tcp6 0 0 127.0.0.1:34977 127.0.0.1:3306 ESTABLISHED 1043/java
tcp6 0 0 192.168.55.58:1143 192.168.55.51:50259 TIME_WAIT -
tcp6 0 0 127.0.0.1:34978 127.0.0.1:3306 ESTABLISHED 1043/java
 

imap (the rest of the story)

So I am able to use Outlook Express and Thunderbird imap clients to access Alfresco. I'll let alone the WCM issue for the time being. Time to see what Alfresco can do!

My fix was to modify /etc/hosts:

127.0.0.1 localhost
#127.0.1.1 alfresco  <--- rem this
192.168.55.58 alfresco alfresco.fcn.local  <-- add this

 

modify /var/lib/tomcat6/shared/classes/alfresco-global.properties

imap.server.enabled=true
imap.server.host=alfresco
imap.server.port=1143

 

and then run:

iptables -t nat -A PREROUTING -p tcp --dport 143 -j REDIRECT --to-ports 1143
iptables-save > 
/etc/iptables.rules

 
 
reboot
Liraz Siri's picture

Hardwiring an IP is a bad idea

It means if you ever move around your installation? (e.g., recover a backup to a development box with TKLBAM) you'll need to reconfigure /etc/hosts.

A generic host setting might be a better idea if it works:

imap.server.host=0.0.0.0

Could you try that? 0.0.0.0 is an IP wildcard meaning any address. If it works it will be easier to turn on IMAP by default in the upcoming TurnKey Alfresco appliance...

Hardwired IP addresses

I changed:

imap.server.host=alfresco

to:

imap.server.host=0.0.0.0

rebooted, and it still works.

So...

Add iptables rule 143 -> 1143

Remove 127.0.1.1 alfresco from /etc/hosts

add 192.168.55.58 alfresco to /etc/hosts

modify /var/lib/tomcat6/shared/classes/alfresco-global.properties

imap.server.enabled=true
imap.server.host=0.0.0.0
imap.server.port=1143
imap.server.attachments.extraction=true

 

Note: Further testing and I find Thunderbird --> Alfresco imap not very stable.

Glad to see you made it work!

I didn't setup this setting for the appliance as I feel it's not very popular. I don't even know what it does! :P Also, WCM is an addon if you don't have a website in place with any of other popular CMS. So for the appliance, I felt of setting the most useful features, as CIFS and FTP access, and the repository itself. The rest can find a place in the appliance wiki, on how to set up extra features.

I commented about the WCM error in the log under "Know issues" in the main post. There are other issues you may find, and urls pointing to some information. 

Thanks for testing and sharing your experiences!

How to deploy JSP web application in Alfresco3.3g?

Hai!

This is Prasad J.

I am new for Alfresco 3.3g.

I want know:----

1). How to deploy the java application in alfresco.

2). How to deploy the jsp web application in alfresco.

 

Plz send me reply as soon as possible.

 

Thanks and Regards

J. Prasad

Jeremy's picture

Your question is probably better answered by Alfresco community

That is assuming that your question relates specifically to Alfresco. This thread is based around a TKL patch to create an Alfresco appliance ISO (ie a preconfigured Linux OS with Afresco setup and running straight from install). Have more of a read about TKL on the front page if you would like. While you may get lucky and get an answer here, I suspect you'll have much more luck over on the Alfresco forums, or perhaps by searching their Wiki.

TKL has so many different appliances (about 40 currently stable, and many more in development - including this one). So the knowledge here is mostly more of a general nature (broad but not necessarily deep, when it comes to the individual applications anyway)

If you find an answer over there (or elsewhere) and you think it may be useful for other TKL users, please post back your findings.

Plz send me reply as soon as

Plz send me reply as soon as possible

I'm not really sure what you're asking about

As Alfresco is not an application server, so you don't deploy java applications or jsp apps to Alfresco. You can do some scripting stuff but you'll find better help on this in the Alfresco forums, as Jed suggested. 

If you want to deploy other applications in the same tomcat as Alfresco, just copy the wars (or make symlinks) on /var/lib/tomcat6/webapps/.

I wouldn't recommend it as Alfresco is a resource-demanding app and I think it should live on it's own server. 

Hope this helps!

fail to update ISO

Languages problem when updating ISO image?

......

Saving to: `alfresco-community-war-3.3g.tar.gz'

100%[======================================>] 114,028,662 1.54M/s   in 73s     

2010-09-28 11:58:46 (1.48 MB/s) - `alfresco-community-war-3.3g.tar.gz' saved [114028662/114028662]

+ tar xf alfresco-community-war-3.3g.tar.gz
+ rm alfresco-community-war-3.3g.tar.gz
+ service mysql start
 * Starting MySQL database server mysqld                                 [fail]
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "sv_SE:sv:en_GB:en",
    LC_ALL = (unset),
    LANG = "sv_SE.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
....

 

per@ubuntu:/etc$ echo $LANGUAGE
sv_SE:sv:en_GB:en
per@ubuntu:/etc$ echo $LC_ALL

per@ubuntu:/etc$ echo $LANG
sv_SE.utf8

 

fail to update ISO

applied the ISO patch inside a turnkey lucid beta system instead,  work OK.

Thanks for testing Per

The first time it failed, where you applying the patch to the lucid core beta?

ISO

In Ubuntu 10.04 (client install) , with languages set to Swedish(+English), I follow the guide from JedMeister, and tried to patch the ISO image, but it break, something about the $LANG. perhaps the languages of the system should be eng. for Alfresco install, or there is something wrong with my installation.

Second install touchkey beta lucid in hd at my linux server,  and patchet the image there, burn new CD, reinstall system, had a problem with link to http://alfresco:8080/share,
set host in webmin to my ipnumber, everything working now.

Thanks for the Alfresco patch!

JSP based web application depoyment is ok, but how to execute?

Respected Sir!

As per your valuable suggestions JSP based web application deployment  in Alfresco is ok, but how to get the result of the jsp based web application in Alfresco. Please send me your valuable suggetions and proper links in the form of steps wise executing. I am waiting for your valuable suggestions. Please don't forget me Sir.

 

Thanks and Regards

J.Prasad

Liraz Siri's picture

Inappropriate expectations + missing basic knowledge

Hi Prasad,

I'm one of the forum moderators. Unfortunately I've had to delete a few of your posts on this thread because you are persistently ignoring the advice given to you by other community members to seek advice regarding your questions in a more specialized forum.

Remember, everybody here is volunteering their time. From the tone of your questions it sounds like you are missing basic knowledge and are looking for more hand holding than it is appropriate to ask volunteers on a general Linux forum.

Please understand that stuffing comments with polite words (e.g., valuable, sir, respected) does not hide the underlying lack of consideration and respect when you expect others to all the legwork for you.

The unspoken expectation of online communities is that before asking very basic questions you first make the most of self-help resources like google to find tutorials and documentation that will give you the general understanding you lack. This is much more efficient and ultimately places less demands on everyone's time, including your own.

If you can't do that yourself, you'll need to consider hiring a paid consultant.

stop alfresco

Is there some simple and secure way to stop alfresco?

 

alfresco/commands# sh alfresco.sh stop                                                                                                alfresco.sh: 27: ./tomcat/bin/shutdown.sh: not found 

In this case, Alfresco is deployed on the system's tomcat

Those scripts are for when you are using the bundled tomcat that comes with one of the downloadable versions of Alfresco. As this appliance uses the alfresco WARs, and they are deployed in the system's tomcat, to stop alfresco you have to just stop tomcat.

service tomcat6 stop

J.Prasad

Ask Your questions about JSP there:

http://forums.alfresco.com/en/

 

Where the alfresco developed files are available like hard disk?

I developed some files in alfresco 3.3g, but I want know where my developed files are stored in Alfresco 3.3g.

ftp ip adress

Hello,

Sorry if i am not in the right place, i think you have the answer for my question.

I want to bind the ftp to a particular adress on a server having severals adreses. How can i do it ?

thank you

N. R

The server have several nics?

If your server have several addresses, I think you'll have to do the trick at the firewall level. Set some rules to see if the incoming request to port 22 is using the address you want, else block them. Are you using this appliance? you can do that easily via webmin.

Hope this helps

Thank you for your answer, in

Thank you for your answer, in fact to be able to bind the ftp server to a partular address on a server having severals ip adress, the following lines should be added to WEB-INF/classes/alfresco/file-servers.xml

 

<config evaluator="string-compare" condition="FTP Server">

<!-- <debug flags="File,Search,Error,Directory,Info,DataPort"/> -->

<bindto>your ip adress</bindto>

</config>
 

How to execute the JSP file in Alfresco 3.3g?

Hai Sir.
I deployed JSP file in Alfresco 3.3g successfully, but I want to execute the JSP file in Alfresco 3.3g.
Please help me, How to execute JSP file in Alfresco 3.3g?
I am waiting for the your valuable reply Sir.
I request you Sir, Please don't forget me Sir.
Please help me, because I am new to Alfresco.


Thanks & Regards
J. Prasad

Must be some kinda bot

J. Prasad can't be human. Funny thing is that I Google J. Prasad and expected the name would show up in other forums but it does not.

Let me know what your comment meaning?

Let me know what is your comment meaning?

 

Thank You

My meaning good sir is

My meaning good sir is paramount to the meaning of life itself. Surely an astute and honourable man as yourself can appreciate that. Thank you sir for your valuable contributions to this forum. I just know that you will continue in a way that only you can.

Respectfully thank you,

Bigus Dickus

tklpatch faild

Hi all,

 

I have a error with tklpath to iso :

1. I've installe a new VMware image of Ubuntu 10.04 LTS

2. Follow the description to patch the iso with the script but I have this error :


FATAL: Could not load /lib/modules/2.6.32-24-generic-pae/modules.dep: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "fr_FR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Removing `local diversion of /sbin/initctl to /sbin/initctl.distrib'

...any ideas ?

 

Thanx for help
 

Did you install tklpatch?

On point 1, did you install Turnkey-Core and then tklpatch to patch the Turnkey-core iso? or an ubuntu and added the turnkey repos to install tklpatch? 

If so, could you please provide the complete log when you run tklpatch? And more details of specific versions of the appliance you are running...

Hi Adrian,   thx for your

Hi Adrian,

 

thx for your quick response -

 

hmmmm....I just add turnkey repos to install tklpatch?

 

its wrong ?

I haven't tested tklpatch in a classic ubuntu environment.

I'll suggest you install TurnkeyCore11rc and install tklpatch/patch the iso inside this system. You should not have any problem this way. It's a boring process but at least while the official Alfresco appliance is released (it should soon) this the only way. 

Anyway, is your Ubuntu base 32 bits? Tklpatch only works in 32 bits systems...

...hmmm it's very strange - I

...hmmm it's very strange - I follow your instruction :

1. In VmWare I create a VirtualMachine with Turnkey Core 11 rc

2. Install the tklpatch et follow the instruction of JesMeister

and I have the same error ...

Now I test the same installation (JesMeister tutorial) with Ubuntu Desktop 10.04 LTS ...

My Ubuntu base is 32bits

pauln's picture

that's the error : + echo

that's the error :

+ echo 1
+ modprobe iptable_nat
FATAL: Could not load /lib/modules/2.6.32-24-generic/modules.dep: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "fr_FR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Removing `local diversion of /sbin/initctl to /sbin/initctl.distrib'

...what's wrong :(


From the error message:

I can tell the system is trying to access files for a kernel which is not the default. You seem to be using the 2.6.32-24-generic-pae kernel, while the default should be 2.6.32-24-generic. You can check your /lib/modules folder an see it's content (you should find a folder there with the expected kernel).

You can try the following:

1. Boot with the generic kernel if you see it in the kernel list at startup (GRUB).

2. Try instaling linux-image-2.6.32-24-generic-pae to see if you get the missing files. 

It's very weird that you're getting the pae kernel by default. But I haven't tryed the vmware images, I always have installed from isos. 

Got to give this a go... but is Alfresco version 3.4 coming?

But was wondering if a Alfresco 3.4g patch is possible anytime soon.  I don't know if it will be as simple as updating the downloaded tarball ??

Never created a patch - buy I might try myself.

  Scott

Scott

www.rakata.co.uk

Jeremy's picture

Not sure Scott

But assuming nothing significant has changed about the way it installs it may be as easy as changing the downloaded file.

Only one way to know! If you modify the conf script inside the patch you'll soon know. If you are familiar with bash scripting then TKLPatches are pretty basic. It just consists of a conf script (basically just a install bash script) and often a set of files to overlay on top of the standard file system. Although having said that they can be quite complex for some apps.

If you do manage to get it all working with the new version perhaps bundle your modified patch. create a new thread and attach it (you can only attach stuff to the first post of a thread). Be good to post a link here to your new thread if you get that far.

Cannot get this working :-(

Hi all,

Tried to patch the iso (with the current patch 3.3 - thought I should test that out first) - failed the first time, but lets ignore that - it appearred to work the second time.  I am patching the latest TKL core iso.

Boot the patched iso in Virtualbox and was looking good - for access links on the TKL console menu it was showing alfresco and cif shares - thought I had it.

But alas, no - tomcat returns a 404 error when trying to access http://192.168.28.202/alfresco  (and same result on port 8080)

Webmin works find, tomcat is running, alfresco.xml is there, /opt/alfresco is there with the war, /srv/alfresco (the data directory I presume is there).

Interesting I cannot get to the tomcat app manager - guessing that isn't installed.

 

Beyond that I haven't really gone delving into the set-up - kinda hoping that someone might know whats up :-)

Any ideas ,  Scott

Scott

www.rakata.co.uk

Success - so must write this down before I forget!

When I say success - it looks like it works now - but I haven't tested much.

Ok - don't know what was going on but..

1.  I checked /var/lib/tomcat6/logs/alfresco.log
I found error saying that "A previous schema upgrade failed.  Revert to the original database before attempting the upgrade again."

This url explained it (http://forums1.man.alfresco.com/en/viewtopic.php?f=8&t=8843&start=0) - so dropped the alf_bootstrap_lock table.

2.  That seemed better but then it complained about a table missing > alf_content_url.

3.  So dropped the alfresco db and deleted the users.

4.  Re-ran the db setup (see Adrians step 7 above).

5.  Restarted tomcat just to make sure and bingo!

So really not sure what happened originally but got there.  For anyone elses reference you should have 88 tables when initally setup.

  Scott

Scott

www.rakata.co.uk

Jeremy's picture

Thanks for posting back Scott

I'm sure that'll be useful for someone else and even the devs may find it useful when they go to make the official TKL Alfresco appliance.

jgpatrick3's picture

    Adrian, Thank you

 

 

Adrian,

Thank you for your work.  As someone who has spent long hours getting Alfresco properly installed and configured, your work is so helpful.

I did have a problem with segmentation fault when I tried to move it to my home ESXi server.  Fortunately others have had similar problems with other programs, and by following the suggestion in another thread, I was able to get things fully up and running.

http://www.turnkeylinux.org/forum/general/20101216/call-suggestions-bug-...

This is some great work.

 
 

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)